Testing REST API integrations in Micronaut apps using WireMock
もくじ
Learn how to create a Micronaut application that integrates with
external REST APIs, then test those integrations using WireMock
and the Testcontainers WireMock module.
Time to complete
20 分
In this guide, you'll learn how to:
- Create a Micronaut application that talks to external REST APIs
- Test external API integrations using WireMock
- Use the Testcontainers WireMock module to run WireMock as a Docker container
Prerequisites
- Java 17+
- Maven or Gradle
- A Docker environment supported by Testcontainers
メモIf you're new to Testcontainers, visit the Testcontainers overview to learn more about Testcontainers and the benefits of using it.
モジュール
- Create the project
Set up a Micronaut project with an external REST API integration using declarative HTTP clients.
- Write tests
Test external REST API integrations using WireMock and the Testcontainers WireMock module.
- Run tests
Run your Testcontainers WireMock integration tests and explore next steps.