DEV Community

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

Posted on

4 1

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

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay