Integrate external testing tools

Polarion provides the option of using external testing tools and using Polarion as the central repository for tracking and reporting the results of testing. For example, you might use Eclipse TPTP for automated load and performance tests, and Selenium for automated user interface testing, importing results of every test execution to Polarion where the results are visible to stakeholders and history of testing is maintained. You can use Polarion in this way with any external tool that can export test results to the xUnit XML format.

To integrate xUnit test results from an external testing tool with Polarion, you configure each of your external tools to write an xUnit file to a folder accessible to Polarion, and configure Polarion to periodically check each folder for the presences of a test results file. A scheduled job named xUnitFileImport is provided in Polarion which checks a specified folder. If any file is found there, the test results it contains are imported to an automatically-created Test Run. The test results file is deleted from the disk so that the folder is empty, and will be empty until the external testing tool executes another round of testing and writes another results file to the folder.

For information on scheduling and configuring jobs, see Configure the Scheduler. The job may also be invoked explicitly by a user in the Monitor.

Job configuration syntax

The following listing shows the job configuration syntax. The cron expression is just an example of one you might use to specify when the job should run. For more information on cron expressions, see Scheduler cron information and examples.

<job cronExpression="0 * * * * ?" disabled="false" id="xUnitFileImport" name="xUnitFileImport" scope="system">
     <path>c:\Temp\xunit</path>
     <project>sample_project</project>
     <idPrefix>TR</idPrefix>
     <userAccountVaultKey>xUnitFileImportUser</userAccountVaultKey>
</job>

<path> is the folder where Polarion should check for a test results file.

<project> is the name of the project into which the test results data are to be imported.

<idPrefix> is a value to be prepended to the automatically-generated ID of the Test Run which is created when the test results file is imported. The Group ID field of the Test Run is filled with the name of the imported test results file (minus extension).

Note:

The Group ID field of the Test Run is filled with the name of the imported test results file (minus extension).

xUnitFileImportUser references keys in the User Account Vault file (more info follows). If no user is specified in these keys or if the <userAccountVaultKey> element is empty, then the job can only be run by a user invoking it from the Monitor, and the job runs on that user's account. It will fail if allowed to run automatically according to the cronExpression schedule because such jobs run on the system user account which does not have write access.

In order to run the job automatically, it is necessary to configure a user in the User Account Vault on who's behalf the job will run. The User Account Vault is a properties file stored in the file system of the Polarion installation at data/workspace/user-account-vault/accounts.properties. The file contains the following two keys, which are referenced by xUnitFileImportUser when that value is specified in the <userAccountVaultKey> element of the job configuration (see example job listing above):

xUnitFileImportUser.user=[USER_ID]
             xUnitFileImportUser.password=[USER_PASSWORD]

Where [USER_ID] and [USER_PASSWORD] are the ID and password, respectively, of the user on whose behalf the job should run. The specified user must have write permissions for the project specified in the <project> element.

See also: