This demo is a reference implementation for TCI.
It represents a Spring Boot Application with a Database and OIDC authentication that is tested using Selenium. There are also test that validate the database migrations and queries.
The most interesting project is probably webapp-it which contains the integration tests for the WebApp.
Tip
Pre defined launchers exist for running the app and the integration tests.
tci-*
are TestContainer Infrastructure projects (used inside the integration tests)*-it
are IntegrationTest projects- All other projects are used for the webapp at compile time
- PreStarting:
Can be seen when enabling it using-Dinfra-pre-start.enabled=1
or by running the corresponding launchers - LazyNetwork:
Search for it insideBaseTest
. Can also be observed usingdocker network ls
while running tests. - Safe starting of named containers:
Is integrated insideTCI
. Parts of it only kick in on unexpected container start errors. Can also be observed during tests (with e.g.docker stats
) as it names the containers. - Container leak detection:
Only kicks in when you forget to stop infrastructure after a test. Can be manually reproduced by commenting out the correspondingTCI#stop
methods. - Tracing:
Seen at the end of each test inside the logs.