Integration Testing With Docker Compose
Integration testing is often a difficult venture, especially when it comes to distributed systems. Even if you’re building a monolithic app you probably need to spin up a database to do integration testing. It’s also the kind of thing that’s simple to do early on, but gets exponentially harder as the codebase expands. Thankfully Docker Compose gives us the ability to do integration testing in any environment that runs docker. Let’s say you’re staring with a monolithic setup, you’ve got one server and one database. Maybe you build the app server and database from source like it’s 1999, or maybe you use brew install to get all of your dependencies resolved. But at the end of the day your system looks like this. The endpoint you’d like to test is /create and all it should do is store a some data in the database. Seems simple enough. So you write a bash script that CURLs and endpoint, and then queries the database (exit 0 for OK, exit 1 for FAIL). It’s easy AND most importantly it works. B
Integration Testing With Docker Compose Harrison Harnisch Blog Speaking Wiki About 19 June 2016 Categories Docker Testing Integration Testing With Docker Compose Integration testing is often a difficult venture, especially when it comes to distributed systems. Even if you’re building a monolithic app you probably need to spin up a database to do integration testing. It’s also the kind of thing that’s simple to do early on, but gets exponentially harder as the codebase expands. Thankfully Docker Compose gives us the ability to do integration testing in any environment that runs docker. Getting
Explore this link on the map →related reading
- Getting Startedtestcontainers.com
- Testing robotics systems in fast-paced startups | Michael Jae-Yoon Chungmjyc.github.io
- A Docker Tutorial for Beginnersdocker-curriculum.com
- Understanding Docker Networking - Earthly Blogearthly.dev
- Training Materialscontainer.training
- Software Engineering at Googleabseil.io
- Unit and Integration Testsmatklad.github.io
- How does Docker work? A Technical Deep Diving | Mediummedium.com
- Test Organization - The Rust Programming Languagedoc.rust-lang.org
- My personal reasons to not run my Nginx reverse-proxy inside Docker - Ewald Benesewaldbenes.com
- Running Airflow Locally with Docker: A Technical Guidestackabuse.com
- End-to-end and component testing in Cypress | Cypress Documentationdocs.cypress.io