1 of 14

Make Tests Fast Again

Parallel Tests With Docker Containers

Rohit Joshi

CloudFactory

https://www.linkedin.com/in/rohitrox/

2 of 14

3 of 14

An important part of a

good development experience

is

a fast feedback loop from the tests.

4 of 14

5 of 14

Create Flexible and Replicable

test environment that enables us to

run tests in parallel.

6 of 14

  • We want to run our group of tests in very isolated so that running one test doesn’t give other tests any side effects.
  • We don’t want to install too much external dependencies
  • We want to be developer friendly
  • We want to be reliable/consistent and configurable
  • Runnable in our local machine and in CI servers

7 of 14

parallel-tests

Virtual Machines

knapsack

Existing Solutions

8 of 14

9 of 14

Containers…

​

  • Create replicable environments
  • Run code in isolation
  • Build consistent build environments across many builds
  • Multiple tests in multiple containers

10 of 14

  • Docker Compose
  • Docker registry
  • Docker for Mac/Windows/Ubuntu

TOOLS

11 of 14

The Basic Concept

12 of 14

DEMO

​

13 of 14

Runner Script

14 of 14

QUESTIONS...