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

Notification

Icon
Error

SpecFlow integration - Failed Marker at invalid position
tomitrescak
#1 Posted : Thursday, December 7, 2017 2:19:48 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/7/2017(UTC)
Posts: 1

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi

Thanks for the AMAZING product!
We are currently evaluating NCrunch and so far we are loving it!

The one issue that we have is that our BDD tests in Gherkin show Failed marker at an invalid step. For some reason, the marker is always at the end of the steps, not where the test fails. It is a bit confusing. Please see the image. The failed marker is on the last step, while it should be on the second line, where the test is failing.

Any advice how can this be resolved?

Incorrect Marker

I can see in the console that the test execution continues, but I would like to break it no "skip"

Code:

Given That institution 'InstitutionStart' is launched
-> error: Value cannot be null.
Parameter name: source
When Agent 'user' connects to organisation 'main'
-> skipped because of previous errors
Then Agent 'user' plays role 'King' and belong to the started institution
-> skipped because of previous errors
And Agent 'user' has parameter 'childParameter'
-> skipped because of previous errors
And Agent 'user' has parameter 'parentParameter'
-> skipped because of previous errors
And Agent 'user' has parameter 'orgChildParameter'
-> skipped because of previous errors
And Agent 'user' has parameter 'orgParentParameter'
-> skipped because of previous errors
1 user thanked tomitrescak for this useful post.
michaelkroes on 12/7/2017(UTC)
michaelkroes
#2 Posted : Thursday, December 7, 2017 1:05:31 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 306
Location: Netherlands

Thanks: 138 times
Was thanked: 73 time(s) in 69 post(s)
Hi thanks for posting and evaluating the product!

This is a feature of SpecFlow. It can be disabled by editing the app.config. If you add stopAtFirstError="true" you will get an exception cross at the Given.

Code:

<specFlow>
<unitTestProvider name="NUnit" />
<runtime
stopAtFirstError="true"
missingOrPendingStepsOutcome="Inconclusive" />
</specFlow>


SpecFlow by default runs through all the steps and then rethrows the exception at the end of the scenario, hence the stack trace at the end of the scenario. If you place a breakpoint on the code where the exception happens you will already see the correct stack trace.

I hope this helps!

Michael
1 user thanked michaelkroes for this useful post.
tomitrescak on 12/7/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.022 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download