Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2025.3

...

You can also generate the static coverage file using the coverage tool shipped with SOAtest, though it lacks the advantages of using the source code described above. To do so, you need to run the tool independently of SOAtest, passing the binary, filter, license, and other properties when you do (see the sample license properties file below). An example using the Jtest coverage tool (jtestcov) against Parabank is shown below:

Code Block
java -jar jtestcov.jar -soatest -app c:/<PATH_TO_APPLICATION>/parabank.war -include com/parasoft/parabank/** -settings c:/<PATH_TO_LICENSE_FILE>/licensesettings.properties
Info

The -soatest flag is used by the coverage tools to pass your SOAtest license, which is needed when you run the coverage tool independently of SOAtest as in the example above. When you run soatestcli with application coverage settings, the license is automatically passed when the coverage tool is launched. You can see all available commands and options by running: java -jar jtestcov.jar help

Code Block
titleSample Settings Properties File
# === DTP SERVER SETTINGS ===

# Specifies URL of the DTP server in the 
Code Block
titleSample License Properties File
# === LICENSE ===

# === END USER LICENSE AGREEMENT ===
# Set to true to accept the Parasoft End User License Agreement (EULA).
# Please review the EULA.txt file included in the product installation directory.
#parasoft.eula.accepted=false

# === LOCAL LICENSE ===
# Enables local license - be sure to specify password.
#jtest.license.use_network=false

# Specifies password for the local license. 
#jtest.license.local.password=[LICENSE PASSWORD]

# === NETWORK LICENSE ===
# Enables network license - be sure to configure DTP server settings.
#jtest.license.use_network=true

# Specifies type of the network license (edition).
# Supported editions: desktop_edition, desktop_compliance_edition, server_edition, server_compliance_edition
#jtest.license.network.edition=server_edition

# Enables specific list of license features
#jtest.license.network.edition=custom_edition
#jtest.license.custom_edition_features=Jtest, Automation, Desktop Command Line, DTP Publish, Coverage, Test Impact Analysis


# === DTP SERVER SETTINGS ===

# Specifies URL of the DTP server in the form https://host[:port][/context-path]
#dtp.url=https://localhost:8443

# Specifies user name for DTP server authentication.
#dtp.user=admin

# Specifies password for DTP server authentication - use jtestcli -encodepass <PASSWORD> to encrypt the password, if needed.
#dtp.password=admin

# Specifies name of the DTP project - this settings is optional. 
#dtp.project=[DTP Project Name]

# === DTP REPORTING ===

# Enables reporting test results to DTP server - be sure to configure DTP server settings.
#report.dtp.publish=true

# Specifies a build identifier used to label results. It may be unique for each build
# but may also label more than one test sessions that were executed during a specified build.
#build.id=${dtp_project}-yyyy-MM-dd

# Specifies a tag which represents an unique identifier for the run, used to distinguish it from similar runs.
# It could be constructed as minimal combination of following variables that will make it unique or specified manually.
# e.g. ${config_name}-${project_module}-${scontrol_branch}-${exec_env}
#session.tag=[tag]

# Specifies a set of tags that will be used to create coverage images in DTP server.
# Coverage images allow you to track different types of coverage, such as coverage for unit, functional, manual tests and others.
# There is a set of predefined tags that will be automatically recognized by DTP, see the examples below.
# You can also specify other tags that will be used to create coverage images.
#report.coverage.images=${dtp_project}
#report.coverage.images=${dtp_project};${dtp_project}_Unit Test
#report.coverage.images=${dtp_project};${dtp_project}_Functional Test
#report.coverage.images=${dtp_project};${dtp_project}_Manual Test

# === CONSOLE VERBOSITY LEVEL ===
# Increases console verbosity level to high.
#console.verbosity.level=high

...

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/ directory with runtime_’ as the name prefix:'C:/tmp/myapp/runtime'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.includesexcludes

A comma-separated list of patterns that specify classes to be instrumentedexcluded 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.datatransport package and all classes from package and subpackages that start with com.myapp.commonautogen will be instrumentedexcluded from instrumentation:

com/myapp/datatransport/*,com/myapp/common/**/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.excludesdebug 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. 

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.autostartautoloadMultiuserLibsEnables/disables automatic runtime data collectionloading of multiuser libraries (OpenTelemetry javaagent) when jtest.agent.enableMultiuserCoverage is set to true. The default value is true. 
jtest.agent.port serverEnabledActivates the agentSets up agent communication port. The default is 8050.
jtest.agent.debugenableJacoco Enables /disables verbose output to consolethe agent to collect coverage using the JaCoCo engine. The default is false.
jtest.agent.enableMultiuserCoverage .appLocationIncludesA comma-separated list of path patterns that specify the location of application files that should be used by CTP to determine what manual tests have been impacted by code changes. The following wildcards are supported:

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

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.
appLocationExcludesA comma-separated list of path patterns that specify the location of application files that are within a location indicated by jtest.agest.appLocationIncludes but do not need to be considered when CTP determines manual tests that have been impacted by code changes. Excluding files this way can greatly decrease the time needed to analyze files for changes. The following wildcards are supported:

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

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

...

  • When jtest.agent.enableMultiuserCoverage is enabled, jtest-otel-ext.jar and opentelemetry-javaagent.jar will be automatically loaded from the agent.jar directory.
  • The "default" user (the user who has not specified their ID) may collect extra coverage information from other users who are accessing the same web application.
  • Coverage collected for multithreaded applications may, in some cases, not be assigned to individual users. This is related to OpenTelemetry limitations regarding context sharing between threads.
  • Collecting coverage with the Jacoco engine is not supported.
  • Coverage data collected for web application initialization is not assigned to a specific user, but to the "default" user.

Anchor
dotTESTCoverageAgent
dotTESTCoverageAgent
dotTEST Coverage Agent

The dotTEST coverage agent can collect coverage for web applications and standalone applications. Each requires a different configuration.

...