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

Cloud Integration Testing Made easy with LocalStack and Testcontainers

Cloud Integration Testing Made easy with LocalStack and Testcontainers

Cloud Integration Testing Made Easy with LocalStack and Testcontainers used on 31st of August 2023 in the LocalStack Community virtual meetup.

Anca Ghenade

August 31, 2023

More Decks by Anca Ghenade

Other Decks in Programming


  1. 1. The Software Ninjas are tasked with developing a new

    web application on AWS Cloud 2. Developing on a local machine, they soon find out that there are lots of dependencies with resources in the cloud How it goes…
  2. 3. They realize that the dev & test loop is

    extremely slow and tedious. Every local change needs to be packaged and uploaded to the cloud for testing. 4. Now the Software Ninja has a red build on their feature branch, but can’t efficiently test and debug their code in the CI/CD pipeline.
  3. 5. The whole team is using Git flow for development

    - one CI build per feature branch. There is an explosion of different environments required for development (branches x developers). 6. The Ninja manager approaches the team and complains that AWS dev/test resources are not being cleaned up properly causing cost spikes.
  4. How much of your system you can test Cloud emulation

    Full cloud emulation with service integration 3 Staging environments Highest fidelity because it actually runs in the cloud 4 Mocking Mock out cloud APIs 1 Service emulation Replace individual services with local versions 2 What about all the important testing?
  5. So how can we bring the ease and speed of

    unit tests into these integration tests?
  6. Use a waiter to make sure your Lambdas are in

    state ACTIVE and not just created.
  7. Use this nifty configuration to scan the LocalStack logs and

    make sure your instance is in the right state before the tests are allowed to start:
  8. &

  9. Q&A