Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

xUnit category not used
tkarlsen
#1 Posted : Thursday, September 28, 2017 10:39:12 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/30/2017(UTC)
Posts: 19
Location: United States of America

Was thanked: 4 time(s) in 4 post(s)
I'm using xUnit 2.2 and I have some test classes marked as [Trait("Category", "UsesNetworkFiles")]. This worked fine in NUnit (with [Category("UsesNetworkFiles"]) to skip expensive tests when I'm running tests at home, but after switching to xUnit, NCrunch doesn't seem to detect the test category the same way. Is there a reason for this that I'm missing?
Remco
#2 Posted : Thursday, September 28, 2017 10:45:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

To my knowledge, this should create the same effect. If you turn on the 'Categories' column in the Tests Window, do you see the category correctly assigned to your tests?
tkarlsen
#3 Posted : Thursday, September 28, 2017 11:07:29 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/30/2017(UTC)
Posts: 19
Location: United States of America

Was thanked: 4 time(s) in 4 post(s)
Yes it did show the correct category, and that lead me down the path to dig a little deeper. I tried running the tests 3 times on two different machines, tried resynchronize/rebuild/rerun without any luck. One thing I hadn't tried was deleting the NCrunch cache directory, so I shut down VS and deleted it. When I fired VS back up the tests were excluded as expected! Thanks so much for the quick reply, sorry about the false alarm. I guess things got out of sync from switching testing frameworks.
1 user thanked tkarlsen for this useful post.
Remco on 9/29/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.024 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download