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: Newbie

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

Was thanked: 1 time(s) in 1 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: 4,975

Thanks: 664 times
Was thanked: 782 time(s) in 744 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: Newbie

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

Was thanked: 1 time(s) in 1 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.025 seconds.