Automatically associating automated test results with test cases
Associating automated test results with test cases is essential for viewing traceability between requirements, test cases, test results, and any related issues in Helix ALM.
You can configure Helix ALM to automatically associate automated test results with test cases when a build and test results are submitted to Helix ALM using the Jenkins plugin or Helix ALM REST API. The association is based on a script ID, which you use in an automated test script to help Helix ALM identify the automation suite and test case that the test result should be associated with.
You can also manually associate test results with test cases. See Manually associating automated test results with test cases.
1. When adding or editing an automation suite, select Automatically associate test results with test cases by script ID to automatically associate test results with test cases when submitting results to Helix ALM after a build runs.
2. Enter a Script ID prefix.
This value is prepended to the test case number to create an automated test script ID related to a test case. This ID must be added to the automated test script so it is written out to the test results that submitted to Helix ALM. For example, if you enter ALM- as the prefix, the script prefix for test case number 12 is ALM-12. An example script ID is displayed next to the field as you enter text.
3. Copy the script ID to the clipboard so you can paste it into a script. Select a test case and click Copy Script ID or click next to the script ID. You can also select multiple test cases and copy the script ID. The IDs will be comma separated when you paste them.
4. Add the script ID to your automated test script. See Modifying automated test scripts to use the script ID
Example
1. An automation suite named Alpha Tests has an ALPHA- script ID prefix.
2. Test case 123 is added to the suite. Helix ALM creates a script ID for the test case using the prefix and test case number: ALPHA-123.
3. You add ALPHA-123 to the related automated test.
4. When the results are submitted to Helix ALM, ALPHA- is used to automatically associate the results with test case 123.
Modifying automated test scripts to use the script ID
If you want to use automatic association, add the script ID to your automated test scripts. For example, to associate the results of a test to test case 56, you add the script ID to the test name:
testLogin_HALM56()
- If you plan to use the Jenkins plugin, see Submitting build and automated test results from Jenkins to Helix ALM for information about how the XML report uses script IDs written out to the
<tags>
attribute. - If you use the REST API to submit results to Helix ALM, see Automated testing in the Helix ALM REST API Guide for information about using script IDs in the
name
ortags
property in the JSON to submit to Helix ALM.