In the last few months I started a personal study project. The initial objective was to further study the differences in the development and implementation of quality strategies for microservices with synchronous and asynchronous communication. I decided to do all the development of the application and the tests from scratch to be able to better observe some details in practice. I ended up doing a lot of things and the project grew a lot LOL
I am writing this post because I would love to receive feedbacks/code reviews of my code, strategy and any other details that can be helpful to the project or contribute with some knowledge. Feel free to give your opinion and criticize on any point. I will describe in more details some things that were done to give a better context:
The QA strategy involves:
- Unit Tests: Junit5
- Integration tests: Spring Boot Test and EmbeddedKafka (when testing asynchronous events)
- Quality Metrics:
- Mutation Tests / Mutation Coverage: PITest
- Code Coverage: Jacoco
- Technical Debt, Code Smells and other complementary metrics: Sonar Cloud
- Contract tests: Pact framework
- Continuous Integration: This project uses Github Action for Continuous Integration, where it executes all the tests and Sonar Cloud Analysis for every pull request, making easier the process of integration of every new code, also facilitating the process of Code Review.
The project also includes some extras such as docker compose configuration, pipelines configured in Github Actions, swagger configuration for each module, automated creation and upload of docker images to DockerHub, application of Code Style with spotless plugin. For more details, just take a look on the repository.
One thing that I was thinking about if would be necessary to include in this specific testing strategy, are the E2E tests, since in this context of my application, I have already managed to cover several different points with the other tests mentioned above. One type of problem that the E2E test would be able to identify in this context that others would not be able to, are infrastructure and configuration problems. For example, when I created Docker containers for each of the modules, I saw that they were not communicating properly due to possible problems with my DockerFile. This type of problem was only possible to identify with an E2E test. So the point I keep thinking about is whether it would be more efficient to have only some kind of health checks of infrastructure points like this, instead of creating an entire E2E test to identify details like this, or maybe this E2E test could still have a value as an acceptance test for the business, then it would still be better to create it. Note: It may be complicated to demonstrate it here, but I believe that talking about the coverage of the application itself, these E2E tests would only validate again some points already covered in the other tests.
Here is the link for the repository: https://github.com/teixeira-fernando/EcommerceApp
Thanks in advance,