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.

Note:  Test cases must be in the automation suite before the script runs for automatic association.

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()

Note:  If you have existing scripts that you do not want to modify, you can use manual association. See Manually associating automated test results with test cases for more information.