This talk goes about a suggested way to organize testing activities along with continuous delivery for the microservices architecture. I'm talking about Build - Test - Release cycle, keeping the product releasable and building the quality in. I overview the testing setup that is supporting application development and delivery.
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ย
Testing in the era of microservices - Codemotion meetup - Amsterdam, 12-04-2016
1. Testing in the era of microservices
The role of testing in the microservices application lifecycle
Codemotion meetup, 12-04-2016
Container Solutions, Amsterdam
Pavel Chunyayev
2. @PavelChunyayev
Amsterdam
Levi9 HQ
Amsterdam โ 2005
25 people
Novi Sad
Serbia
Novi Sad โ 2005
320+ people
Zrenjanin
Serbia
Zrenjaninโ 2014
30+ people
Iasi
Romania
Iasi โ 2007
80+ people
Kiev
Ukraine
Kiev โ 2008
130+ people
5. @PavelChunyayev
About me
โข 12 years of IT experience
โข Lived and worked in Ukraine and Estonia
โข Moved a year and half ago to the Netherlands
โข Love cycling
โข Learn Dutch
โข Alpe dโHuZes - http://deelnemers.opgevenisgeenoptie.nl/levi9
7. @PavelChunyayev
Continuous Delivery
Incept
โข Business idea
โข Is needed
immediately
โข Should be validated
Plan
โข Refine
โข Estimate
โข Prioritize
Develop
โข Put into sprint
โข Develop in a branch
โข Conduct a code
review
โข Merge into master
Build
โข Trigger pipeline
โข Build
โข Unit testing
โข Integration testing
โข Static code analysis
Test
โข Contract testing
โข E2E testing
โข Security testing
โข Resilience testing
Release
โข Zero-downtime
โข Canary testing
โข Rolling deployment
โข Blue / green
deployment
Operate
โข Monitoring
โข Validation of the
idea
โข Money generation
โข Disposal
11. @PavelChunyayev
Build quality in
โข Testing is not just presence or absence of defects
โข Test should not just raise the cost of maintenance
โข Stop thinking about functional testing only
โข Quality goal need to be established early in the development process
โข Clear understanding of quality requirements
โข Automated testing โ part of Definition of Done
โข Move tests to the left
โข TDD
13. @PavelChunyayev
Continuous Delivery
Incept
โข Business idea
โข Is needed
immediately
โข Should be validated
Plan
โข Refine
โข Estimate
โข Prioritize
Develop
โข Put into sprint
โข Develop in a branch
โข Conduct a code
review
โข Merge into master
Build
โข Trigger pipeline
โข Build
โข Unit testing
โข Integration testing
โข Static code analysis
Test
โข Contract testing
โข E2E testing
โข Security testing
โข Resilience testing
Release
โข Zero-downtime
โข Canary testing
โข Rolling deployment
โข Blue / green
deployment
Operate
โข Monitoring
โข Validation of the
idea
โข Money generation
โข Disposal
40. @PavelChunyayev
Continuous Delivery
Incept
โข Business idea
โข Is needed
immediately
โข Should be validated
Plan
โข Refine
โข Estimate
โข Prioritize
Develop
โข Put into sprint
โข Develop in a branch
โข Conduct a code
review
โข Merge into master
Build
โข Trigger pipeline
โข Build
โข Unit testing
โข Integration testing
โข Static code analysis
Test
โข Contract testing
โข E2E testing
โข Security testing
โข Resilience testing
Release
โข Zero-downtime
โข Canary testing
โข Rolling deployment
โข Blue / green
deployment
Operate
โข Monitoring
โข Validation of the
idea
โข Money generation
โข Disposal
Keep the product releasable
Build quality in
41. @PavelChunyayev
Key takeaways
โข Update testing practices
โข Immutable infrastructure
โข Reproducible and repeatable testing
โข Build quality in
โข Improve continuously
Any questions?
pavel@levi9.com
Editor's Notes
Ideas come from all the sources.
Questions are welcome.
Disagreement is welcome, but after the talk.
.
.
.
.
D - barely working
T - people with special mindset test
A - Some people accept months later
Not every feature is needed.
Shorter and shorter release cycles =>
Release more software in less time.
Canโt churn out.
No manual testing.
.
* Independently releasable.
* The testing strategies that applied for monolithic applications need to be reconsidered.
Shared responsibility.
.
.
Reproducible and repeatable process (including testing).
Potentially shippable product -> Keeping the product releasable
.
Testing criteria.
Run over and over again.
.
No DTAP.
Immutable (testing framework?)
TTL
Docker
Framework to allow restart - select arbitrary test
Building the thing right
Building the right thing
Unit + Integration โ level of microservices.
.
100% coverage?
Test your unit tests.
Know exactly what is broken.
Feature toggling.
Connect units together
How parts of application work together
Feature toggling.
Mock or not to mock
Black box testing.
How service works as a whole.
Different integrations โ pub/sub, request/reply.
Feature toggling.
Mock or not to mock
Proof we are still on track
Not only selenium
Focus on:
business flows
personas, user journeys
BDD + DSL?
Data independency
Feature toggling, page objects
Mock or not to mock
Communication โ via contracts
* Semantic or not semantic
* API versioning - public or also internal?
* Transition between versions โ testing different versions
* Running several versions together
* Semantic or not semantic
* API versioning - public or also internal?
* Transition between versioning โ testing different versions
* Running several versions together
* Semantic or not semantic
* API versioning - public or also internal?
* Transition between versioning โ testing different versions
* Running several versions together
* Semantic or not semantic
* API versioning - public or also internal?
* Transition between versioning โ testing different versions
* Running several versions together
* Semantic or not semantic
* API versioning - public or also internal?
* Transition between versioning โ testing different versions
* Running several versions together
Testing in production
Canary
Dark launch
Real users, not synthetic transactions
Security testing
Availability testing
Resilience testing
.
.
.
.
.
.
Unit + Integration โ level of microservices.
Unit + Integration โ inside
Contract + E2E - outside
The same testing is needed for monolith, but crucial for microservices.