Test assignment rules

Create test assignment rules to automatically assign application modules, test owners, and test fields to tests, using filter conditions.

Introduction

You can use test assignment rules to automatically populate automated tests with various details, based on filter conditions. This enables ALM Octane to incorporate automated test run results that it collects from automation servers or other sources into the product quality analysis.

These rules impact both tests coming from pipelines, and tests coming from the testing framework. For details on the testing framework, see Trigger on-demand automated test runs.

When a test matches your filter criteria, the following information can be automatically assigned to the test: Application module, Test owner, Test framework, Test type, Test level, Testing tool, Test runner.

Back to top

Create test assignment rules

You can create test assignment rules in a number of places, depending on your permissions:

  • In Settings , select Test Assignment Rules. This enables you to create and edit rules, but not to delete them.

  • In Settings > Spaces, select a workspace. Click the DevOps tab, and select Test Assignment Rules in the left pane. Here you can create, edit, and delete rules.

  • For details on managing test assignment rules from the Tests tab, see To create test assignment rules from the Tests tab:.

Each rule can assign one or more of the fields listed above, to the tests that match your filter criteria.

  1. Give the rule a meaningful name. For example, EndToEndTests.

  2. Specify one or more of the following:

    • The application modules to which you want to assign automated tests.

    • A test owner to assign to the tests.

    • A test runner to be used for the next test run. For details, see Trigger on-demand automated test runs.

    • The test fields you want to assign (test framework, type, level, and testing tool).

  3. Click Add filter to add conditions based on the values of the following fields: Class name, Component, Name, and Package.

    Filters can be multipart and complex and can include '*' as a wildcard. If necessary, click the Add filter button multiple times to add multiple items to the filter.

    Example:  

    • Name is equal to EndtoEnd*
    • Component is not equal to *Internal

    All conditions must be met for the rule to assign the selected values to an automated test.

  4. Select whether the rule should assign application modules, test owner, and test runner even if those fields already have values, or only if they are empty. If the checkbox is selected, the specified application modules and test owner override the current values.

    As you edit the rule, you can see how many currently existing tests will be modified once you save the rule.

  5. Click Save.

    The rule has the following effects:

    • The following fields affect both current and future tests that match the filter: application module, test owner, and test runner. This includes tests currently in the system, as well as new automated tests detected in the future. In other words, as soon as you click Save, these fields are automatically updated based on the rule.

    • The fields test framework, type, level, and testing tool affect future runs, and are updated according to the latest run.

    • Fields in test runs triggered by the testing framework are updated accord to the rule when they run. However the tests themselves are not affected.

    Note: If you do not want test assignment rules to affect future test runs in the testing framework, set the ENABLE_TEST_ASSIGNMENT_RULES_IN_SUITES site parameter to false.

Back to top

Run test assignment rules

Test assignment rules run automatically: 

  • As soon as a rule is saved.

  • Each time a new automated test is discovered.

Note: You cannot manually run a test rule.

Back to top

Manage test assignment rules

In the DevOps tab, select Test Assignment Rules.

  • To edit a rule, click the rule ID link and modify its definitions as described above.

  • To sort, filter, group, delete, and export rules, use the toolbar options similar to other entities in ALM Octane grids.

Example: When trying to understand why some tests are not properly being assigned, group or sort the rules according to the properties in the rule's filter. Then compare the properties in the rules to the properties of the test.

You can also edit rules in Settings Test Assignment Rules.

Back to top

See also: