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

Notification

Icon
Error

Test-Names (and so the tests) of xBehave not displayed in NCrunch Tests Windows
Der-Albert.com
#1 Posted : Friday, August 21, 2015 1:10:28 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
Hi Remco,

When you use https://github.com/xbehave/xbehave.net (and xUnit Extension with supports BDD Style Testing with xUnit) then only the name of the methods (Scenario) are shown in NCrunch. But not the Name of the Steps ... even Visual Studio shows the Steps ;) (in the Output of the Test Explorer), ReSharper and the xunit console also displays the step names with the correct state (failed or not)

https://github.com/xbehave/xbehave.net/wiki/Quickstart

Displaying the Step Names as single Tests is even more important with Examples

https://github.com/xbehave/xbehave.net/wiki/Scenarios-with-examples

Best Regards

Albert

1 user thanked Der-Albert.com for this useful post.
adamralph on 9/21/2015(UTC)
Remco
#2 Posted : Friday, August 21, 2015 10:32:30 PM(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 Albert,

Unfortunately, for NCrunch to meaningfully discover and report these steps is currently impossible.

NCrunch separates its test discovery and execution into two distinct steps. A test can only be created during test discovery, and can only be executed during its execution step. This is quite different to a number of other runners where the discovery of tests and their execution can often be mashed together. NCrunch relies on this different to support many of its features, particularly the dynamically controlled pipeline of tests.

Under xbehave, the steps inside the tests are non-deterministic. They cannot be identified during the discovery of the test and are only reported by the framework when the test is actually executed. This is a big problem for NCrunch, which cannot create new tests during their execution.

There is also the problem of the steps requiring a new dimension in the Project-Fixture-Test structure, which is not so simple to extend in NCrunch.

To deal with this, NCrunch groups the steps into their parent tests and provides an aggregate report.
Der-Albert.com
#3 Posted : Tuesday, August 25, 2015 7:14:48 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
So, what about displaying the test cases and Outcome in a visually appealing way afterwards in den results pane? Just like Visual Studio.
Remco
#4 Posted : Tuesday, August 25, 2015 11:52:22 PM(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)
Der-Albert.com;7668 wrote:
So, what about displaying the test cases and Outcome in a visually appealing way afterwards in den results pane? Just like Visual Studio.


As in .. breaking up the Tests Window output pane to section the results for each step?

I think at the moment the Tests Window output does introduce text markers separating the output between each step, though this certainly isn't very fancy.
Der-Albert.com
#5 Posted : Wednesday, August 26, 2015 12:51:15 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 38 time(s) in 35 post(s)
No it shows nothing in the Test Output Windows

[img=(- BROKEN LINK -)]NCrunch[/img]

[img=(- BROKEN LINK -)]Visual Studio[/img]

The Test

Quote:
[Scenario(DisplayName = "Weltfrieden_possible")]
[Example(2500, WeltfriedenState.Yes)]
[Example(2350, WeltfriedenState.Maybe)]
[Example(2200, WeltfriedenState.No)]
public void Weltfrieden_possible(int year, WeltfriedenState expected, WeltfriedenState result)
{
$"Given the Year {year}"
.x(() => With(new WeltContextYear(year)));

"When checking for possiblity"
.x(() => result = Subject.IsPossible());

"Then is should be {1}"
.x(() => result.Should().Be(expected));
}
Remco
#6 Posted : Wednesday, August 26, 2015 9:59:15 PM(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)
Sorry, it looks like this isn't working the way it's expected to.

I'll see what I can do about adding some separation between the steps in the trace output.
Remco
#7 Posted : Friday, August 28, 2015 3:01:39 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)
1 user thanked Remco for this useful post.
adamralph on 9/21/2015(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.061 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download