Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docker for UTBot Java

Egor Vasilyev edited this pageDec 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:

  1. Java 11
  2. Gradle 7.4.2
  3. 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 theofficial site.

How to run tests in docker container

Do the following steps to run tests in docker container:

  1. Pull docker image
docker pull unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
  1. 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
  1. 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"
  1. Exit container
exit

How to debug UTBot in docker container

Do the following steps to debug UTBot in docker container:

  1. Set up configuration for remote debug in IntelliJ IDEA

Run/Debug ConfigurationsAdd New Configuration → ChooseRemote JVM Debug → Set upConfiguration nameOk

  1. Pull docker image
docker pull unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
  1. 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
  1. Set up gradle options for remote debug:
export GRADLE_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
  1. Start building and running tests
gradle clean build --no-daemon
  1. Attach in IntelliJ IDEA to the gradle process in the container

Set upbreakpoints wherever you want →Run newConfiguration inDebug mode

  1. Exit container
exit

User guides

IntelliJ IDEA plugin

Contributor guides

(redirect to/docs inmain repo)

General info

Continuous integration

Design docs

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp