Skip to content

IBM UrbanCode + TestRail Integration Guide

Why you need Pangolin

In many organizations, IBM UrbanCode Build is used to build software, run unit tests, and run various kinds of testing frameworks. Example: Selenium, JUnit, Pytest, TestNG, Visual Studio Test, etc. These test metrics are very important and should be reflected in TestRail to show the true health of any project. Agiletestware Pangolin TestRail Connector plugin for IBM UrbanCode Build allows users to integrate any testing framework with TestRail without making any code changes or writing custom tools.

- Prerequisites

  • Pangolin Server must be installed and accessible from IBM UrbanCode Build host

- Installation of plugin

Pangolin Installation

  • Click on Browse button and choose plugin zip file
  • Click on Load button

Pangolin Installation

Pangolin Installation

- Configuration of "Pangolin: Upload test results into TestRail" step

To upload test results into TestRail, a new "Pangolin: Upload test results into TestRail" build step has to be added:

Configuration

Configuration

Field Name Required Description
Pangolin URL Yes URL for Pangolin server. Example: http://some-server:8888
TestRail URL Yes URL for your TestRail instance. Example: https://testrail:8080
TestRail User Yes Name of user in TestRail
TestRail Password Yes Password for TestRail user
Upload Timeout Yes The number of minutes to wait for the Pangolin server to process the request. 0 means wait indefinitely
Project Yes The name of project in TestRail to which results should be exported
TestPath Yes Path to where Pangolin should test definitions, must contain suite name in the beginning (for single-suite project, suite name is always 'Master'), e.g. Master\Section1\Section2
Format Yes Format of test results generated during the build. Available values: junit, nunit, testng, trx
Results File Pattern Yes Provide path to the report file(s) generated during the build. This is a comma separated list of test result directories. You can also use Ant style patterns such as **/surefire-reports/*.xml
Test Run No Name of test run in TestRail to which test results will be added
Test Plan No Name of test plan in TestRail to which test results will be added
Milestone Path No Path to a milestone in TestRail to which test run/plan will be added. E.g. Milestone1\Milestone2
Case Fields No Values for case fields in TestRail can be specified in this field. The format is [TestRail field system name]=[value 1] and each field name\value pair should start with the new line. E.g.: custom_user_field1=foo
Result Fields No Values for result fields in TestRail can be specified in this field. The format is [TestRail field system name]=[value 1] and each field name\value pair should start with the new line. E.g.: custom_user_field1=foo
Fail build if upload unsuccessful N/A If checked, the build will be marked as failed if for any reason the plugin was not able to upload the results. This could be due to Pangolin server issues, TestRail server issues, network issues, etc.
Close Run N/A If checked, Pangolin will close the test run in TestRail and archive its tests and results

Make sure step is executed even if test phase fails

In order to upload results to TestRail in case when test failed, just set Pre-Condition Script field to "Always". In such a case results will be uploaded regardless of a result of execute test step.

- Execution

Once the job is configured, simply run the process containing the job. Here is IBM UrbanCode Build build execution output example:

Execution

Execution

And results in TestRail:

Test Cases:

Execution Results

Test Plan and Test Run:

Execution Results

Execution Results

Created Milestones hierarchy:

Execution Results