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

Notification

Icon
Error

XBehave support
mrfox27
#1 Posted : Monday, February 25, 2013 4:05:53 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/10/2012(UTC)
Posts: 2
Location: United Kingdom

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

Do you have any plans to support XBehave.net (https://github.com/xbehave/xbehave.net)? (current version is

At present nCrunch doesn't support the "Scenario" attribute I can force the test to be recognised by using "Theory":

[Theory]
[InlineData(0, 1)]
public void PushingAnElementOntoAStack(int firstElement, int secondElement)
{
bool actual = false;

"When comparing elements"
.When(() => actual = firstElement.Equals(secondElement));

"Then comparison should fail"
.Then(() => actual.Should().BeTrue("this is deliberately incorrect to generate failure!"));
}

but it doesn't appear to execute the XBehave code in the body of any tests (the test above passes).

Any info would be much appreciated... :)
Remco
#2 Posted : Monday, February 25, 2013 9:59:59 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting!

This isn't a framework I'm familiar with myself (you're the first person to ask about it), although a quick analysis suggests that the framework requires some kind of integrated interceptor to execute the assertions before completing the test.

I'm not yet sure what's involved in introducing the integration point that can make this happen. A big constraint at the moment around NCrunch's Xunit support is that it's current handled through Gallio, which does have its advantages, but also introduces certain limitations. I think that this is something that may need to be addressed in future when NCrunch's Xunit support is matured (i.e. direct integration).


Cheers,

Remco
1 user thanked Remco for this useful post.
mrfox27 on 2/26/2013(UTC)
mrfox27
#3 Posted : Tuesday, February 26, 2013 10:12:39 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/10/2012(UTC)
Posts: 2
Location: United Kingdom

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Thanks Remco - this framework was something that I was just trying out but without nCrunch support I'm not going to switch from my current usage of NUnit. Hopefully direct integration of XUnit support won't be too far in the future, and that may re-open the door for me to try out XBehave again (by which time XBehave will also have had chance to mature). :)
1 user thanked mrfox27 for this useful post.
Remco on 2/26/2013(UTC)
james
#4 Posted : Wednesday, March 13, 2013 10:38:50 AM(UTC)
Rank: Member

Groups: Registered
Joined: 3/13/2013(UTC)
Posts: 24
Location: United Kingdom

Thanks: 6 times
Was thanked: 6 time(s) in 6 post(s)
I just had a play about with xBehave. It looks great. Data driven BDD tests done right. It would be great to get this working in NCrunch!

I'm guessing Gallio will need patching to support xBehave not necessarily NCrunch?
Remco
#5 Posted : Wednesday, March 13, 2013 9:07:05 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I believe so :)


Cheers,

Remco
Remco
#6 Posted : Saturday, March 30, 2013 10:18:43 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
For anyone interested, James and I did some more looking into this problem and found that NCrunch DOES actually work with XBehave.

However, you need to make sure that somewhere in your test project, you still make use of an Xunit attribute (i.e. FactAttribute or something else) in order to let Gallio's framework detector actually identify Xunit as being used by the project, otherwise none of the tests within the project will be found.

The easiest way is just to create a dummy test fixture containing an empty 'Fact' test.

1 user thanked Remco for this useful post.
yanglee on 4/27/2013(UTC)
adamralph
#7 Posted : Monday, September 21, 2015 7:00:18 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/21/2015(UTC)
Posts: 1
Location: Switzerland

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
For anyone watching this thread, I'd just like to add that there have been significant improvements in the execution of xBehave.net tests via NCrunch since the release of xBehave.net 2.0 (and xUnit.net 2.0), thanks to some great work by Remco.
1 user thanked adamralph for this useful post.
Remco 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.054 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download