Docker - fast dev faster testing
-
Upload
guilherme-pires -
Category
Documents
-
view
86 -
download
0
Transcript of Docker - fast dev faster testing
Dockerfast dev faster testing
Why this enthusiasm?
This means...
37 vs. 536
Running on a 16 gb ram server...
Also...
Integration tests1. First level of testing that validates layers /
integration between them2. Perhaps the most valuable tests for dev3. Runs in mins4. Environment is smaller, controlled than a E2E5. Runs on every developer laptop
Component Under TestTest
Dependency A
Mocked Dependency
B
Integration test anatomy
Layer1 Layer2 JBoss DB
But there are many many challenges….
It works only on my machine!
They are too slow to run
Why so slow?
Infrastructure / deployment Execution
99% 1%
DBJboss
A proposal: Docker images
Cache
Network Simulator
Better integration testsFaster setup, easier to develop ⇒ test cycle.
Everything runs on your laptop, but everything is disposable: when the tests are over you just kill the containers. When you want them back, they come fresh.
Same tests will run on Jenkins after a commit
Single command brings it all
docker-compose up
Benefits1. Decoupled test infrastructure from test suite2. Core developers maintain the infra. Others just use
it3. Standard environment. Runs on CI!4. Tests run faster. More tests run throughout the day
“At the end of the day, you become a better developer. There is no magic. The container’s recipes
are on your laptop. They are code.”
Quick demo...
Discussions
“Simplicity is the ultimate sophistication.”Leonardo Da Vinci