6. ●OS differences between CI and local run
●python versions
●selenium and browser versions
●dependencies versions
●environment specific issues
●tools and libraries versions
●...
Possible reasons
7. Docker to the rescue
Docker containers wrap a piece of software in
a complete filesystem that contains
everything needed to run: code, runtime,
system tools, system libraries – anything that
can be installed on a server. This guarantees
that the software will always run the same,
regardless of its environment.
8. Docker
● docker != Virtual Machine like VirtualBox ov VMWare
● docker != configuration management like Chef or Puppet
● Encapsulates an app and all it dependencies including OS
into a single object called container
● Gives portable deployment across machines
● Works on Mac, Linux, Windows
● Multi-container orchestration with docker-compose
21. Headless mode: xvfb
Xvfb or X virtual framebuffer
is a display server which
performs all graphical operations
in virtual memory without
showing any screen output.
28. We are ready for Continuous Integration!
● very few commands to run in CI
● simple agents setup
● easy to maintain dependencies
● clear external services configuration
● the same local and CI envs
● fast dev-loop
● multi-environmental
30. Tips & Tricks: Docker registry
The Registry is a stateless, highly scalable server side
application that stores and lets you distribute Docker images.
You could run your own private registry or use Docker Hub.
31. Tips & Tricks: CI your docker images
1.Put Dockerfiles under version control
2.Create CI plans to build and push images
3.Trigger plans on repo commit
4.Profit
33. Thanks to Docker and Docker-Compose we automated:
● build of application (Dockerfile)
● deploy of a local environment (docker-compose.yml)
● build of a testing image (Dockerfile.test)
● tests execution (docker-compose.test.yml) for an application
Conclusions: 1
34. Advantages of using the docker-compose.test.yml file for testing:
● Automatable: the way a tool executes the docker-compose.test.yml is
independent of the application under test
● Light-weight: hundreds of external services can be deployed on a single
host, simulating complex test environments
● Agnostic: avoid CI provider lock-in, and your tests can run in any
infrastructure and on any OS which supports Docker
● Immutable: tests passing on your local machine will pass in your CI tool
Conclusions: 2