Optimal NUnit integration in Visual Studio - visual-studio

I am doing a demo, and want Nunit better integrated in Visual Studio.
Menu options to Create NUnit test project and test class with reference to the framework (Like Microsoft Test does)
Run/Debug "selected tests" and individual tests with debugging. I don't get it to work with [TestCase]-attribute, seems to run all testcases for a test.
Run failed tests with debugging.
Other cool stuff.
(Visual Studio 2015 RC)
I see some plugins in the gallery, but I am not sure if they do 1-3, and if they work.

Try NUnit Test Adapter or NUnit3 Test Adapter from the makers of NUnit, or ReSharper if you want test runners and more.
You can make you own Visual Studio project templates but I'd just use the basic class library and nuget to get nunit libraries
They won't give you everything but it can be start.

Related

Nunit tests are not shown in Test Explorer of VS2013 Express

I have visual studio 2013 express edition and I have referenced NUnit 2.6.2 version DLL, but I don't know why the Test Explorer is not showing the test cases.
I did searched for questions with similar problem and tried doing what suggested like the Nunit Framework from NuGet package and making sure the Nunit reference and adapter version are correct, etc. but none of them resolved the issue.
Right now I have cleaned up everything from my Visual Studio and have only Nunit 2.6.2 DLL added in reference.
Following is the out put from Package manager console.
PM> Get-Package
No packages installed.
Can someone please help me to know how to get the Nunit tests in my Test Explorer ?
You need the NUnit Test Adapter and not the NUnit 3 Test Adapter since you are using version 2.
Sorry... The NUnit Test Adapter and the NUnit 3 Test Adapter are both Visual Studio extensions. The Express editions of Visual Studio don't support extensions. Period.
You need to switch to either VS2015 or VS2017 Community Edition, which do support extensions. Then you can install either of the two adapters - depending on what version of the NUnit framework you are using.

How can we setup the NUnit Test Runner for WP7 with Visual Studio 2010?

I want to setup the NUnit Test Runner for WP7 with Visual Studio 2010 for unit testing WP7 apps.
I reffered to http://nunitwindowsphone7.codeplex.com/documentation but there is no NUnitTestRunner.dll that has to be referenced in the NUnitTestRunner that i have downloaded from http://nunitwindowsphone7.codeplex.com/
Please give any views on this asap.
I think you've simply forgotten to install the Windows Phone Developer Tools.
When you do it, your NUnitTestRunnerWP7.dll will compile and the tests will work just fine right from Visual Studio.

Create NUnit test with resharper

I installed Resharper 5 with visual studio 2010 Team system with NUnit. It finds NUnit and shows 2 types of tests in the options: MSTest and NUnit.
I can create a MSTest by right clicking the function. How do I accomplish this same thing but for NUnit?
AFAIK, there's no way to do this automatically.

MSTest in Express editions of Visual Studio 2010

I'm leaning toward using MSTest as unit testing framework for a new project but I'm concerned with cutting off developers (maybe even myself in the future and/or in some specific environment) using Express editions of Visual Studio.
I know MSTest wasn't available in VS2008 Express but with Microsoft pushing unit testing in recent years I guess they could've added it to VS2010 Express. However I couldn't find any info on this in the list of Express features and I don't want to download and install express just to verify this.
So, is MSTest supported in Visual Studio 2010 Express?
It does not appear in Microsoft's list of features of Visual Studio Express 2010, and it would appear (according to this blog post) that it is not supported. Since express editions do not allow add-ins, you cannot even use something like TestDriven.net to run tests from within Visual Studio Express editions.
If you were to use NUnit for testing, you may get more mileage. That blog post shows a way of running/debugging NUnit tests using a bootstrapper, but an easier way is to set NUnit as the start action (in Project Properties -> Start External Program), and then passing the name of your dll as an argument. This will start and run NUnit when you run/debug your project, allowing you launch your tests from within Visual Studio, and also debug them if needed.

Do I need Team foundation server in order to use CodedUI?

I'd like to write some basic tests for our web and Winforms applications.
I already own Visual Studio 2010 Ultimate. Do I also need TFS in order to use the new CodedUI tests?
No you don't need to have TFS in order to use Coded UI tests. You can create your tests in Visual Studio and run them direct from there, or via mstest. The main benefit TFS will add is the ability to execute tests across multiple physical and virtual tests machines via Test Manager. You will also get central collation of test results in the TFS repository.
No, you don't need TFS. Visual Studio 2010 Ultimate is quite enough to record and launch codedUI tests.

Resources