Skip to content
A workbench project to demonstrate how to write UI tests in a Spring Boot 2 application using Selenium and a headless Chrome running in a Container.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle
src
.gitignore
LICENSE
README.adoc
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.adoc

Testcontainers Workbench

This workbench demonstrates how to write UI tests for Spring Boot 2 applications using Selenium and a headless Chrome, that is running in a container provided by the Testcontainers library.

…​ what it’s doing

The Spring Boot 2 application itself consists of two pages. On the first page a name is entered into a form and printed back on the second page.

…​ how it’s build

The project is using Gradle as build tool.

…​ how it’s run

Note
Please note that the combination of testcontainers and Spring Boot 2 is not fully compatible with Java 9+ and will throw a IllegalAccessException at startup. However the test will still run.

The application can be started by ./gradlew clean bootRun. After the startup finished, the form can be accessed at http://localhost:8080.

However since this workbench project is more about the test setup you will more likely run the tests. This can be accomplished by ./gradlew clean check. For demonstration purpose the output of the test execution will be shown.

After the test you will find a video showing the test.

You can’t perform that action at this time.