End-to-end testing microservices: a love-hate relationship

30-minute New Voice Talk

The goals of microservices architectures and end-to-end tests are in fact conflicting. Therefore we must consider our options carefully before we decide to implement this kind of microservice tests.

Timetable

2:40 p.m. – 3:20 p.m. Thursday 12th

Audience

This presentation addresses mainly software testers, developers and architects.

Key-Learnings

  • The goals of microservices architectures and end-to-end tests are conflicting
  • There are alternative approaches to consider, e.g. A/B testing, blue-green deployments, feature toggles or CDC/API tests
  • By E2E-testing microservices you will likely experience reduced deployment frequency and strong dependencies between services and teams
  • E2E-testing microservices is a serious investment and the expected increase in quality needs to outweigh the organizational overhead

Microservices continue to be all the rage in software development these days. They are meant to be developed, delivered and deployed entirely independent of each other. However, in most real world scenarios the only meaningful way of running them is in combination with each other.

From a testing perspective, past experience teaches us that software components which interact with each other should also be tested in conjunction because verifying that a single unit works properly in isolation is simply not sufficient to guarantee that the entire integrated system works as intended.

Furthermore, one of the key advantages of a microservices architecture is that it allows for continuous integration and continuous deployment. Therefore all testing stages are typically fully automated and incorporated into some sort of CI/CD pipeline. Then, if the end-to-end testing stage fails, the delivery of all (!) involved microservices is blocked until the causes of the failing tests are fixed.

Hence, the goal of ensuring software quality through end-to-end testing and the goal of rapidly integrating and releasing software components are actually conflicting.

In this talk we will share our experiences regarding this dilemma that we made in a large scale real world project involving 200+ developers organized in 30+ teams and a landscape comprised of more than 100 microservices.

We will discuss the pros and cons of end-to-end testing microservices, the biggest issues and obstacles we faced, best practices and anti-patterns we identified and also look at alternative approaches.

Related Sessions

Virtual Pass session
Tue, Nov 10 • 4:40 p.m. – 5:20 p.m.

30-min New Voice Talk

Tue, Nov 10 • 4:40 p.m. – 5:20 p.m.

30-minute Talk

Virtual Pass session
Thu, Nov 12 • 4:30 p.m. – 5:10 p.m.

30-minute Talk

Virtual Pass session
Thu, Nov 12 • 2:40 p.m. – 3:20 p.m.

30-min New Voice Talk