https://github.com/neiljbrown/testcontainers-examples
A collection of code examples that demonstrate using the Testcontainers Java library to aid writing integration tests for Java code that integrates with infrastructure such as RDBMS', message brokers, etc.
https://github.com/neiljbrown/testcontainers-examples
docker testcontainers testing
Last synced: 2 months ago
JSON representation
A collection of code examples that demonstrate using the Testcontainers Java library to aid writing integration tests for Java code that integrates with infrastructure such as RDBMS', message brokers, etc.
- Host: GitHub
- URL: https://github.com/neiljbrown/testcontainers-examples
- Owner: neiljbrown
- Created: 2020-10-31T15:08:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-31T15:17:41.000Z (over 5 years ago)
- Last Synced: 2025-05-30T13:46:37.028Z (about 1 year ago)
- Topics: docker, testcontainers, testing
- Language: Java
- Homepage:
- Size: 84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Testcontainers Examples
:toc:
:sectlinks:
:sectnums:
:sectnumlevels: 4
:toclevels: 4
== Purpose
This Git repo contains a collection of code examples that demonstrate using the
https://www.testcontainers.org/[Testcontainers Java library] to aid the task of writing integration tests for Java code
that integrates with infrastructure such as RDBMS', message brokers, etc.
Testcontainers simplifies the task of writing highly realistic, out-of-process integration tests by automating the
launching of (Docker) containers containing real, production implementations of infrastructure, and synchronising the
lifecycle (startup and shutdown) of these containers with the lifecycle (setup and tear-down) of JUnit tests.
The repo contains a number of folders each corresponding to a separate project containing its own collection
of related code examples. The projects are listed and summarised below by folder name.
== mysql-dao-integration-test
This folder contains a Java/Gradle project containing examples of how to use Testcontainers to support writing an
integration test between a Data Access Object (DAO) and a MySQL database. Testcontainers is used to launch a real,
MySQL DB server in a container and create & initialise the application's database. These examples are implemented using
Java alone, without any application framework (e.g. Spring) support, with a view to fully illustrating how an
application's test code integrates with the Testcontainers library, and the library's APIs. See the project's own
README for more details.
End.