Page tree

Skip to end of metadata
Go to start of metadata

In this section:

Introduction

You can send test results analyzed by Selenic to Parasoft DTP, which aggregates, processes, and generates visualizations of the data. DTP applies advanced development and test analytics to the data it collects so that development managers and project members can assess the state of their software. See Viewing Results in DTP for information on viewing the data sent to DTP.

Run the selenic_analyzer.jar from the command line to send test results to DTP (see Command Line).

Global Configuration 

A connection to DTP must be configured in the selenic.properties file (see Licensing) to send data to DTPIf you use a network license served from DTP, Selenic will report test results to the same instance of DTP you connect to in order to retrieve a license. If you do not wish to use a network license from DTP, you can configure a local license to enable Selenic functionality, but a connection to DTP must still be configured to send test results. 

Connecting to the Project in DTP

In addition to configuring the connection to DTP, you will also need to specify which DTP project should receive the data. Open the selenic.properties file located in the Selenic installation directory and specify the name of your project in the DTP SERVER SETTINGS section:

# Specifies host name of the DTP server.
dtp.server=<host where DTP is running>

# Specifies port number of the DTP server.
# Commonly used values are 443 and 8443.
dtp.port=<port where DTP is running>

# Specifies user name for DTP server authentication.
dtp.user=<user name to log into DTP>

# Specifies password for DTP server authentication - use java -jar selenic_analyzer.jar -encodepass <PASSWORD> to encode the password, if needed.
dtp.password=<password to log into DTP>

# Specifies name of the DTP project (optional).
dtp.project=<name of your project on DTP>

Enabling Reports to DTP

Set the report.dtp.publish property in the REPORTING section to true:

# === REPORTING ===

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

When the report.dtp.publish option is enabled, Selenic will also publish copies of test code source files to DTP by default. See Publishing Source Files to DTP for details about changing this behavior. 

Publishing Source Files to DTP

If the report.dtp.publish option is enabled, Selenic will publish copies of the JUnit or TestNG source files by default. Publishing the sources to DTP enables you to view them alongside test details in the Test Explorer view. Refer to the DTP documentation for additional information about using the Test Explorer view.

If your test files are stored in source control, you can alternatively enable DTP to display sources by configuring Selenic to share your source control settings with DTP. See Configuring Source Control Settings for details.

Specify a publishing mode with the report.dtp.publish.src setting in the REPORTING section to control how sources are published to DTP:

# === REPORTING ===

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

# Specifies whether the tested source code is published to the DTP server. Options are "full", "min", and "off"
report.dtp.publish.src=full

You can specify the following modes:

full All source code from the specified scope is published to DTP. This is the default setting when the report.dtp.publish option is enabled.
min The minimal amount of source code is published. In most cases, auto-generated code and other source code without source control references will be published.
off Source code is not published to DTP.

By default, Selenic will check for source files in the current directory. If your source files are stored in another directory, use the -source option when running the selenic_analyzer.jar file specify the location of your sources. See Command Line for usage details.

Setting Custom Build IDs

Each test execution is associated with a build ID, which is a unique identifier used to group a set of test runs. Refer to the DTP documentation for additional information about build IDs. By default, the project name and date of the execution are used as the build ID, but you can uncomment the build.id  property and specify your own value:

# === REPORTING ===

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

# Specifies whether the tested source code is published to the DTP server. Options are "full", "min", and "off"
# report.dtp.publish.src=full

# 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=<your custom build ID>

Setting a Session Tag

You can differentiate between execution environments, tested modules, etc., by uncommenting the session.tag property and specifying a value:

# === 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=<your custom build ID>

# 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. ${dtp_project}-${exec_env}
 session.tag=<your custom session tag>

By default, the DTP Project name and execution environment (operating system and architecture) are used.

Session Tag versus Session ID

Do not confuse the session tag with the session ID. The session tag is an identifier used to segment data in DTP reporting interfaces, whereas the session ID is a used by the Selenic analyzer to differentiate between test run data collected by the Selenic agent. 

Publishing Results from the Command Line

You can also use the -publish flag in your command line to configure Selenic to publish results to DTP for each execution of the selenic_analyzer.jar file (see Command Line). You must still configure the connection to DTP, however, as well as the dtp.project property in the selenic.properties file.     


  • No labels