You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Egor Vasilyev edited this page Dec 28, 2022
·
2 revisions
Reproducible environment
It's available to download docker image with the environment for UTBot. The environment is also used in the crucial CI scripts focused on building project and running tests.
The docker image pre-installed environment includes:
Java 11
Gradle 7.4.2
Kotlin compiler 1.7.10
It's based on Ubuntu focal (20.04).
How to install Docker
Using reproducible environment requires Docker installed.
The detailed information of how to install Docker can be found on the official site.
How to run tests in docker container
Do the following steps to run tests in docker container:
# -v <utbot-repository-root>:/usr/utbot - mounts the host directory into the container directory# -it - make the container look like a terminal connection session# -w /usr/utbot - sets up working directory inside the container
docker run -it -v <utbot-repository-root>:/usr/utbot--name utbot-tests -w /usr/utbot unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
Do whatever you want
Build UTBot and run tests:
gradle clean build --no-daemon
Build UTBot without running tests:
gradle clean build --no-daemon -x test
Run tests for utbot-framework project CustomerExamplesTest class:
# -v <utbot-repository-root>:/usr/utbot - mounts the host directory into the container directory# -it - make the container look like a terminal connection session# -w /usr/utbot - sets up working directory inside the container# -p 5005:5005 - mounts the host port into the container port (debugging port)
docker run -it -p 5005:5005 -v <utbot-repository-root>:/usr/utbot --name utbot-debug -w /usr/utbot unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0