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

Notification

Icon
Error

xUnit tests classes with the same name cause NCrunch not to execute the test
juanmanuelmedina
#1 Posted : Wednesday, March 19, 2014 4:06:42 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/19/2014(UTC)
Posts: 1
Location: United States of America

We are using xUnit to run our Solution tests.

Recently we added multiple types of tests that test the same classes but with different intentions, that is we have Unit, Integration and Acceptance tests.
All tests classes are in different namespaces.

When running the tests using the ReSharper runner, there are no issues.

However, NCrunch seems unable to differentiate the tests if the test class names are exactly the same.

For example,


namespace Tests.Unit.Repository
{
public class RepositorySpecs
{
...

namespace Tests.Integration.Repository
{
public class RepositorySpecs
{
...

Will cause a message like:

"This test was not executed during a planned execution run. Ensure your test project is stable and does not contain issues in initialisation/teardown fixtures."


Of course, renaming the test addresses the issue, but I have a hard time asking our large development team to change convention for naming since this is only an issue with using NCrunch.

I checked around on the forums and found out this type of message is due to a number of issues, but did not see anything particular about duplicate class names causing confusion.

Note that the namespaces are different, but both Unit and Integration are in the same project.


Is there a setting or a known issue I am missing? Note that excluding one of the namespaces does not seem to address the issue.



Best Regards,


Juan M. Medina
Remco
#2 Posted : Wednesday, March 19, 2014 7:59:14 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Juan,

NCrunch has no deliberate constraints like this ... as far as I know, the code you've described should work correctly.

I am aware that having tests with the same namespace, class and method name can cause issues, as NCrunch uses these three pieces of information to uniquely identify them. However, in your case, the namespaces are different, so the tests should be shown and tracked separately from each other.

I've just tried a few tests myself, and I can't seem to reproduce this issue with a code sample. Is there any chance you could throw together a project that produces this problem and submit it through the contact form? I wonder if there is something deeper here that is amiss.
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download