https://github.com/backbase/working-with-testcontainers
Integration test example using Testcontainers, Spring Boot, MySQL, Kafka, Backbase events.
https://github.com/backbase/working-with-testcontainers
Last synced: 9 months ago
JSON representation
Integration test example using Testcontainers, Spring Boot, MySQL, Kafka, Backbase events.
- Host: GitHub
- URL: https://github.com/backbase/working-with-testcontainers
- Owner: Backbase
- Created: 2024-04-10T13:31:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T08:10:04.000Z (about 2 years ago)
- Last Synced: 2025-10-02T01:24:21.119Z (9 months ago)
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# working-with-testcontainers
Integration test example using Testcontainers, Spring Boot, MySQL, Kafka, Backbase events.
## Prerequisites
* Java 21+
* Maven
* Your favorite IDE
* A docker environment supported by [testcontainers](https://java.testcontainers.org/supported_docker_environment/).
## Test scenario
Let’s consider the following scenario: We have a product that will be stored in MySQL database. We are going to update it on a received event from Kafka.
## Usage
To generate source event from [json file](src/main/resources/events/product-price-changed-event.json): `mvn jsonschema-events:events-generation -f pom.xml`
Run example of the [test file](https://github.com/Backbase/working-with-testcontainers/blob/main/src/test/java/com/backbase/testcontainers/ProductPriceChangedEventHandlerTest.java)
## Resources
* [Testcontainers documentation](https://testcontainers.com/)
* [Backbase events](https://backbase.io/developers/documentation/backend-devkit/17.0.0/reference/libraries/events/)