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

Integration testing with Docker

Integration testing with Docker

This deck explains how to use docker for automated tests, using testcontainers library to spin up instances during tests lifecycle.

Talabi Opemipo

September 30, 2023
Tweet

Other Decks in Technology

Transcript

  1. Integration tests? Integration testing is a testing approach where you

    go beyond the scope of a single unit and you start testing the integrations between your components. They are valuable because they mimic your runtime behaviour. DB app app
  2. Docker provides accelerated application development with containers. How it fits?

    You can containerize your test dependencies to work as a component with your app
  3. Testcontainers According to the docs, Testcontainers is a library that

    provides easy and lightweight APIs for bootstrapping local development and test dependencies with real services wrapped in Docker containers.
  4. Testcontainers offer: - No more long running dependencies where you

    have a dedicated instance for running your automated tests - Data access layer integration tests mocking dbs and in-memory database are not close to system reality - No more excessive scripts for tests dependency management