Build/Test Issues

Parameterized TestFixtures not fully recognized anymore with NUnit3

Started by desolat on 6,826 views

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?
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.
Hi Remco, one more information on this issue: NCrunch issues a warning for all affected tests:

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.
Yes - thanks. I was able to reproduce the issue using the code sample you gave me, and I also saw this :)

Post a reply

Log in to reply.