This repository contains the demos of for the Testcontainers presentation.
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.
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
.
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)
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
, runmvn clean package
to build the Docker Image for this app. - From within the
microservices/client
, runmvn clean package
to build the Docker Image for app under test. - Run the test method within
be.rubus.payara.client.testcontainers.IntegrationResourceIT
.