Skip to content

Speed up TUnit.Engine.Tests in CI #7359

Closed

Description

@thomhurst

TUnit.Engine.Tests (Reflection mode) takes about 6.4 minutes on ubuntu and windows in the modularpipeline job (run 40786972231), and it sits on the job's critical path:

  • RunEngineTestsModule depends on about 11 other test modules and holds NotInParallel("NetworkTests"), so it starts only after everything else has finished.
  • Every engine test launches TUnit.TestProject as a child process. Each child gets --report-trx and --hangdump. Both extensions register Microsoft.Testing.Platform test-host controllers (TrxProcessLifetimeHandler, the hang-dump controller), so every child relaunches itself as a second process. Local medians on an empty filter: no flags 1.1 s, --report-trx 1.9 s, --hangdump about +0.7 s.

Plan:

  1. Run the Reflection-mode engine tests in a job of their own, as the AOT-mode ones already are in aot.yml.
  2. Drop --hangdump from child runs and bound them with --timeout, as the AOT path does.
  3. Replace TRX as the child result source with an in-process reporter, adapted to the existing TestRun model so the assertions stay unchanged.

Activity

  1. added
    enhancementNew feature or request
    performancePerformance optimization
    P3Low: cleanup, minor enhancement, or rare edge case
    on Nov 1, 2026
  2. added a commit that references this issue on Nov 2, 2026
    9908a98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge caseenhancementNew feature or requestperformancePerformance optimization

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions