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

Notification

Icon
Error

NCruch running Specflow Test and getting "No Matching step definition"
craigrichards
#1 Posted : Friday, April 13, 2018 1:57:28 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2011(UTC)
Posts: 10
Location: Australia

Was thanked: 1 time(s) in 1 post(s)
Hi,
Currently getting into troubles with NCrunch and Specflow. I am getting missing step definitions. Work perfectly through the Resharper / MSTest runner with the MSTestAdapter.

I am running
- NCrunch 3.14.0.1
- Specflow 2.3.0
- Specflow Extension 2017.1.12
- VS 2017

Here is a copy of the standard error.

Given an order that will RunAllVetting
-> done: Steps.GivenAnOrderThatWillRunAllVetting() (0.0s)
And the vetting script raises a Referral Broken Rule with Code A Action orderRefer Overwrite FALSE Queue sendtoMarginlendingQueue
-> No matching step definition found for the step. Use the following code to create one:
[Given(@"the vetting script raises a Referral Broken Rule with Code A Action orderRefer Overwrite FALSE Queue sendtoMarginlendingQueue")]
public void GivenTheVettingScriptRaisesAReferralBrokenRuleWithCodeAActionOrderReferOverwriteFALSEQueueSendtoMarginlendingQueue()
{
ScenarioContext.Current.Pending();
}

And the vetting script raises a Referral Broken Rule with Code A Action orderRefer Overwrite FALSE Queue sendtoInternetQueue
-> No matching step definition found for the step. Use the following code to create one:
[Given(@"the vetting script raises a Referral Broken Rule with Code A Action orderRefer Overwrite FALSE Queue sendtoInternetQueue")]
public void GivenTheVettingScriptRaisesAReferralBrokenRuleWithCodeAActionOrderReferOverwriteFALSEQueueSendtoInternetQueue()
{
ScenarioContext.Current.Pending();
}
Remco
#2 Posted : Friday, April 13, 2018 2:17:35 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this problem.

When you say missing step definitions, do you mean that you're not seeing NCrunch coverage markers on SpecFlow code where you're expecting them? Or are you experiencing build issues when using NCrunch? (i.e. the definition code isn't being generated).
craigrichards
#3 Posted : Friday, April 13, 2018 3:16:34 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2011(UTC)
Posts: 10
Location: Australia

Was thanked: 1 time(s) in 1 post(s)
Thanks for the quick response. Firstly I am a huge fan and have been since v1.

NCrunch builds my project ok.
Some Specflow tests run ok.
Other Tests fail with a 'Missing step definition error'.

If I run these tests through MSTest / Resharper they are all successful.

Remco
#4 Posted : Friday, April 13, 2018 5:54:12 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks for the extra info. Does setting the engine in compatibility mode make any difference?
craigrichards
#5 Posted : Sunday, April 15, 2018 11:12:48 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2011(UTC)
Posts: 10
Location: Australia

Was thanked: 1 time(s) in 1 post(s)
Thanks for your quick responses. I was able to troubleshoot the issues from my side and it was my issue and nothing to do with NCrunch in the end. The updated NCrunch version also resolved the Com+ issues i was having. The tests all run fine now.
1 user thanked craigrichards for this useful post.
Remco on 4/16/2018(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.035 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download