xUnitFileImport job parameters

This section documents the parameters of the xUnitFileImport job which enables importing results of externally executed tests into Polarion, creating a Test Run in the process.

Parameters are optional unless otherwise specified. Parameters for importing test results during Mavin builds are also documented, and an example of the job configuration is also provided.

Name

Description

path

Required. Path to xUnit file, or to a folder containing xUnit files. (All XML files are imported and then deleted.)

project

Required. ID of the project in which the job will create test case and defect Work Items as output of the job.

idPrefix

Prefix for the ID (composed of prefix+timestamp) of Test Run created as output of the job.

userAccountVaultKey

Reference to user authentication key contained in the User Account Vault in Administration User Management User Account Vault

maxCreatedDefects

The number of failed tests before a summary Defect type Work Item will be created instead of individual Defect items for every failed test. (The default is 20.)

maxCreatedDefectsPercent

The percentage of tests that can fail before a summary Defect type Work Item will be created instead of individual Defect items for every failed test. (The default is 10%.)

templateTestRunId

ID of the template Test Run on which the Test Run created by the job is based. The template Test Run must exist in the same project specified in project.

templateTestCaseId

ID of template Test Case type Work Item used as basis for Test Case items created by the job. The template Test Case must exist in the same project specified in project.

templateDefectId

ID of template Defect type Work Item used as basis for Defect items created by the job. The template Defect must exist in the same project specified in project.

idRegex

Fills ID of the created Test Run with regex matching the xUnit filename.

groupIdRegex

Fills group.id of the created Test Run with regex matching the xUnit filename.

field[N]

Replace [N] with a number between 1 and 3. Specify up to 3 fields that can be additionally filled with regex matching xUnit filename.

fieldNRegex

Replace [N] with a number between 1 and 3. When field[N] is specified, use this parameter to fill Test Run field[N] with regex matching xUnit filename.

See the Monitor Topic and Configuring the Scheduler for more information.

Parameters for import in Maven Builds

Test results may be imported to a created Test Run during Maven builds by configuration in .polarion/builder/build.properties.

The parameters are identical to the parameters for the xUnitFileImport job, except that all must be prefixed with polarion.build.xUnit.import.

Unlike the xUnitFileImport job, however, xUnit files are not deleted after import.

The following parameters must also be specified in the Maven build configuration.

Parameter

Description

polarion.build.xUnit.import.enabled

Set to true to enable import of test results during the Maven build process.

polarion.build.xUnit.import.path=custom/path

When import is enabled, specified the relative path to artifactId\target\surefire-reports in the job's working directory.

polarion.build.xUnit.import.singleTestRun

Set to true to import all xUnit files to a single Test Run. Set false to import different xUnit files to separate Test Runs.