Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rdebusscher/testcontainers-demo
Demo for the Testcontainers presentation
https://github.com/rdebusscher/testcontainers-demo
Last synced: about 2 months ago
JSON representation
Demo for the Testcontainers presentation
- Host: GitHub
- URL: https://github.com/rdebusscher/testcontainers-demo
- Owner: rdebusscher
- License: apache-2.0
- Created: 2019-12-11T12:54:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T02:25:37.000Z (over 2 years ago)
- Last Synced: 2023-04-03T18:53:44.385Z (almost 2 years ago)
- Language: Java
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Testcontainers demo
This repository contains the demos of for the Testcontainers presentation.
### Requirement
You need to have a Docker client installation which points to a valid Docker Environment. For more information, have a look at [Testcontainers Docker prerequisite page](https://www.testcontainers.org/supported_docker_environment/).
## demos
### Plain
This example shows how you can test an application endpoint which reads from a database.
Steps
- Run `mvn clean package` to build the Docker Image with the test application.
- Run the test method within `be.rubus.payara.testcontainers.plain.PersonResourceTest`.### MicroShed
This examples shows you the basic setup with MicroShed testing using the Payara Micro plugin.
Steps
- Run `mvn clean package` to build the Docker Image with the test application.
- Run the test method within `be.rubus.payara.testcontainers.microshed.HelloWorldResourceIT`.
- Run the test method within `be.rubus.payara.testcontainers.microshed.DataResourceIT`. (uses JSON mapping)### MicroServices
This examples shows you how you can test a micro-service (client) which depends on another micro-service (server)
Steps
- From within the `microservices/server`, run `mvn clean package` to build the Docker Image for this app.
- From within the `microservices/client`, run `mvn clean package` to build the Docker Image for app under test.
- Run the test method within `be.rubus.payara.client.testcontainers.IntegrationResourceIT`.