Testing in the hundred microservices world. When the ... · Testing in the hundred microservices...
Transcript of Testing in the hundred microservices world. When the ... · Testing in the hundred microservices...
![Page 1: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/1.jpg)
Testing in the hundred microservices world. When the pyramid becomes an hourglass
Isa Vilacides Director Engineering at CloudBees
#EuroSTARConf
![Page 2: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/2.jpg)
Index1. Monolith vs microservice
2. Traditional model and it’s challenges in distributed systems
3. Fast, robust and reliable integration testing is possible
4. Reshaping the pyramid and being the first ones to know if something went wrong in production
5. A bit more about safe rollouts
![Page 3: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/3.jpg)
Monolith vs Microservice architecture
![Page 4: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/4.jpg)
![Page 5: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/5.jpg)
Traditional testing pyramid in monoliths and its challenges in the micro services world
![Page 6: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/6.jpg)
Testing pyramid
![Page 7: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/7.jpg)
End to end tests in the monolith- Slow
- Unreliable
- Difficult to maintain
- Difficult to debug
- Test real integrations
![Page 8: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/8.jpg)
End to end tests in distributed systems- Slow
- Even more unreliable
- Difficult to maintain
- Difficult to debug
- Test real integrations
![Page 9: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/9.jpg)
Unit and integration tests in the monolith
- Fast
- Reliable
- Easy to maintain and debug
- Based on assumptions
![Page 10: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/10.jpg)
Integration tests in distributed systems- Require to spin up or mock 1+ services
- Not that fast
- Not that reliable
- Easy to maintain and debug
- Based on assumptions
![Page 11: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/11.jpg)
Based on assumptions
What if what you are mocking changes?
![Page 12: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/12.jpg)
Based on assumptions
It relies on the
developer watching for
those changes
![Page 13: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/13.jpg)
What if you could get the best of the two worlds?
![Page 14: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/14.jpg)
Fast, robust and reliable integration testing is possible
![Page 15: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/15.jpg)
![Page 16: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/16.jpg)
![Page 17: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/17.jpg)
![Page 18: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/18.jpg)
![Page 19: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/19.jpg)
![Page 20: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/20.jpg)
Consumer driven contract testing
- Fast feedback in isolation
- Early detection in both sides
- Enables communication
![Page 21: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/21.jpg)
Reshaping the pyramid
![Page 22: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/22.jpg)
Reshaping the pyramid
You want to go fast without breaking things, but things break so you want to be the first one to know that things went wrong in production
![Page 23: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/23.jpg)
Reshaping the pyramid
- Giving importance to post deployment verification
- Deployment health checks
- Monitoring
![Page 24: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/24.jpg)
Reshaping the pyramid
- Understand how your apps normally behave
- % of 500 responses per second
- Establish thresholds
- Measure and monitor
- Raise alerts
![Page 25: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/25.jpg)
Reshaping the pyramid
![Page 26: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/26.jpg)
Testing pyramidPDV
monitoring
![Page 27: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/27.jpg)
Reshaping the pyramid
By when you measure and react customers are already affected
![Page 28: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/28.jpg)
A bit more about safe rollouts
Dogfooding, feature flag development and staged rollouts
![Page 29: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/29.jpg)
Feature flags
![Page 30: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/30.jpg)
Canary rollouts
![Page 31: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/31.jpg)
Dogfooding
![Page 32: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/32.jpg)
Summary
• Focus on integrations between consumers and providers
• If something goes wrong in production you want to be the first one to know about it
• If something goes wrong in production you want it to affect the least customers possible
![Page 33: Testing in the hundred microservices world. When the ... · Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at](https://reader030.fdocuments.in/reader030/viewer/2022011900/5ee0ea12ad6a402d666bfb76/html5/thumbnails/33.jpg)
Thank You! Questions?
We are hiring @CloudBees
Twitter @vilacides
#EuroSTARConf