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

Notification

Icon
Error

NUnit 3.5 Tests not found
msevestre
#1 Posted : Monday, January 23, 2017 3:17:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/21/2013(UTC)
Posts: 7
Location: Canada

Hi there,

We just updated our test suite from NUnit 2.6.4 to Nunit 3.5. Ncrunch does not recognize tests anymore (No tests are queued for execution, Monitoring no tests etc...)

Downgrading NUnit back to 2.6.4 and NCrunch finds our tests again. I have just installed the latest 3.3.0.6 using Visual Studio 2015. Same problem

It seems that NCrunch 3.5 should be supported according to the documentation. I deleted all the NCrunch files and folder under the solution but the problem still persists.

Is there a specific option somewhere to enable NUnit 3.5 support?

Bests,
Michael

PS:
Disregard my message to support with the same question. Thanks
msevestre
#2 Posted : Monday, January 23, 2017 9:51:17 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/21/2013(UTC)
Posts: 7
Location: Canada

I managed to find the reason for the issue but why the problem occurs is still a mistery.
There is one file in our tests suite that is causing the issue. If I remove that file, everything is fine, if I add that file back, NCRunch cannot load the tests (ALL TESTS in the solution, not only the set of tests in the file). It works fine with NUnit 2.6.4

The file is testing an object that uses an enumeration defined in a C++ managed assembly as parameter of a method. If I remove the enum parameter from the method signature, all works fine.... this is vey very strange
Any idea what might be causing the issue
Remco
#3 Posted : Monday, January 23, 2017 11:25:45 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

NUnit v3 is a complete redesign of NUnit with massive internal changes to the test framework. Accordingly, this required complete reintegration with NCrunch from scratch. Essentially, NUnit v2 and v3 are completely different testing frameworks.

Complex types as parameters on tests are deceptively difficult to handle in both the test framework and its host runner (NCrunch), as the parameters themselves need to be serialized in a consistent manner between different environments. I would recommend steering away from using unmanaged types as parameters to test cases. Wrap them if you can.

It's possible that NUnit v3 itself doesn't support these types as test case parameters. Have you tried running your NUnit v3 tests using any other tooling?
msevestre
#4 Posted : Tuesday, January 24, 2017 2:24:19 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/21/2013(UTC)
Posts: 7
Location: Canada

Hi Remco,

Nunit v3 support these types. I ran the tests using Resharper (which I had not used for testing well over 2 years) as well as nunit console and all is well.
In the meantime, I did wrap those parameters into C# and life is great again with NCrunch (I should here mentioned that NCrunch is an amazing tool!)
But at least you know that there is some friction. There are probably not a lot of users using C++ managed enum from C# so it may safely be ignored :)

Cheers,
Michael
Remco
#5 Posted : Tuesday, January 24, 2017 9:28:53 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Michael,

Thanks for confirming! Is there any chance you could share the enum/test declarations with me? I'd really like to investigate further to see if it's possible to fix this.
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.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download