Unit tests

Unit tests are well-known and are already normative in the software development industry. There are a number of standards and practices for unit tests. However, the best practice for unit tests is to make sure that they are running every software built.

The unit tests are used to prove the smallest testable part of a computer program. In this sense, the great challenge is to write code that is testable; otherwise, it will be impossible to apply the unit tests.

An important feature is that unit tests only prove the code unit segment. Imagine that we are going to test a function that communicates with the database. When we create the unit test, we have to use a mechanism so that the function test does not touch the database. The ...

Get Microservice Patterns and Best Practices now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.