Visual studio has a built-in unit test framework. I am wondering if I can use nunit instead?

有帮助吗?

解决方案

Yes, TestDriven.Net, Nunit and Resharper provide integration with VS. More details in the two posts below (in response to the same question).

Unit test, NUnit or Visual studio?

and

Unit test, NUnit or Visual studio?

其他提示

Using NUnit without extensions

This answer is long overdue, but I'm using NUnit in Visual Studio without any additional extensions (that are mainly also not free).

The whole idea is to configure your test project (a usual Class library project actually) so that when you hit F5 or Ctrl-F5 it automatically starts NUnit GUI and starts test execution.

The main benefit of this project configuration (all configuration steps are described with images) is that it's easy to also debug your tests if you need to when you have bugs in them.

Here's a free Visual Studio addin for NUnit: NUnitAddin

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top