Adopting Testcontainers for local development

Local development and testing are significant for engineers who wish to ship confidently onto production environments. Test-driven development (TDD) has been adopted as an essential practice to enforce that and ensure that every code change is validated locally and on CI. This is where we arrive at the Testcontainers libraries that support your tests, providing lightweight, ephemeral instances of common databases, message brokers, web browsers, or anything else that can run in a Docker container. With Testcontainers, available in different popular languages: Java, Go, .NET, JavaScript/Typescript, and Python, you can replicate the production environment on your local machine and test everything (including AWS APIs powered by LocalStack)! Testcontainers ensure that the data access layer, user interface, and application are tested well at each step. In this session, we have looked at Testcontainers and how to adopt them to develop our applications locally and run our integration tests while using LocalStack to provision cloud resources inside a Docker container before pushing your application to production! In the end, we have also discussed how LocalStack and the Java version of Testcontainers play nicely with each other and wind up with updates about the all-new LocalStack release!

Related Talks

No More Black Boxes: Observable Local AWS Dev with LocalStack App Inspector

You've been there: Lambda triggers, SQS messages fly, Step Functions execute, and somewhere in the middle, something breaks. You have no idea what triggered what, what payload was passed, or where it all went wrong.

That's the black box problem of AWS development.

Once your architecture grows beyond a single service, visibility disappears fast. You're left stitching together scattered logs and redeploying just to see what's going on.

App Inspector is LocalStack's built-in observability layer that opens up that black box. It gives you a real-time, unified view of every service interaction happening inside your local cloud: what triggered what, with what payload, in what order.

In this talk, we'll walk through what App Inspector is, how it fits into your LocalStack workflow, and how to use it to catch bugs locally before they ever reach staging or production.

Learn More
Learn More
Test Your Cloud Like You Mean It: Integrating Testcontainers and LocalStack

You’ve been there: Your Unit tests pass both locally and in CI. You deploy with confidence. You thought.. Then staging in the real cloud reveals the truth—bugs that only show up with actual RDS parameter settings, real SQS and SNS throughput limits, or Lambda and API Gateway behaviour your local mocks never captured.

The solution is Testcontainers.

Testcontainers is a testing library that provides easy and lightweight APIs for bootstrapping integration tests with real services wrapped in Docker containers. Using Testcontainers, you can write tests talking to the same type of services you use in production without mocks or in-memory services. Spin them up, run migrations, execute your Node.js service against them, assert results, auto-cleanup.

Learn More
Learn More
Why local AWS environments are faster, easier, & more efficient

So many of the challenges that slow down software development stem from the fact that early-stage dev & test cycles are performed in cloud environments.

Local cloud development removes these challenges.

By simulating AWS application behavior in a local container, the local cloud enables developers and agents to validate the security, quality, and reliability of their applications faster and more effectively than they can on the cloud.

Learn More
Learn More

Launch yourself in the world of local cloud development

Try for free
Try for free
Talk to Sales
Talk to Sales