Docker
fast dev faster testing
Why this enthusiasm?
This means...
37 vs. 536
Running on a 16 gb ram server...
Also...
Integration tests
1. First level of testing that validates layers / integration
between them
2. Perhaps the most valuable tests for dev
3. Runs in mins
4. Environment is smaller, controlled than a E2E
5. Runs on every developer laptop
Component
Under Test
Test
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 tests
Faster 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
Benefits
1. Decoupled test infrastructure from test suite
2. Core developers maintain the infra. Others just use it
3. 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

Docker - fast dev faster testing

Editor's Notes

  • #4 source: https://insights.ubuntu.com/2015/06/11/how-many-containers-can-you-run-on-your-machine/
  • #5 quickly start up containers. efficiency gain.
  • #6 Source: http://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • #7 Some dependencies are mocked. Typically needs JBoss container with DPS + Model Service + YMER + Versant Setup time is in minutes Runs in seconds to minutes
  • #8 Source: http://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • #9 Source: http://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • #10 Source: http://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • #11 Source: http://googletesting.blogspot.com/2015/04/just-say-no-to-more-end-to-end-tests.html
  • #12 Most if not all dependencies are mocked. No Container Setup time is in millis Runs in millis
  • #13 demo integration tests and ENM on a laptop.