The following settings allow you to configure automated bulk creation of unit tests, including options for framework and mocking, factory method detection, AI-assisted enhancements and parameterization.
In this section:
This setting enables or disables automatic scanning of all projects for factory methods and searching for updates to factory methods when your project is modified (for example, when you create or delete a Java file or project).
| true | Default. Automatic scanning for factory methods is enabled. |
|---|---|
| false | Automatic scanning for factory methods is disabled. |
This setting specifies the maximum depth of method calls during analysis.
| [number of method calls] | The maximum depth of method calls during analysis. The default is: 10. |
|---|
Example Usage
jtest.uta.execution.monitor.limits.depth=10
This setting specifies the maximum number of sub-method calls from a single method during analysis.
| [number of method calls] | The maximum number of sub-method calls from a single method during analysis. The default is: 100. |
|---|
Example Usage
jtest.uta.execution.monitor.limits.method.calls=100
This setting specifies the maximum number of all method calls during analysis.
| [number of method calls] | The maximum number of all method calls during analysis. The default is: 10000. |
|---|
Example Usage
jtest.uta.execution.monitor.limits.total.calls=10000
This setting enables test generation enhancements. UTA will use LLM to create improved values for variables, create more descriptive test names and descriptions, and attempt to fix failing generated tests. (UTA may create a limited number of failing tests that provide some coverage even though they fail. In this step, UTA uses AI to update the failing tests to make them pass.) To use this functionality, the LLM provider must first be configured (see LLM Provider Settings).
| This feature depends on LLMs, which may produce inaccurate information. |
| true | Default. Test generation enhancements are enabled. |
|---|---|
| false | Test generation enhancements are disabled. |
This setting enables or disables the automatic generation of assertion templates as code comments when a basic test case is created.
| true | Default. The automatic generation of assertion templates as code comments when a basic test case is created is enabled. |
|---|---|
| false | The automatic generation of assertion templates as code comments when a basic test case is created is disabled. |
This setting enables or disables mocking objects during test creation and displaying mocking recommendations after test execution.
| true | Default. Mocking objects is enabled. |
|---|---|
| false | Mocking objects is disabled. |
This setting enables or disables using helper methods.
| true | Using helper methods is enabled. The generated tests classes will separate regular test methods from helper methods that prepare objects but do not make assertions. |
|---|---|
| false | Default. Using helper methods is disabled. |
This setting enables or disables static method and constructor mocking. Mockito inline 3.5+ required when this option is enabled.
| true | Static method and constructor mocking is enabled. UTA will automatically create mocks for all required mockable static methods and/or constructors. UTA will automatically add static mocks to test cases during test creation, or display recommendations that will help you add mocks after your tests are run (see Creating Mocks). The mockStatic() method will be used to mock static methods of a class. For details about the mockStatic() method, see mockStatic. |
|---|---|
| false | Default. Static method and constructor mocking is disabled. |
This setting allows you to exclude certain methods and/or constructors from static mocking.
| [pattern] | Methods and/or constructors excluded from static mocking. Use qualified method names and wildcards (*) to match patterns. The patterns that end with |
|---|
In the following example, the following configuration will be excluded from mocking:
DAO classes in all sub-packages of "com.example".InternalUtil class.jtest.uta.mocking.static.patterns.exclude=*Service.<init> com.example.DAO examples.powermock.InternalUtil.*
This setting allows you to override the excluded pattern specified with the jtest.uta.mocking.static.patterns.exclude setting. UTA will mock specific excluded methods and/or constructors.
| [pattern] | Specific excluded methods and/or constructors which will be mocked. Use qualified method names and wildcards (*) to match patterns. The patterns that end with |
|---|
In the following example, the following configuration will be excluded from mocking:
DAO classes in all sub-packages of "com.example".InternalUtil class.However, the examples.powermock.InternalUtil.createConnection method will still be mocked.
jtest.uta.mocking.static.patterns.exclude=*Service.<init> com.example.DAO examples.powermock.InternalUtil.*
jtest.uta.mocking.static.patterns.include=examples.powermock.InternalUtil.createConnection
This setting allows you to create spring test cases.
| true | Creating spring test cases is enabled. |
|---|---|
| false | Default. Creating spring test cases is disabled. |
This setting specifies where the parametrized test cases are saved.
| Code | Default. The parametrized test cases will be saved as code files directly in your project. |
|---|---|
| CSV | The parametrized test cases will be saved in a CSV file. The CSV format is supported for JUnitParams and JUnit 5 Parameterized test types. CSV supports UTF-8 character encoding. The CSV files are saved in the same folder as your Java files. If the location does not match the resource folder specified by your build system, copy the CSV files to the appropriate location. |
This setting allows you to customize the default list of values for boolean parameters.
| [boolean] | Default: true, false — the two possible boolean values. |
|---|
This setting allows you to customize the default list of values for byte parameters.
| [byte] | Default: 0, 1, -1 — common simple values. Byte.MAX_VALUE — largest byte value (127). Byte.MIN_VALUE — smallest byte value (-128). |
|---|
This setting allows you to customize the default list of values for char parameters (single characters).
| [char] | Default: '*','0','a','Z','(' — symbols, digits, uppercase, and lowercase letters. |
|---|
This setting allows you to customize the default list of values for double parameters.
| [double] | Default: 0.0d, 1d, -1d — basic values. 1.23456e300d, .3333d, 1e1d, 3.14159d — large, fractional, and scientific notation values. Double.MIN_VALUE — smallest positive nonzero value. Double.MAX_VALUE — largest finite double. Double.MIN_NORMAL — smallest positive normal value. -Double.MAX_VALUE — largest negative finite double. |
|---|
This setting allows you to customize the default list of values for float parameters.
| [float] | Default: 0.0f, 1f, -1f — basic values. -1.23e-23f, .3f, 3.14f — fractional and small scientific values. Float.MIN_VALUE — smallest positive nonzero float. Float.MAX_VALUE — largest finite float. Float.MIN_NORMAL — smallest positive normal float. -Float.MAX_VALUE — largest negative finite float. |
|---|
This setting allows you to customize the default list of values for integer parameters.
| [integer] | Default: 0, 1, -1 — simple common values. Integer.MIN_VALUE — smallest integer (-2,147,483,648). Integer.MAX_VALUE — largest integer (2,147,483,647). |
|---|
This setting allows you to customize the default list of values for long parameters.
| [long] | Default: 0L, -1L, 1L — simple values. Long.MAX_VALUE — largest long (9,223,372,036,854,775,807). Long.MIN_VALUE — smallest long (-9,223,372,036,854,775,808). |
|---|
This setting allows you to customize the default list of values for short parameters.
| [short] | Default: 0, -1, 1 — simple values. Short.MAX_VALUE — largest short (32,767). Short.MIN_VALUE — smallest short (-32,768). |
|---|
This setting allows you to customize the default list of values for string parameters.
| [string] | Default: <NULL> — a null string. "" — empty string. " " — string with a single space. "hello world" — simple text. "01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" — Long numeric string |
|---|
This setting enables or disables creating parameterized test cases to test methods against different arguments. Test templates will be created for individual methods. The generated templates need to be manually modified and completed with parameterization data.
Test parametrization is supported for JUnit 4 and 5. UTA generates parameterized tests using the testing framework and parameterization type configured using the |
| true | Creating parameterized test cases is enabled. |
|---|---|
| false | Default. Creating parameterized test cases is disabled. |
This setting allows you to specify the framework for creating parameterized test cases. It is required, if JUnit 4 is specified as jtest.uta.testing.framework.
| JUnitParams | Default. JUnitParams framework will be used to create parameterized test cases. |
|---|---|
| JUnit4Parametrized | JUnit4Parametrized framework will be used to create parameterized test cases. |
This setting specifies the maximum number of parameter sets that will be created for one test case.
| [number] | The maximum number of parameter sets that will be created for one test case. The default is 5. |
|---|
jtest.uta.parameterized.parameter.set.count=5
This setting enables or disables creating unit tests for private methods.
| true | Creating unit tests for private methods is enabled. |
|---|---|
| false | Default. Creating unit tests for private methods is disabled. |
This setting enables or disables displaying recommendations for additional threads which may impact the state of your test after test execution.
| true | Displaying recommendations for additional threads is enabled. |
|---|---|
| false | Default. Displaying recommendations for additional threads is disabled. |
This setting enables or disables displaying recommendations for inaccessible fields that have been modified during execution and generating assertion templates after test execution.
| true | Default. Displaying recommendations for inaccessible fields is enabled. |
|---|---|
| false | Displaying recommendations for inaccessible fields is disabled. |
This setting enables or disables displaying recommendations for files that were created during the test run, but were not removed after execution.
| true | Displaying recommendations for files that were created during the test run, but were not removed after execution, is enabled. |
|---|---|
| false | Default. Displaying recommendations for files that were created during the test run, but were not removed after execution, is disabled. |
This setting enables or disables displaying recommendations for calls to mock objects that can be modified to ensure proper test isolation.
| true | Default. Displaying recommendations for calls to mock objects that can be modified to ensure proper test isolation is enabled. |
|---|---|
| false | Displaying recommendations for calls to mock objects that can be modified to ensure proper test isolation is disabled. |
This setting enables or disables displaying recommendations when no assertions have been made after test execution.
| true | Default. Displaying recommendations when no assertions have been made is enabled. |
|---|---|
| false | Displaying recommendations when no assertions have been made is disabled. |
This setting enables or disables displaying recommendations for system properties that were modified during the test run, but not restored after execution.
| true | Displaying recommendations for additional threads system properties that were modified during the test run, but not restored after execution is enabled. |
|---|---|
| false | Default. Displaying recommendations for system properties that were modified during the test run, but not restored after execution is disabled. |
This setting enables or disables displaying recommendations for root causes of bulk test failures that share a common exception or issue, indicating potential setup problems within the project.
| true | Displaying recommendations for potential setup problems is enabled. |
|---|---|
| false | Default. Displaying recommendations for potential setup problems is disabled. |
This setting enables or disables displaying recommendations when static fields have been modified during test execution.
| true | Displaying recommendations when static fields have been modified during test execution is enabled. |
|---|---|
| false | Default. Displaying recommendations when static fields have been modified during test execution is disabled. |
This setting enables or disables displaying recommendations for calls to mockable static methods or constructors based on the specified mocking configuration.
| true | Displaying recommendations for calls to mockable static methods or constructors is enabled. |
|---|---|
| false | Default. Displaying recommendations for calls to mockable static methods or constructors is disabled. |
This setting enables or disables displaying recommendations for uncovered blocks of code after test execution.
| true | Displaying recommendations for uncovered code is enabled. |
|---|---|
| false | Default. Displaying recommendations for uncovered code is disabled. |
This setting allows you to specify the package and class name pattern for tests.
| [pattern] | The package and class name pattern for tests. The default pattern of "
For tests that are not Spring or parameterized tests, the |
|---|
This setting allows you to specify the root directory where tests created with UTA are saved.
| [path] | The path to the directory where tests created with UTA are saved. By default, the project's settings are read to determine where tests should be saved. If the project does not specify where tests are located, then either update your project's configuration so a test source folder is specified, switch to one of the predefined patterns, or create a pattern manually using the following variables: |
|---|
jtest.uta.test.source.folder=${project_name}/tests
This setting allows you to specifies test templates which will be used to control the structure of test classes in order to specify common configurations that are required for your particular tests.
| [template name] | Test templates to be used for your tests. |
|---|
jtest.uta.test.templates=ParasoftCUSTOM
This setting specifies which template will be used for the quick add actions.
| [template name] | The template that will be used for the quick add actions (non-bulk creation). |
|---|
jtest.uta.test.templates.active=ParasoftCUSTOM
This setting allows you to specify the testing framework UTA will use to create new tests.
| JUnit 4 | Default. JUnit 4 testing framework will be used to create new tests. |
|---|---|
| JUnit 5 | JUnit 5 testing framework will be used to create new tests. |
This setting enables or disables specifying a time limit for executing a test suite. The time limit can be set with the jtest.uta.timeout.time option. If the time limit is exceeded, the test execution will stop, the test suite will fail, and the information about the error will be displayed as a Recommendation in the UTA interface.
| true | Default. Specifying a time limit for executing a test suite is enabled. |
|---|---|
| false | Specifying a time limit for executing a test suite is disabled. |
This setting allows you to specify the time limit (in milliseconds) for executing a test suite if the jtest.uta.timeout.enabled option is set to true. If the time limit is exceeded, the test execution will stop, the test suite will fail, and the information about the error will be displayed as a Recommendation in the UTA interface.
| [seconds] | The time limit for executing a test suite. The default is 5000 milliseconds. |
|---|
jtest.uta.timeout.time=5000
This setting enables or disables adding only test cases that increase coverage during bulk creation.
| true | Default. Only test cases that increase coverage will be added during bulk creation. |
|---|---|
| false | All test cases are added during bulk creation, regardless of coverage increase. |