Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DockerCon EU 2018: How Docker Changed the Way W...

DockerCon EU 2018: How Docker Changed the Way We Test Our Software

Sergei Egorov

December 04, 2018
Tweet

More Decks by Sergei Egorov

Other Decks in Programming

Transcript

  1. “If I had an hour to solve a problem 


    I'd spend 55 minutes thinking about the problem 
 and 5 minutes thinking about solutions.” — Albert Einstein
  2. “If I had an hour to fix a bug 


    I'd spend 55 minutes writing a test 
 and 5 minutes fixing the issue.” — Me
  3. Software testing Integration
 Testing System
 Testing Sanity
 Testing Acceptance
 Testing

    Regression
 Testing UI
 Testing Unit
 Testing Smoke
 Testing
  4. • Fast • Simple • Catches bugs in the logic

    • Checks algorithms Unit testing
  5. • Powerful • Challenging • Starts real databases • Catches

    bugs in integrations • Checks assumptions about other systems Integration testing
  6. • Powerful • Challenging • Starts real databases • Catches

    bugs in integrations • Checks assumptions about other systems Integration testing
  7. Integration testing transformation Mocking Local DBs VMs • Vagrant to

    the rescue • Slow • Port management is hard • Heavyweight images
  8. Testcontainers •http://testcontainers.org •Library instead of a tool −Throwaway instances of

    common databases, Selenium web browsers, or anything else that can run in a Docker container. −Takes care of not just starting, but also running & destroying your test’s dependencies. −Very robust environment discovery (Linux, Windows, Mac OS X, CI environments, Docker in Docker, etc) •OSS project −Originally created by Richard North −MIT licensed −A vibrant community of the testing-oriented people. •JVM first −Initially implemented as a Java library −Community-contributed ports: C#, Golang, NodeJS, Python, Rust −Plans to share the implementation between the languages