Skip to content

[Bug]: Injected properties don't get their event receivers executed #6554

Closed

Description

@aradalvand

Description

It is stated here in the documentation that one of the things that the ITest*Receiver interface implementations are picked up from are "Injected properties", which makes perfect sense.

However, this doesn't seem to work.

Steps to Reproduce

  1. Clone the minimal repro at https://github.com/aradalvand/tunit-injected-property-event-receiver
  2. Run dotnet run
  3. Notice how SomeResource.OnTestStart and SomeResource.OnTestEnd never run (open the Test.cs file at the root of the repo to see the actual source code)

TUnit Version

1.63.0

.NET Version

.NET 10

Operating System

Linux

IDE / Test Runner

dotnet CLI (dotnet test / dotnet run)

Error Output / Stack Trace

failed Test (18ms)
  TUnit.Engine.Exceptions.TestFailedException: [Test Failure] AssertionException: Expected to be true
  but found False

  at Assert.That(SomeResource.DidOnTestStartRun).IsTrue()
    at Test.MyTests.Test() in Test.cs:13
       --- TUnit internals omitted (run with --detailed-stacktrace for full trace) ---
  Standard output
    Initializing...
    Disposing...

Additional Context

No response

IDE-Specific Issue?

  • I've confirmed this issue occurs when running via dotnet test or dotnet run, not just in my IDE

Activity

  1. added
    bug
    on Aug 7, 2026
  2. added a commit that references this issue on Aug 26, 2026
    f490570
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

    bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions