Member-only story
Integration Testing on Spring boot microservice with Wiremock and JUnit5
A software system can and has to be tested on different levels of abstraction. ISTQB (International Software Testing Qualifications Board) defines four different test levels: Component Testing (Unit Testing), Integration Testing, System Testing and Acceptance Testing.
In this story, we are going to perform integration tests between Spring Boot microservices using Wiremock.
What is integration testing ?
Integration tests are tests that include two or more integration components. It is used to expose defects in interfaces and in interactions between components or integrated systems.
Overview
Suppose we are building a microservice and need to access data from other microservices.
Our invoicing microservice needs customer data and access to the payment service.
The challenges of integration testing
When we need to perform our integration tests with other microservices, there are several challenges to resolve: