CoolBreeze;15568 wrote:
Oops, sorry to leave off the test framework info. Here it is:
Visual Studio 2019
4.9.08 (I just upgraded last week).
I tried both versions of the attribute:
<Category("EntityFramework")
<NUnit.Framework.Category("EntityFramework")>
Neither version works.
Thanks for the extra info. Can you confirm for me if you have the 'Category' column turned on in the Tests Window? This is the cleanest way to assess which categories a test belongs to.
Note that in the NCrunch metadata, we don't actually attach categories to test fixtures. When a test fixture has a category attached to it via attribute, this category is automatically placed on its child tests instead. Fixtures themselves are basically test containers and the critical metadata is always tied to the child tests.
If you're able to produce a standalone code sample where an attached category is not being recognised on a child test, would you be able to share this with me? If I can reproduce the problem locally I should be able to understand why this is happening.
CoolBreeze;15568 wrote:
Also, I see several:
Possible 'lost' project references
Assemblies are being referenced from the build output directory
Fixing the lost project references will likely fix your intermittently failing builds in the IDE. Incorrect build sequence is one of the symptoms of using assembly references instead of project references in the solution structure.
CoolBreeze;15568 wrote:
NUnit tests have been detected with the same name
This can cause some crazy downstream issues and it might be affecting the categories if the categorised tests are represented in the NUnit output more than once under the same name. I'd recommend fixing this as a starting point, as it's something you really don't want to have in a solution.