DEV Community

Ana María Díaz
Ana María Díaz

Posted on

How testing help us improve our code

What is Unit Testing

Unit testing basically works by layers most known as components. Testing each component to verify if it works as expected, this units are tested during development of an application.

There are some advantages of unit testing:

  • Help us reducing bugs on early stages of development
  • Allows us to improve code
  • Integrates all at once

How it works

The unit testing lifecycle starts with writing the function that creates a new test.

After that we need to understand and check the code from repository if necessary we have to make changes.

Then we execute the unit tests and fix bugs in order to run the unit tests again.
Finally all the code gets reviewed and the cycle repeats itself.

Learning how to work with testing is an important stage of development, It will help us to improve our code and save time.

Image description

Top comments (0)