Skip to content

Inherited tests across projects do not retain their categories #2880

@slang25

Description

@slang25

This one is a bit specific, but it's one I'm facing, so here we go 😅

I've pushed an example of my scenario here: https://github.com/slang25/tunit-category-bug/

If there are tests in a shared project which have categories on the tests, and we use the [InheritsTests] attribute in a separate project, then the categories are missing during execution.

You can see in the diagnostic output over here that we get TrxCategoriesProperty { Categories = [] }.

However if we move the base class into the same project then we do get the categories as expected.

Passing --reflection fixes it.

Let me know if I can provide more detail 🙂

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions