Skip to content

Unmatched test results are excluded from the Test Run #140

@ombacke

Description

@ombacke

Description

When the extension publishes results to a Test Plan, only tests that match a Test Point are included in the Test Run. Tests that do not match (e.g. setup/helper tests with no Test Case ID) are silently excluded from the run entirely. This makes the Test Run an incomplete representation of what was actually executed.

Expected behavior

All test results from the JUnit XML should appear in the Test Run. Unmatched tests should still be published — either as unlinked results or under a catch-all category — so the Test Run reflects the full execution.

Actual behavior

Only matched tests appear in the Test Run. In our case, 4 tests were executed but only 1 was matched to a Test Point, so the Test Run shows 1 result instead of 4.

From the debug log:

Mapped 1 automated tests to test points:
| Test Point | Test Case | Configuration | Automated Test           | TestOutcome |
| 111111     | 11111     | Windows 10    | TC11111_...        | Failed      |

Unmatched test cases:
No matching test point found for 'setup-test-1'
No matching test point found for 'setup-test-2'
No matching test point found for 'TC22222_SomeFeature_SomeScenario'

The resulting Test Run only contains 1 result, even though 4 tests were executed.

Steps to reproduce

  1. Configure the extension with testCaseMatchingStrategy: Regex
  2. Run a Playwright test suite where some tests have TC IDs and some do not (e.g. setup/auth fixtures)
  3. Observe that the Test Run only contains the matched tests

Environment

  • Extension version: 0.9.0
  • Test framework: Playwright / JUnit XML
  • Matching strategy: Regex (^TC(\d+))

Suggested fix

Consider adding an option such as includeUnmatchedResults: true that publishes unmatched tests to the Test Run without linking them to a Test Point. This would give teams full visibility of their test execution while still linking the tests that can be matched.

Additional context

The failTaskOnUnmatchedTestCases: false flag prevents the task from failing, but does not include the unmatched results in the run. These are two separate concerns and it would be helpful to have independent control over both behaviors.

Note: one of the unmatched tests (TC22222) does contain a valid TC ID in the name, but was still excluded because the Test Case did not exist in the configured Test Plan. This appears to be a separate but related issue — it may be worth logging a warning that distinguishes between “no TC ID found” and “TC ID found but not in plan”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions