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

Notification

Icon
Error

Hiding NUnit unit test with the Ignore attribute
devdept
#1 Posted : Sunday, February 24, 2019 1:31:08 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 53
Location: Italy

Was thanked: 2 time(s) in 2 post(s)
Hi There,

How can we remove from the NCrunch Tests window the failed test with the NUnit Ignore attribute?

Thanks,

Alberto
Remco
#2 Posted : Sunday, February 24, 2019 9:02:06 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Alberto,

NCrunch will not discover tests marked with an NUnit ignore attribute. If a test is marked with this correctly, it will never show in the tests window.
devdept
#3 Posted : Monday, February 25, 2019 7:45:05 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/13/2012(UTC)
Posts: 53
Location: Italy

Was thanked: 2 time(s) in 2 post(s)
Thanks Remco,

Here is our syntax. Does it tell you something? As mentioned earlier we still have both MStest and NUnit enabled.

[NUnit.Framework.Ignore("Wrong curve in original Brep representing number 3")]
[TestCategory("Step"), TestMethod, NUnit.Framework.Test]
public void LayersTest()
{
Remco
#4 Posted : Tuesday, February 26, 2019 12:18:08 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Unless you have disabled the MSTest adapter, this test will still be discovered by MSTest. MSTest uses its own ignore attribute and does not consider the NUnit one. This means you'll need to ignore the test for both frameworks.
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.043 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download