Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space SELDEV and version 2024.1

...

The following table describes all properties that can be set for the agent:

jtest.agent.runtimeData

Specifies a location on the application server for the agent to store the coverage data it collects at runtime. The following example will create files in the in C:/tmp/myapp/ directory with runtime_’ as the name prefix:

'C:/tmp/myapp/runtime'

jtest.agent.includes

A comma-separated list of patterns that specify classes to be instrumented. The following wildcards are supported:

* matches zero or more characters
** matches multiple directory levels

In the following example, all classes from the com.myapp.data package and all classes from package and subpackages that start with com.myapp.common will be instrumented:

com/myapp/data/*,com/myapp/common/**

jtest.agent.excludes

A comma-separated list of patterns that specify classes to be excluded from instrumentation. The following wildcards are supported:

* matches zero or more characters
** matches multiple directory levels

In the following example, all classes from the com.myapp.transport package and all classes from package and subpackages that start with com.myapp.autogen will be excluded from instrumentation:

com/myapp/transport/*,com/myapp/autogen/**

jtest.agent.autostartEnables/disables automatic runtime data collection. The default is true.
jtest.agent.port Sets up agent communication port. The default is 8050.
jtest.agent.debug Enables/disables verbose output to console. The default is false.
jtest.agent.enableMultiuserCoverage 

Enables/disables collecting web application coverage for multiple users. The default is false. 

jtest.agent.autoloadMultiuserLibsEnables/disables automatic loading of multiuser libraries (OpenTelemetry javaagent) when jtest.agent.enableMultiuserCoverage is set to true. The default value is true
jtest.agent.serverEnabledActivates the agent.
jtest.agent.enableJacoco Enables the agent to collect coverage using the JaCoCo engine. The default is false.

When the properties are configured, add a -javaagent argument when starting your application server to attach the agent and include the agent configuration file:  

...

With the proper configuration, Selenic will collect application coverage during test execution. To do so, configure a Selenic settings file (see Configuring Settings) with the following options, as appropriate:

  • build.id: Set to the build ID with which to correlate coverage results. If you want to merge Selenic coverage results with results from other types of testing—such as unit testing and manual testing of the same application—they must all use the same build ID. The build ID set here must match the build ID set for Jtest when collecting the static and dynamic coverage files and uploading the coverage data.
  • dtp.project: This value must match the dtp.project value set for Jtest when collecting the static and dynamic coverage files.
  • report.dtp.publish: Set to true to enable publishing test result data to DTP.
  • application.coverage.enabled: Set to true. This enables application coverage.
  • application.coverage.agent.url: Specify the URL where the application under test and coverage agent are hosted. Include the protocol (HTTP/HTTPS) and port number of the agent. Separate multiple entries with a semi-colon ( ; ). For example: http\://<Agent Host>\:8050;http\://<Agent Host>\:9050.
  • application.coverage.user.id: Optional. Specify a user ID so that coverage results can be associated with a specific user. A user ID should only be specified when the coverage agent is configured to run in multi-user mode. See jtest.agent.enableMultiuserCoverage below.
  • application.coverage.dtp.publish: Set to true to upload coverage reports to DTP or false to not upload coverage reports to DTP. If you have configured multiple coverage agents, their coverage reports will be merged into a single coverage report for DTP. Defaults to the value of report.dtp.publish (see Configuring Settings) or to true if -publish is passed to seleniccli.
  • application.coverage.binaries: Optional. Specify the URL or local file that contains binaries of the application under test (AUT). You can specify the path to a folder or a .war, .jar, .zip, or .ear file. Not needed if the static coverage file is uploaded to DTP separately. Do not use if application.coverage.static.file has been specified.
  • application.coverage.binaries.exclude: Optional but recommended. Specify a comma-separated pattern of application binaries to exclude during AUT scanning. If neither this nor application.coverage.binaries.include is configured, analysis of binaries will take longer and analyze more of the application than needed. Do not use if application.coverage.static.file has been specified. By default, all binaries are accepted. For example, application.coverage.binaries.exclude=jakarta/**,java/**,javax/**,org/apache/**,org/springframework/**
  • application.coverage.binaries.include: Optional but recommended. If neither this nor application.coverage.binaries.exclude is configured, analysis of binaries will take longer and analyze more of the application than needed. Specify a comma-separated pattern of application binaries to include during AUT scanning. Do not use if application.coverage.static.file has been specified. By default, all binaries are accepted. For example,  application.coverage.binaries.include=com/myapp/data/*,com/myapp/common/**
  • application.coverage.static.file: Optional. Specify the path to the static coverage file generated with Jtest in the .xml or .data format, or by the Selenic coverage tool that analyzed the application binaries. Not needed if the static coverage file is uploaded to DTP separately. Do not use if application.coverage.binaries has been specified.
  • application.coverage.images: Specify a set of tags that are used to create coverage images in DTP. A coverage image is a unique identifier for aggregating coverage data from runs with the same build ID. Separate multiple entries with a semi-colon ( ; ). For details, see the Parasoft DTP user guide. For example: ${dtp_project};${dtp_project}_Functional Test.

...