...
Code Block |
---|
java -jar jtestcov.jar -soatest -app c:/<PATH_TO_APPLICATION>/parabank.war -include com/parasoft/parabank/parasoft/** -settings c:/<PATH_TO_LICENSE_FILE>/license.properties |
...
Code Block | ||
---|---|---|
| ||
# === 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.verbosity.level=high |
Note | ||
---|---|---|
| ||
Defining includes and excludes is an important part of controlling how much your system processes, which can greatly affect how long it takes to generate your static coverage files. In many cases, there is no need to measure code coverage of third-party library code, so it is preferable to limit code coverage to project code using these settings. Includes and excludes should be expressed as comma-separated lists of patterns that specify classes to be instrumented. The following wildcards are supported:
In the following example, all classes from the
While in this example, all classes from the
If you are outside of development, working with the application binaries, and not sure what the appropriate include/exclude settings should be, reach out to your colleagues in development to make sure you use the correct patterns. There is usually a standard pattern for packaging company code, like |
Anchor | ||||
---|---|---|---|---|
|
...
- build.id: Set to the build ID with which to correlate coverage results. If you want to merge SOAtest 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 dotTEST or 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 dotTEST or 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 orfalse
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 ofreport.dtp.publish
(see Configuring Settings) or totrue
if-publish
is passed to soatestcli. - application.coverage.binaries: Optional. For Jtest, 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. For dotTEST, specify the folder containing the application PDB files. 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 . In many cases, there is no need to measure code coverage of third-party library code, so it is preferable to limit code coverage to project code using this setting. Do not use ifapplication.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. In many cases, there is no need to measure code coverage of third-party library code, so it is preferable to limit code coverage to project code using this setting. Specify a comma-separated pattern of application binaries to include during AUT scanning. Do not use ifapplication.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 dotTEST or Jtest in the .xml or .data format, or by the SOAtest 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
.
...