Build/Test Issues

Forcing NUnit

Started by devdept on 2,169 views

Hi There,

How do I force NUnit over MSTest in NCrunch?

Thanks,

Alberto
Hi Alberto,

I'm not entirely sure what you're asking. NCrunch uses different adapters for each of these frameworks. If you have a project using both frameworks, NCrunch will use both adapters to execute all of the tests.

It's possible to disable the adapters on a per-project basis via the configuration window.
Hi Remco,

Inside Visual Studio, we can manually run tests using VStudio Test Explorer (MStest) or Resharper(NUnit). I was wondering if we could specify a preference with NCrunch.

Thanks,

Alberto
Hi Alberto,

NCrunch uses its own adapters to interact with test frameworks, it doesn't integrate with Resharper or VSTest. So the only way for NCrunch to run NUnit tests is with its NUnit adapter, and the only way it can run MSTest tests is using its own MSTest adapter (which is actually an emulator).
Thanks Remco,

Yes, we decorate the tests with the following attributes that enable both MStest and Nunit. It's time to make a choice.

[TestCategory("Surf"), TestMethod, NUnit.Framework.Test]

Thanks again.

Alberto
For this you can just disable one of NCrunch's adapters and use the framework of your choice.

The MSTest one is probably higher performance, as it's actually an emulator (not integrated), so NCrunch has more optimisation options for it.

Post a reply

Log in to reply.