How do I assign label to a test run automatically
This example demonstrates assigning a label to the entities(Test Run/Test Scenario/Test Script) with and without creation.
In the solution shown below, you will see that a new label is created and assigned to the Test Run using "setLabelsWithCreationEnabled" command and an existing label is assigned without creation to the Test Run using "setLabelsWithoutCreationEnabled" command.
Solution:
# | Command | Target | Value |
---|---|---|---|
Creating and Assigning a Label to a Test Run | |||
1 | setLabelsWithCreationEnabled | Application Modules | FPL Calculator |
Assigning a Label without Creation to a Test Run | |||
2 | setLabelsWithoutCreationEnabled | Test Coverage Category | Functional-Workflow |
Tips, Tricks, Gotchas & Best Practices:
- You can choose the entity(Test Run/Test Scenario/Test Script) where you want the label to be assigned by specifying the following in the "Target" field:
- Syntax for Assigning a label to a Test Run: parentLabelName||O/A (where "O" indicates "Override" and "A" indicates "Append")
- Syntax for Assigning a label to a Test Scenario: parentLabelName||01||O/A (where "O" indicates "Override" and "A" indicates "Append")
- Syntax for Assigning a label to a Test Script: parentLabelName||02||O/A (where "O" indicates "Override" and "A" indicates "Append")
- You can assign multiple labels within the parent label by providing the label names in comma-separated in the "Value" field.