To create a test suite with Gradle:
-I option to apply the plugin. Use the dedicated Create Unit Tests built-in test configuration (you can also create your own test configuration based on it).Example 1:
gradle jtest -Djtest.config="builtin://Create Unit Tests" -I PATH/TO/JTEST/integration/gradle/init.gradle |
Example 2:
In this example, the .properties file and resources are also specified.
gradle jtest -Djtest.config="builtin://Create Unit Tests" -Djtest.settings="jtestcli.properties" -Djtest.includes=**/Money,**/Simple -I PATH/TO/JTEST/integration/gradle/init.gradle |
See the description of the include and includes parameters for details.
Jtest does not support test configurations that combine static analysis or metrics analysis with unit test creation. Unit test creation must be performed as a separate Jtest run from static and metrics analysis. |
You can view the test creation results in the console:
