What is it?

In Software Testing, unit tests are the most basic testing method used, which consists of validating an individual component of the software, accordingly to functionality and requirements. This small component can be a function or a method. Unit testing is often described as testing small pieces of code based on the idea that a “unit” is the smallest piece of work. However, a more useful definition is that a unit test verifies the outcome of a single unit of work or functionality, which may range from a single small function to multiple classes.

This way, bugs can be detected and fixed early in the development process, ensuring that each part of the code works correctly before connecting to other units and implementing the entire system.