Component Tests for Spring Cloud Microservices

Introduction

The shift towards microservices has a direct impact on the testing strategies applied and has introduced a number of complexities that need to be addressed. In fact, microservices require additional levels of testing since we have to deal with multiple independently deployable components.

An excellent explanation of these concepts and the various levels of microservices testing is given by Martin Fowler in his Testing Strategies in a Microservice Architecture presentation. Let's have a look at the revised "test pyramid" from this presentation:

Creating a Component Test Framework

If you have been reading Martin Fowler's canonical article on the test pyramid, you know that there is a mystical layer that hides between those broad unit tests (the base of the pyramid) and the integration tests layer (near the top). This layer is called: component tests. 

This article is about the following: What are component tests? Why should you care, and how to implement them properly?

Top Testing Types to Use in Automation Testing

Planning automated tests.

For any organization, the overall testing culture is influenced by the prevailing testing approach, apart from how they envision the test automation and how are they planning to collaborate beyond the development teams. Establishing test automation in an organization is not your conventional practice and that is why you would want to learn the best approaches possible.

This means retrospecting the current process, finalizing and deciding the new test approach as well as determining the level of testing, roles, and responsibilities of the team members.