Skip to content

When all tests in an assembly is skipped, MTP reports an error and generates TRX with no tests in it. Feature or bug? #5455

@CAP-3Shape

Description

@CAP-3Shape

When I set a filter argument (eg --filter-not-namespace) which happens to exclude all tests in one of my test assemblies, MTP will report an error on the command line. If I use TRX output, it will also generate a TRX file with no tests in it.

By comparison, when the same happens in old-fashioned xUnit, xUnit will report a warning on the command line and generate no TRX file for that assembly.

I have a GitHub actions pipeline which uses the phoenix-actions/test-reporting component action. When the above happens, the phoenix-actions step cannot parse the "empty" TRX file and fails with this error: Error: td.UnitTest is not iterable

Is this a bug in MTP or is it a bug in phoenix-actions? Are such "empty" TRX files supposed to be allowed?

I have a minimal working example here which reproduces the problem: https://github.com/CAP-3Shape/MstTrx

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MTPBelongs to the Microsoft.Testing.Platform core libraryArea: TRX

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions