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

Notification

Icon
Error

NCrunch, MbUnit, NUnit
CoolBreeze
#1 Posted : Wednesday, April 8, 2015 7:59:39 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 79
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
Remco,

I have a test project with 50+ test classes using mbUnit. I installed NUnit and then changed the imports from MbUnit to MUnit for one of the test classes and then decorated the tests with the Nunit attributes.

NCrunch Tests window shows only the MbUnit tests but doesn't show the NUnit test.

When I change the one test class from NUnit back to MbUnit the Tests window now shows the test class again.

It would be nice if MbUnit and NUNit would play well together. That way I could see all of my tests in one project instead of having to switch between two test projects.

Looks like a workaround would be to create a 2nd test project that has tests using only NUnit.

I'll let you know what's happens when I try that idea.

Btw: As I mentioned in my other topic it looks like NCrunch Tests window showed both MbUnit tests and xUnit tests in the same project. Not sure why NCrunch
wouldn't handle MbUnit and NUnit. Maybe some clash with attributes...? I don't know...

Ed

Remco
#2 Posted : Wednesday, April 8, 2015 9:58:09 PM(UTC)
Rank: NCrunch Developer

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

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

This use case should work correctly. I have a number of NCrunch test cases where all frameworks have a test in the same assembly.

Is there any sample code you can share with me?
CoolBreeze
#3 Posted : Friday, April 10, 2015 4:25:00 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 79
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
Hi Remco,

I think the problem has to do with when the developer first adds NUnit to the project by adding a reference, adding the imports and decorating a method with <Test>.
I'm wondering if NCrunch is not picking up the initial change to NUnit.

I added Nunit and NCrunch to a completely different solution\project and noticed the same behavior.

I think NCrunch needs to go through an extra build or two to notice NUnit and then the test(s) show up in the Tests window.

It's hard to say this is what's actually happening because I'm focused on writing the tests and checking the results - so I may have missed some behavior
or other details related to why the NUnit tests don't show up right away.

But eventually NCrunch did see & run the tests.

Ed
Remco
#4 Posted : Friday, April 10, 2015 9:24:35 PM(UTC)
Rank: NCrunch Developer

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

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

This is interesting. In theory, adding a reference to a test framework should modify the project XML, which would in turn trigger NCrunch to reload the project, discover the framework reference and perform an analysis step to identify the tests.

Is there any chance you can give me some steps to reproduce this on a clean project? Perhaps I can figure out why this is happening...

Does the problem resolve itself after an engine reset?
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.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download