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

Notification

Icon
Error

String parameter causes "This project contains multiple NUnit tests that share the same name."
KurtisMiller
#1 Posted : Friday, August 18, 2017 5:46:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/18/2017(UTC)
Posts: 1
Location: United States of America

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

Code:

[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:

Quote:
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
Remco
#2 Posted : Saturday, August 19, 2017 12:16:56 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
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.
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.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download