To create a test suite with Maven:

  1. Ensure that the Jtest Plugin for Maven is set up (see Configuring the Jtest Plugin for Maven).
  2. Ensure that unit test creation is properly configured (see Unit Test Creation Configuration).
  3. Execute the jtest:jtest goal on your project using the dedicated Create Unit Tests built-in test configuration (you can also create your own test configuration based on it).

Example 1:

mvn jtest:jtest -Djtest.config="builtin://Create Unit Tests"

Example 2:

In this example, the .properties file and resources are also specified.

mvn jtest:jtest
   -Djtest.config="builtin://Create Unit Tests"
   -Djtest.settings="jtestcli.properties"
   -Djtest.includes=**/Money,**/Simple

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: