TestRail and Elements Connect


TestRail is a web-based test case management solution to efficiently manage, track, and organize software testing efforts.
It's a standalone tool, which can be integrated to Jira thanks to a free app available on the Atlassian Marketplace.

TestRail users can create Jira issues without leaving their tool, and since Elements Connect 6.7 they can also set values for Elements Connect fields while doing so.

Zendesk On Premise only

This integration is only possible with the On Premise version of Zendesk (self-hosted) as it requires the modification of a php file.
We've contacted the TestRail team to suggest that they make this change to TestRail Cloud.


"Team in charge" is an Elements Connect field connected to a LDAP



This integration requires some administration steps, described below.

Elements Connect setup

In order to make it possible to edit an Elements Connect field from TestRail, you must activate the /createmeta compatiblity from "Advanced" tab of the field administration screen. Indeed, the /createmeta endpoint of Jira is used by TestRail to get the values of Jira custom fields. You can learn more about the compatibility between Elements Connect and this API from this page: Jira REST API.





Compatibility

Not all Elements Connect fields can be used in TestRail, this compatibility has some limitations:

  • Live Text and Snapshot Text custom fields only
  • Only dependencies to Project, Issue type and the Current user are supported.
    The current user is the Jira user used in TestRail to configure the integration

TestRail setup

TestRail documentation explains how to add a Jira custom field to a "Defect" form in TestRail, we won't cover this topic here.

An additional configuration step is required in order to edit the Elements Connect fields from within TestRail.

  • In your TestRail installation directory, locate the Jira_REST.php file
  • Locate the private function _format_custom_field($field_name, $field_value, $project_key, $issuetype) function:
  • Locate the switch statement which starts with:

    switch ($field_type)
    	{
    		case 'com.atlassian.jira.plugin.system.customfieldtypes:textfield':
    		case 'com.atlassian.jira.plugin.system.customfieldtypes:textarea':
    			$data['value'] = $field_value;
    			break;
    	
    		case 'com.atlassian.jira.plugin.system.customfieldtypes:float':
    			// Make it work with commas, too.
    			$field_value = str::replace($field_value, ',', '.');
    			$data['value'] = (double) $field_value;
    			break;
    (...)
  • At the end of the switch statement, add a case for Elements Connect fields:

    case 'com.valiantys.jira.plugins.SQLFeed:nfeed-standard-customfield-type':
    case 'com.valiantys.jira.plugins.SQLFeed:nfeed-unplugged-customfield-type':
    	// Elements Connect field Types
    	// See documentation: https://doc.elements-apps.com/elements-connect/latest/?contentKey=test-rail
    	$data['value'] = $field_value;
    	break;