This task scans the build to generate settings for the Jtest Java Agent, and creates a monitor package in location specified with the monitorLocation parameter. The monitor package contains the following: - static_coverage.xml - the file that contains static coverage information
- agent.jar - the Jtest Java coverage agent jar archive
- agent.properties - the agent settings file that contains scope parameters generated during the build process and other attributes
- agent.sh/agent.bat - the script that generates the Jtest Java agent VM arguments necessary to monitor the application
- opentelemetry-javaagent.jar and jtest-otel-ext.jar - files used in multiuser coverage mode: the original OpenTelemetry Java agent and the Jtest extension for it. This extension collects data necessary to assign collected coverage to a particular user. The files are copied from the
<INSTALL_DIR>/integration/coverage directory.
| Info |
|---|
| icon | false |
|---|
| title | Command Line Execution |
|---|
| Ensure that tests and classes are compiled before executing the jtest:monitor goal from command line (the compile phase). To collect static coverage, setting debug="true" is required for a compilation task. |
Attributes| Name | Accepted values/ data type | Description | Required |
|---|
| agentServerEnabled | true | false | A switch that allows you to enable the Agent server. Default value is: true User property is: jtest.agentServerEnabled | No | | autostartAgent | true | false | A switch to automatically enable collecting coverage. Default value is: true User property is: jtest.autostartAgent | No | | compilation | Configuration | A description of manual configuration data (see Manual Customization of Compilation Data) | No | | coverage |
| A set of parameters that allow you to configure collecting coverage. jtest.coverage.skip - Disables collecting coverage.jtest.coverage.includes - <Glob> patterns to include classes. Coverage information will be collected.jtest.coverage.excludes - <Glob> patterns to exclude classes. Coverage information will not be collected.jtest.coverage.testIncludes - <Glob> patterns to include test classes. Test cases will be assigned with coverage.jtest.coverage.testExcludes - <Glob> patterns to exclude test classes. Test cases will not be assigned with coverage.
| No | | exclude | String | Specifies a subset of files or packages from the selected resources that will be excluded from analysis. You can provide the qualified names, or use Ant glob patterns to match more filenames. User property is: jtest.exclude | No | | excludes |
| A list of exclude parameters. User property is: jtest.excludes | No | | home | Path | Specifies the Jtest installation directory. If not defined, the Jtest location specified on PATH will be used. User property is: jtest.home | Recommended | | ignoredIds | List | A list of ignored compilation IDs. User property is: jtest.ignoredids | No | | include | String | Specifies a subset of files or packages form the selected resources that will be included during analysis. User property is: jtest.include | No | | includes |
| A list of include parameters. User property is: jtest.includes | No | | monitorLocation | Path | The path to the location where the monitor package will be created. Default value is: ${project.build.directory}/jtest/monitor/monitor.zip User property is: jtest.monitorLocation | No | | publish | true | false | Enables reporting results of local analysis to the DTP server. User property is: jtest.publish | No | | report | Path | Specifies the directory where the report will be created. User property is: jtest.report | No | | resource | String | Specifies the input scope for analysis. If no resources are specified, Jtest will analyze resources from every built project. User property is: jtest.resource | No | | resources | List | A list of resource parameters. User property is: jtest.resources | No | | settings | Path | An absolute or relative path to the *properties file that includes custom configuration settings. User property is: jtest.settings | No | | settingsList | List | A list of settings parameters. User property is: jtest.settingsList | No | | showDetails | true | false | Displays detailed progress information. User property is: jtest.showdetails |
| | showSettings | true | false | Prints the current settings and customizations along with the information where each of them is configured (e.g. in the jtest.properties file). User property is: jtest.showsettings | No | | skip | true | false | Allows you to skip the Jtest execution phase. If set to true, only the jtest.data.json data file is generated. User property is: jtest.skip | No |
Parameter Details| Anchor |
|---|
| exclude_ant_2 |
|---|
| exclude_ant_2 |
|---|
| excludeSpecifies a subset of files or packages from the selected resources that will be excluded from analysis. You can provide the qualified names. You can use glob patterns to match more filenames. Example 1: The following pattern excludes all files from com.parasoft package and its sub-packages: /com/parasoft/** Example 2: The following pattern excludes all files from the package com.parasoft.jtest, but NOT from its sub-packages: /com/parasoft/jtest/* Example 3: The following pattern excludes all files from the given directory and all subdirectories: path:/home/user/project/src/test/java/** | Anchor |
|---|
| include_ant_2 |
|---|
| include_ant_2 |
|---|
| includeSpecifies a subset of files or packages form the selected resources that will be included during analysis. You can use glob patterns to match more filenames. Example 1: The following pattern includes all files from com.parasoft package and its sub-packages: /com/parasoft/** Example 2: The following pattern includes all files from the package com.parasoft.jtest, but NOT from its sub-packages: /com/parasoft/jtest/* Example 3: The following pattern includes all files from the given directory and all subdirectories: path:/home/user/project/src/test/java/** | Anchor |
|---|
| resource_ant_2 |
|---|
| resource_ant_2 |
|---|
| resourceSpecifies the input scope for analysis. If no resources are specified, Jtest will analyze resources from every built project. Use the following pattern to specify the paths: ${ProjectName}/my/src/dir/my/package/file.java". You can use the following wildcards: - ? - matches one character
- * - matches zero or more characters, except the path separator (the / character)
- ** - matches entire paths, including the path separator (the/ character)
| Anchor |
|---|
| settings_ant_2 |
|---|
| settings_ant_2 |
|---|
| settingsAn absolute or relative path to the *properties file that includes custom configuration settings. | Info |
|---|
Some of the setting names may not be consistent with the settings dedicated for the build system plugins. See Configuration Settings for details. |
|