The DevOps principle of “Shifting Left” promotes testing early in the development cycle, for improved software quality and system health. At the same time, the rise of containerized microservice applications brings a new challenge: services are developed in isolation. It’s common practice that each service is frequently, thoroughly tested—individually. But they don’t get validated together until deploy time (if at all!). In this session, we’ll explore techniques for running high-fidelity integration tests across multiple services, as part of a Continuous Integration workflow. You will learn how to provision, test, and tear down self-contained Kubernetes environments that replicate complete production systems. This allows you to run full-system tests as part of every build, safely and cost effectively.
WordPress Websites for Engineers: Elevate Your Brand
Continuous Integration Testing: Fully test your microservices application, early and often
1. Fully test your microservices application, early and often
Dave Stanke, Developer Advocate at Google Cloud @davidstanke
Illustrations by Tracey Laguerre
Continuous
Integration Testing
7. @davidstankeContinuous Integration Testing
This is good for business
source: DORA Accelerate State of DevOps
Continuous
Testing
Continuous
Delivery
Software
Delivery
Performance
Availability
19. @davidstankeContinuous Integration Testing
Why bother?
Because Semantic Versioning (SemVer) isn’t enough.
Because complex systems have emergent properties.
Because users experience an application.
40. @davidstankeContinuous Integration Testing
Integration testing techniques
Method Fidelity Isolation Scalability Ephemerality Speed Cost
docker-compose ⬤ low ⬤ high ⬤ high ⬤ (depends) ⬤ fast ⬤ medium
Shared “staging” K8s ⬤ high ⬤ medium ⬤ highest ⬤ variable ⬤ fast ⬤ low
Single-node “k8s” ⬤ medium-high ⬤ high ⬤ high ⬤ variable ⬤ medium ⬤ medium
K8s per test ⬤ highest ⬤ high ? ⬤ variable ⬤ slow ⬤ high
41. @davidstankeContinuous Integration Testing
Integration testing techniques
Method Fidelity Isolation Scalability Ephemerality Speed Cost
docker-compose ⬤ low ⬤ high ⬤ high ⬤ (depends) ⬤ fast ⬤ medium
Shared “staging” K8s ⬤ high ⬤ medium ⬤ high ⬤ variable ⬤ fast ⬤ low
Single-node “k8s” ⬤ medium-high ⬤ high ⬤ high ⬤ variable ⬤ medium ⬤ medium
K8s per test ⬤ highest ⬤ high ? ⬤ variable ⬤ slow ⬤ high
45. @davidstankeContinuous Integration Testing
Yes, we can (still) do integration testing
There are trade offs between different ways of doing it.
It’s all about risk tolerance vs. reward of speed/cost/etc.
You have to find your own sweet spot. (When you do, tell me about it!)
@davidstanke