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

Notification

Icon
Error

ScenarioContext.Current.Pending() in SpecFlow tests
mschinzpb
#1 Posted : Wednesday, July 16, 2014 2:16:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/25/2014(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hello,
NUnit runners in Resharper as well as in team city seem to be smart enough to figure out a special return type from the spec flow framework when steps have not been implemented yet for certain features. These will be displayed as inconclusive (the same level as ignored) in the reports. The scaffolding creating the bindings files emits code that puts a
Quote:
ScenarioContext.Current.Pending();
into the unimplemented methods. I was wondering if I could have the tests showed up in a different way (like ignored for instance) by ncrunch too?
Thank You,
Martin
Remco
#2 Posted : Wednesday, July 16, 2014 8:59:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Martin,

NCrunch itself doesn't have direct support for inconclusive tests, even though many of the frameworks it integrates with do have this feature.

This is done for purposes of simplicity. Inconclusive tests would require the engine to have a whole new state representing them including different coloured coverage markers, adjusted aggregation, etc. The existence of this third state would cast doubt around the behaviour of many areas of the engine and make the behaviour of the tool much harder to understand.

NCrunch has a configuration option where you can choose its behaviour when working with inconclusive tests - http://www.ncrunch.net/documentation/reference_project-configuration_consider-inconclusive-tests-as-passing. This allows you to describe to the engine whether you wish to consider these tests as something that requires action on the part of the developer (i.e. failing, the default), or something that is benign and doesn't require attention (passing).
mschinzpb
#3 Posted : Wednesday, July 16, 2014 9:57:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/25/2014(UTC)
Posts: 7
Location: United Kingdom

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hey Remco,
That all makes perfect sense, so for my use case the link you provided is going to be enough.
Thank You for your fast reply, I really dig the speed of your forum replies!
1 user thanked mschinzpb for this useful post.
Remco on 7/16/2014(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.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download