Unit Test Creation Overview

Unit tests can be autonomously generated within CI/CD pipelines and from the CLI. They can be created with Maven or Gradle using a dedicated Create Unit Tests configuration. You can specify the scope of test generation using pattern-based selection and filters based on source control integration.

During this operation, tests are created and updated in your project repository. We recommend configuring version control beforehand to simplify reviewing and managing changes. By default, bulk test creation in the CLI requires your project to be under source control. To disable this requirement, set the jtest.project.allowNoSourceControl property to true. Note that without source control, you will not be able to revert changes to your tests.

To run bulk test creation in the CLI:

  1. Ensure that all prerequisites for unit test creation are met. See Unit Testing Requirements.
  2. Create .properties files specifying local settings and/or test configuration settings. See Unit Test Creation Configuration.
  3. Integrate with your build system and create unit tests. See Running Unit Test Creation.