Skip to content

[BUG] Hooks are ignored if the class in which they are defined lives in a different assembly than the tests themselves. #556

Description

@Xen0byte

The example use case here would be a class library that sets up things for multiple test projects in a consistent way so that those test projects can reference this one library and run consistently across the board. MSTest, NUnit, and xUnit all support this scenario so, hopefully, this is indeed a bug, and not the intended behaviour.

Repro Steps:

  1. create 2 projects; project A contains some tests, while project B contains a class with some hooks (e.g. before/after test)
  2. make sure project A references project B, and make the class containing the tests inherit from the class in project B
  3. put some breakpoints on the hooks and observe that they never get hit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions