...
- Ensure that the Jtest Plugin for Gradle is set up (Configuring the Jtest Plugin for Gradle).
Execute Gradle tasks in the following order:
- the jtest-agent task
- thetest
(orbuild
) task to ensure that unit tests are executed
- the jtest task
Your command line may resemble the following:Code Block gradle clean jtest-agent test jtest -Djtest.config="builtin://Unit Tests"
We recommend using the jtest-agent task for collecting coverage. Offline instrumentation with the jtest-instument task is deprecated.
If your build script specifies JVM arguments, ensure they do not override other JVM arguments.
...
If you perform test impact analysis multiple times in same local environment, add the
--no-daemon
option to your command line.
Integrating with the Test Impact Analysis Plugin
The init.gradle
script shipped with Jtest allows you to integrate the test impact analysis plugin with Gradle – without having to modify your Gradle build script. To integrate Gradle with the plugin, pass the location of the the init.gradle
script with the -I
option to your command line:
...