Build/Test Issues

String parameter causes "This project contains multiple NUnit tests that share the same name."

Started by KurtisMiller on 4,769 views

In the following circumstance, NCrunch reports that these test cases result in the same test name.


[TestCase("this is my parameter that is more than meets the eye")]
[TestCase("this is my parameter that is more than you can handle")]


(In my actual test, this is a relative URL that varies in some of the URL parameters later in the string. i.e. /path/to/api-method?param1=blah&param2=cheese)

The duplicate test identified by the message is:

RootNamespace.DescendantNamespace.TestFixture.TestName ("this is my parameter that is more tha...")


As you can see, NCrunch only looks at the first 37 characters before concluding that both test cases are the same.

NUnit itself seems perfectly fine with these.

37 characters seems like an unusual boundary condition.

Using NCrunch 3.3.0.6 for VS2015
Hi,

This is, unfortunately, a problem in NUnit itself.

NUnit truncates the test parameters after a certain limit, making the entire parameter become inaccessible to test runners like NCrunch.

You'll need to raise this with the NUnit team - https://github.com/nunit/nunit.

Post a reply

Log in to reply.