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

Notification

Icon
Error

139b ... doesn't seem to honour machine.specifications.ignore attribute
vurt007
#1 Posted : Wednesday, May 16, 2012 3:47:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/16/2012(UTC)
Posts: 1
Location: Leeds, UK

as the title says really

I'm getting test failure reports for ignored tests .

using
vs2010
mspec 0.5.0 according the the properties
Remco
#2 Posted : Wednesday, May 16, 2012 11:17:16 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi, thanks for reporting this problem. I've managed to reproduce this myself and can confirm that NCrunch is not respecting MSpec's ignore attribute. I'll make a note to fix this in an upcoming release. As a workaround, I suggest you also ignore your MSpec tests using the NCrunch Tests Window for the time being.


Thanks!

Remco
Remco
#4 Posted : Tuesday, June 19, 2012 4:48:55 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
For anyone interested, 1.40b (just released) includes a fix for this issue.
rivethead_
#5 Posted : Thursday, August 23, 2012 1:10:27 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/23/2012(UTC)
Posts: 2

Hi,

It seems NCrunch is still ignoring the Ignore attribute for MSpec tests.

Here is the test failing. I have tried the Ignore attribute with and without a reason.

[Ignore("reason")]
public class when_mergin_a_template_with_a_null_object
{
private static ITemplateEngine template_engine;
private static ITemplateFile template_file;
private static string output;
private static Exception exception;

private Establish context = () =>
{
template_engine = TemplateEngineHelper.CreateTestNVelocityEngine();
template_file = template_engine.CreateTemplateFile("dummy");
};

private Because of = () =>
{
exception = Catch.Exception(() => template_engine.Merge(template_file, null));
};

private It should_throw_an_exception = () => exception.ShouldNotBeNull();
}

Here is a screenshot of the NCrunch output

Or am I just being thick?


I am using NCrunch 1.41.0.50b with Visual Studio 2012 and MSpec 0.5.8.0.

Thanks
Remco
#6 Posted : Thursday, August 23, 2012 10:06:59 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi,

Thanks for posting!

I just tried this use case locally and was unable to reproduce the problem (the test was ignored for me).

Is there any extra complexity around this test that is not shown in your code snippet?

Can you confirm that the ignore attribute you're using is Machine.Specifications.IgnoreAttribute?
rivethead_
#7 Posted : Friday, August 24, 2012 4:42:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/23/2012(UTC)
Posts: 2

Thank you for the quick reply.

For some reason the ignore is working now. I am very sure it was ignored yesterday, or maybe I am just getting old.

Apologies for the red herring!
Remco
#8 Posted : Friday, August 24, 2012 8:22:02 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
It's possible this could have been a synchronisation issue of some kind. Perhaps you added the ignore attribute and NCrunch didn't properly pick it up until the engine was reset. I guess there's no way to know now, but I'm glad it's working for you!

Cheers,

Remco
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.067 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download