Skip to content

Using TrxReport with --test-modules should include test assembly name and target framework in trx file name #7345

Description

Summary

When running dotnet test --test-modules <glob> --report-trx, the .trx files that are created have names of <username>_<computername>_<UTC timestamp>.trx. With multiple test modules, the files are indistinguishable from one another. The --report-trx-filename parameter doesn't help - with one .trx file, the results seem to overwrite each other since the end result does not contain all the tests that were run.

Background and Motivation

We have tests broken up into a few dozen test projects by product and code areas. With VSTest, we pass all of the test assemblies and the result goes to a single .trx file, which works well.

With dotnet test with MTP, I end up with dozens of .trx files and can't tell which is which without writing something custom to parse them.

We also multi-target (net48 and net10.0), so I'm using bin/Release/net*/*Test.exe as a glob pattern. This works great, all of the tests run nicely in parallel with the target framework included in the output. However, it's also not possible to tell the target framework from the resulting .trx files.

Proposed Feature

What seems simplest to me is to include the test module name and TFM in the file name. This would simplify things drastically.

Additional nice to haves would be:

  • The option to output all results to a single .trx.
  • Option to create a .trx file by some value such as TFM, category, etc. For example, all net48 tests and all net10.0 tests. TFM is probably easier than something on the tests like category or namespace, but those are something to consider.

Activity

  1. MihuBot commented on Feb 4, 2026

    @MihuBot

    I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):

  2. jbcutting commented on Feb 4, 2026

    @jbcutting
    Author

    I missed the linked issue. Looks like that would address the file name issue, though I'd still be interested in the single file and/or grouping possibility.

  3. added
    area/trx
    and removed
    needs/triage
    on Feb 5, 2026
  4. added
    area/mtp
    area/mtp-migration
    on Feb 5, 2026
  5. added 2 commits that reference this issue on Jun 2, 2026
    892311b
    3ff8d16
  6. added 2 commits that reference this issue on Jun 10, 2026
    00cebb5
    a1948f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/mtparea/mtp-migrationarea/trx

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions