Execution Status Mapping Reference
This reference describes the status mapping fields used to determine the execution status of imported test case and test step runs. Configure these mappings in a Custom Automation Template to associate XML elements or values with the corresponding QMetry execution statuses.
Note
Status mapping applies only to execution results. It does not affect test case creation or versioning.
Test Case and Test Step Run Status Fields
Use the following mapping expressions to determine the execution status of imported test case and test step runs.
QMetry Status | Description | Expression |
|---|---|---|
Passed | Identifies successful executions. | ${suite.test.class.testmethod.status} ${suite.test.class.testmethod:status} |
Failed | Identifies failed executions. | ${testsuites.testsuite.testcase.failure} ${testsuites.testsuite.testcase.step.failure} |
Aborted/Error (Aborted is a Custom Execution Status used only if found in the Project.) | Identifies aborted or errored executions. | ${testsuites.testsuite.testcase.error} ${testsuites.testsuite.testcase.step.error} |
Skipped (Skipped is a Custom Execution Status used only if found in the Project.) | Identifies skipped executions. | ${testsuites.testsuite.testcase.skipped} ${testsuites.testsuite.testcase.step.skipped} |
Execution Status Behaviour
QMetry evaluates the mapped tag during import and applies the first matching rule. When no rule matches, QMetry applies the Default Status.
Mapping | Tag Result | Status |
|---|---|---|
Failure | Fail or Failed | Failed |
Failure | Failure, Fail, Failed, or Error tag found (empty value) | Failed |
Failure | Anything else | Default Status |
Aborted / Error | Aborted or Abort | Aborted, or Failed if no custom Aborted status exists |
Aborted / Error | Error | Aborted, or Failed if no custom Aborted status exists |
Aborted / Error | Anything else | Default Status |
Skipped | Skipped or Skip | Skipped, or Not Applicable if no custom Skipped status exists |
Skipped | Anything else, or not configured | Default Status |
For the Failure Mapping, QMetry evaluates the Error tag only when the Aborted / Error Mapping does not handle it.
Default Status
The Default Status determines the execution status when none of the configured status mappings match the imported XML.
Note
Default Status applies only to test case runs.
In the Default Status list, select one of the following values. Passed is selected by default when you create a new mapping.
Value | Result |
|---|---|
Passed | Marks the execution as Passed. This is the default value. |
Failed | Marks the execution as Failed. |
Blocked | Marks the execution as Blocked. |
Not Run | Marks the execution as Not Run. |
Not Applicable | Marks the execution as Not Applicable. |
Fallback Status Behaviour
When an imported XML does not contain a configured status mapping, QMetry applies the following fallback behavior.When an imported XML does not contain a configured status mapping, QMetry applies the following fallback behavior.
XML Element | Default Behavior |
|---|---|
<failure> | Marks the execution as Failed. |
<error> | Marks the execution as Failed, unless a custom Aborted execution status exists. |
<skipped> | Marks the execution as Not Applicable, unless a custom Skipped execution status exists. |
Framework-Specific Considerations
Some automation frameworks, such as JUnit, do not explicitly record successful executions. For these frameworks, configure Default Status to Passed so that executions without <failure>, <error> or <skipped> elements are treated as Passed.