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

Notification

Icon
Error

Can't run tests with VS 2017 / XBehave 2.2.0-beta0003-build685 / XUnit 2.2
brightoniant
#1 Posted : Thursday, May 25, 2017 7:43:44 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/13/2016(UTC)
Posts: 8
Location: United Kingdom

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

As a follow on from our chat on Twitter, I'm unable to get NCrunch working with the aforementioned setup.

I read on a separate post to try replacing the XUnit dlls in the extension directory with the 2.2 ones, however I have gone from error relating MarshallByRefObject (or whatever it was) to no tests being discovered at all. I remember previous versions of NCrunch required a solitary [Fact] attribute within an assembly containing XBehave tests in order to work, however this didn't make a difference.

Any ideas?
Remco
#2 Posted : Thursday, May 25, 2017 9:00:49 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, thanks for getting back to me on the forum.

My hope is that this isn't a version specific integration issue. Would you be able to submit a bug report after you've had the test discovery fail? There may be something in the report that can help inform us.
brightoniant
#3 Posted : Thursday, May 25, 2017 12:33:00 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/13/2016(UTC)
Posts: 8
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Hiya

I've just submitted the bug report. Hopefully you'll receive it soon.

Cheers
Ant
Remco
#4 Posted : Thursday, May 25, 2017 11:03:40 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)
Thanks Ant. Here are the errors from the report:

An exception thrown while processing the module 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\Modules\XUnit2\nCrunch.Module.XUnit2.crunchmodule': System.IO.FileNotFoundException: Could not load file or assembly 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot find the file specified.
File name: 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

An exception thrown while processing the module 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2017\OldXUnit2\nCrunch.Module.XUnit2.crunchmodule': System.IO.FileNotFoundException: Could not load file or assembly 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot find the file specified.
File name: 'xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].




A couple of things to check:

- Make sure you remove the OldXUnit2 subdir in your NCrunch installation directory. NCrunch searches and loads modules dynamically, so with this directory being there, NCrunch will still try to load it.
- Check that you've replaced all 3 of the packaged xunit binaries under Modules\XUnit2
brightoniant
#5 Posted : Friday, May 26, 2017 1:05:18 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/13/2016(UTC)
Posts: 8
Location: United Kingdom

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

I have just submitted another report after ensuring the two steps above have been done, namely I have verified the dll versions and removed the OldXunit2 folder.

Still no joy, however.

Thanks
Ant
Remco
#6 Posted : Monday, May 29, 2017 5:19:46 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)
Thanks Ant. I think it's best I just solve this problem properly by introducing proper support for xunit v2.2.

This task has been pushed out a bit because it's quite complex. The original xunit integration wasn't designed properly and needs to change to work simultaneously with different versions of xunit. I'll let you know as soon as I have something available, hopefully later this week.
Remco
#7 Posted : Thursday, June 1, 2017 6:41:53 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)
brightoniant
#8 Posted : Thursday, June 8, 2017 9:26:06 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/13/2016(UTC)
Posts: 8
Location: United Kingdom

Was thanked: 1 time(s) in 1 post(s)
Hey Remco

I thought I had replied to this, but I hadn't! Sorry. That build worked great for me - thanks

Cheers
Ant
1 user thanked brightoniant for this useful post.
Remco on 6/8/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.068 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download