Skip to content
Fresh

Run tests

Back

Guides

Testing AWS service integrations using LocalStack

Learn how to create a Spring Boot application with Spring Cloud AWS, then test S3 and SQS integrations using Testcontainers and LocalStack.

Java Testing with Docker

25 minutes

1

Create the project

2

Write tests

3

Run tests

« Back to all guides

Run tests and next steps

Copy as Markdown

Open MarkdownAsk Docs AIClaudeOpen in Claude

Table of contents


Run the tests

console
$ ./mvnw test

Or with Gradle:

console
$ ./gradlew test

You should see the LocalStack Docker container start and the test pass. After the tests finish, the container stops and is removed automatically.

Summary

LocalStack lets you develop and test AWS-based applications locally. The Testcontainers LocalStack module makes it straightforward to write integration tests by using ephemeral LocalStack containers that start on random ports with no external setup required.

To learn more about Testcontainers, visit the Testcontainers overview.

Further reading