- Notifications
You must be signed in to change notification settings - Fork45
Docker for UTBot Java
Egor Vasilyev edited this pageDec 28, 2022 ·2 revisions
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).
Using reproducible environment requires Docker installed.
The detailed information of how to install Docker can be found on theofficial site.
Do the following steps to run tests in docker container:
- Pull docker image
docker pull unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0- Run 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 containerdocker 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 forutbot-framework projectCustomerExamplesTest class:
gradle :utbot-framework:test --no-daemon --tests "org.utbot.examples.collections.CustomerExamplesTest"- Exit container
exitDo the following steps to debug UTBot in docker container:
- Set up configuration for remote debug in IntelliJ IDEA
Run/Debug Configurations →Add New Configuration → ChooseRemote JVM Debug → Set upConfiguration name →Ok
- Pull docker image
docker pull unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0- Run 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# -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
- Set up gradle options for remote debug:
export GRADLE_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005- Start building and running tests
gradle clean build --no-daemon- Attach in IntelliJ IDEA to the gradle process in the container
Set upbreakpoints wherever you want →Run newConfiguration inDebug mode
- Exit container
exit- Check system requirements
- Install or update plugin
- Generate tests with default configuration
- Fine-tune test generation
- Get use of test results
(redirect to/docs inmain repo)
- Contributing guide
- Developer guide
- Naming and labeling conventions
- Interprocess debugging
- Interprocess logging
- UnitTestBot overall architecture
- Android Studio support
- Assumption mechanism
- Choosing language-specific IDE
- Code generation and rendering
- Fuzzing Platform (FP) Design
- Instrumented process API: handling errors and results
- UnitTestBot JavaScript plugin setup
- Night statistics monitoring
- RD for UnitTestBot
- Sandboxing
- UnitTestBot settings
- Speculative field non-nullability assumptions
- Symbolic analysis of static initializers
- Summarization module
- Taint analysis
- UnitTestBot decomposition
- UtUtils class
- UnitTestBot Family changes