Build/Test Issues

NCrunch, MbUnit, NUnit

Started by CoolBreeze on 5,451 views

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

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?
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
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?

Post a reply

Log in to reply.