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

Notification

Icon
Error

Parameterized TestFixtures not fully recognized anymore with NUnit3
desolat
#1 Posted : Friday, January 8, 2016 8:45:48 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/8/2016(UTC)
Posts: 2
Location: Germany

Here's a problem I'm experiencing with NCrunch 2.19.0.4 on Visual Studio 2013 in a project with NUnit 3.0.5813.39031:

I'm using parameterized TestFixtures since NUnit 2 and the resulting tests were correctly recognized by NCrunch. Now with switching to NUnit3 NCrunch only shows a single test for a parameterized TestFixture. Debugging shows that this test instance uses the parameters of the first TestFixture line. The rest of the TestFixture lines is silently ignored.

Btw. the Visual Studio test runner with the NUnit 3 adapter correctly recognizes the parameterized TestFixtures.

Is this bug already known? Is this sufficient information for a fix?
Remco
#2 Posted : Friday, January 8, 2016 10:02:32 AM(UTC)
Rank: NCrunch Developer

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

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

Thanks for sharing this issue.

This looks to be a problem with NCrunch's name generation for the parameterized TestFixture. For some reason, NCrunch isn't correctly adding the parameterized values onto the fixture name when detecting the test. This may have something to do with how NUnit3 is reporting the test fixture.

I'll need to look into this in more detail to try and arrange a code fix. For the time being, I recommend avoiding this feature or sticking with NUnit2.
desolat
#3 Posted : Friday, January 8, 2016 10:10:16 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 1/8/2016(UTC)
Posts: 2
Location: Germany

Hi Remco, one more information on this issue: NCrunch issues a warning for all affected tests:

Quote:
This project contains multiple NUnit tests that share the same name. This prevents NCrunch from uniquely identifying tests during their discovery and execution, distorting the reporting of test results. Ensure your tests always have a unique name within the scope of their project.
Remco
#4 Posted : Friday, January 8, 2016 11:17:43 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Yes - thanks. I was able to reproduce the issue using the code sample you gave me, and I also saw this :)
Remco
#5 Posted : Monday, March 21, 2016 2:17:21 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
For anyone interested, this issue has been resolved in the just released v2.20 - http://www.ncrunch.net/download.
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.032 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download