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

Notification

Icon
Error

Support for xUnit 2.2
onovotny
#1 Posted : Saturday, March 18, 2017 2:20:20 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 12
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
NCrunch currently ships with xUnit 2.1. xUnit 2.2 contains numerous performance enhancements, over 2.1 -- I would strongly suggest updating to that.

Remco
#2 Posted : Saturday, March 18, 2017 10:44:14 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, yes this is on the list of things to address.

Note that if you are using NCrunch with .NET Core, it will always use the version of xunit you are referencing from your test project.
onovotny
#3 Posted : Saturday, March 18, 2017 11:28:59 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 12
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
I saw that there are binding redirects for the desktop version. In consultation with Brad Wilson, we don't think that should be needed and could break things. Runners like NCrunch should be using the xunit.runner.utility library, the abstractions library and that's it -- they should definitely not have any direct dependency on xunit.core or xunit.execution.*. We'd be happy to work offline with you on recommended usage patterns.

Cheers!
Oren
Remco
#4 Posted : Sunday, March 19, 2017 7:37:32 AM(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 Oren,

The binding redirections were needed because the xunit components have been split between libraries, for example, there is xunit.core.dll which is the assembly used for attribute declarations, then there are xunit.abstractions.dll and xunit.execution.desktop.dll for the runtime execution.

This creates a problem, because a user can have a reference to xunit.core.dll without either of the other components present. This meant that the other xunit components had to be distributed with NCrunch itself, which opened the door to potential cross version issues (i.e. if the user is making use of xunit.core.dll v2.2 while the other binaries shipping with NCrunch are v2.1).

The above problem doesn't exist under .NET Core, because this works using package references that ensure all xunit runtime libraries are installed on the dev machine. This allows NCrunch to just use whatever the user feeds it, so everything is consistent. I expressed my reservations about the splitting of functionality between xunit libraries in the early stages of xunit integration (other frameworks use a single library), though I think I raised this either too late or there were reasons for why it couldn't be changed.

When I introduced the integration with xunit v2 3 years ago, integrating directly with xunit.core/xunit.execution proved to be the most effective way to make NCrunch work with xunit. Because this was quite some time ago, I don't remember many of the details behind this reasoning, but I can say that I'm reluctant to redesign the integration with xunit without a very good reason for doing so. The current implementation took several months of hard troubleshooting to get working reliably and with acceptable performance. I'd prefer not to go through that again unless we have a serious functional issue.
onovotny
#5 Posted : Sunday, March 19, 2017 12:45:45 PM(UTC)
Rank: Member

Groups: Registered
Joined: 3/17/2017(UTC)
Posts: 12
Location: United States of America

Was thanked: 2 time(s) in 2 post(s)
What you're doing goes against the explicit design goal of xUnit. Runners are not supposed to dictate which version of xunit.core a library author uses. Xunit.runner.utility, is version independent and xunit.runner.utillity 2.1 *can* launch tests against xunit.core 2.2, for example. That's why abstractions exists, to have a locked assembly version with interfaces that are shared across that divide.

NCrunch itself should not depend on xunit.core or execution, for example.


Happy to discuss on Slack if you want: https://xunit-slackin.herokuapp.com/
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download