+ All Categories
Home > Documents > Testing in the hundred microservices world. When the ... · Testing in the hundred microservices...

Testing in the hundred microservices world. When the ... · Testing in the hundred microservices...

Date post: 03-Jun-2020
Category:
Upload: others
View: 7 times
Download: 0 times
Share this document with a friend
33
Testing in the hundred microservices world. When the pyramid becomes an hourglass Isa Vilacides Director Engineering at CloudBees #EuroSTARConf
Transcript
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

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

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

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
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

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

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

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

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

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

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

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

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

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

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
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
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
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
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
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

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

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

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

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

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

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

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

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

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

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

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

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

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

Thank You! Questions?

We are hiring @CloudBees

Twitter @vilacides

#EuroSTARConf


Recommended