End-to-End test
environments
11/7/2019 Roy Braam @rbraam
End-to-End test
environments
11/7/2019 Roy Braam @rbraam
Roy Braam @rbraam11/7/2019
End-to-End
test environments
Architecture
Monolith
Server
Monolith
Modular Monolith
Server
Multiple (Modular) Monoliths
Server Server
Microservices
Server Server
Host
Virtualization
VM VMVM
Host
Containers
VM VMVM
Platform
Node NodeNode
Controller Manager API
Public Cloud
Node NodeNode
Controller Manager API
Blockchain
Node NodeNode
Controller Manager API
Source: @dexhorthy
Architecture
End 2 End test environments
The End-to-End test environment
“A complete integrated
environment with production like
systems, with the single purpose of
testing”
Aliases
@rbraam
DTAP
The dead end road
Problems with E2E
Test Data hell
Catalog
service
Stock
service
Shoppingcart
Problems with E2E
Not so “production like”
Version:
Production
Version:
Production
Version:
Production
Version:
Production
Version:
Production
Version:
Production
Version:
Production+1
Version:
Production+1
Version:
Production+1
Version:
Production-1
Version:
Production+1
Version:
Production-2
Version:
Production-3
Version:
Production-4
Version:
Production+2
Problems with E2E
Test scope
Shoppingcart
Catalog
service
Stock
service
Message
service
SMTP
service
SMS
service
Problems with E2E
@ the Rabobank
On-premises
On-premises
On-premises
On-premises
Dev: Hey, can you help me out. Our flow is not working on the
environment 3, can you have a look if the platform is the cause
Dev: Yes.... Hey, now it's working. O, wait. You are looking at
environment 3 small.
Me: Sure. I don't see any problem with the platform. Can you show
me the broken flow on my device?
Support conversation to a team
Me: Yes, that is what you said, environment 3...
Dev: No, I meant environment 3 big
Me: But that's the same platform, it's environment 3.
Dev: No, it is a small environment 3
Me: But it connects to the same services for us.
Dev: But not to us, in environment 3 small we connect to services in
environment 5 big
Me: What !!?!?
Migrating Platform to the public Cloud
End-to-End
Environment
Why?
Because of..... reasons
Test data
“Tests with semantic correct data
can only be run in a End-2-End test
environment.”
Improve by
Trust
“I want to see it work before I go to
production”
What I hear:
“I don't trust the automated tests
we implemented.”
Or:
“We don't have automated
integration tests, we like manual
testing labor”
What if you don't
“Talk the Talk, Click the Click”?
Gain trust
Immaturity
“System X had a new release that
broke our system, even though the
contract is the same.”
Improve by
Compensation
“When they release a new version
we first want to test our system,
they often break things.”
Improve by
Requirement
“Our stakeholders demand that we
first show it in an End-2-End
environment, with that we
guarantee our quality”
Improve by
Alternatives
CDC Tests
CDC Tests
CDC Tests
ProducerConsumer
Repo
Pull Request
Reveal Unused Interfaces
Well-Fittedness
Costs
Stability
Feedback time
-
-
-
-
-
-
+
-
-
-
+
+
+
+
+
+
+
Maintenance Effort +- +
Complexity
Test Data Setup
Testing Data Semantics
+-
-
+
+
+
E2E Tests CDC TestsMock Tests
Isolation +-
+
+
https://reflectoring.io/7-reasons-for-consumer-driven-contracts/
CDC tools
Minimize Risks
Minimize Risks
Canary release
Router / Load
balancer
Version N
Version N+1
99 %
1 %
Blue/Green deployments
Router / Load
balancer
Blue
Green
production.example.com
production.example.com
test.example.com
11/7/2019 Roy Braam @rbraam
Sources

End-to-End test architectures, a dead End road