In this chapter, we will look at the different testing methodologies that you can use before, during, and after the development process. As you will know, testing your application avoids future issues and gives you a better project overview.
It is very important to use testing in our application because these steps can avoid (or at least reduce) future problems or errors that can appear as we are humans and can make mistakes during the development process or because the structure of the project is not correct or even the understanding of the developer does not match the requirements of the customer.
The testing process will help improve the code quality and understanding of the functionalities, do regression testing in order to avoid the inclusion of old issues in continuous integration and reduce the time taken to finish the project.
Testing is used to reduce the fails or errors in our application. Development teams spend a lot of time doing bug fixing and, depending on the moment of the discovery of the bugs, the impact can be bigger or smaller. The following image shows the relative cost of bug fixing related to the stage of the development:
The reason for using testing methodologies in development is that we can find errors in our code in the early steps of the development so that we will spend less time doing bug fixing.
The challenge of testing an application based on microservices is not in the testing of every single microservice, but on the integration and data consistency. An application based on microservices will need a better understanding of the architecture of microservices and their workflow by the developers to be able to use testing on it. This is because it is necessary to check the information and also the functionality of every microservice at all the points of communication between the microservices.
The testing to use on microservices are as follows:
Once we know how to proceed with testing our application based on microservices, we will look at some strategies to do so during development.