According to this schema VS2010 Premium and Ultimate has a tool for checking Code Coverage - together with a few other testing tools. Does this support nUnit too, or just MS test?
This is actually a code coverage utility tool developed specifically for Java.
Calculating code coverage You should now have a folder named "CodeCoverage" in the same folder where you executed the above command. OpenCover generates a file named "results. xml" which contains the code coverage information. This files contains a lot of information but isn't very readable.
JetBrains dotCover is a . NET unit test runner and code coverage tool that integrates with Visual Studio and JetBrains Rider. Make sure you know to what extent your code is covered with unit tests. dotCover calculates and reports statement-level code coverage in applications targeting .
Code coverage is to determine to what portion of your project code is being tested by Unit testing; you can use the code coverage feature of Visual Studio. Code coverage is an option, when you run the test methods, using Test Explorer. On the Test menu, choose Analyze Code Coverage.
Visual Studio 2012 added support for third party unit test frameworks.
The test framework plugins available include:
Adding support is very easy because you can add it from the Visual Studio Extension Manager.
For example you can add the "NUnit Test Adapter".
And now the "Analyze Code Coverage" works with third party unit framework. You can inspect all tests or only one.
And if your using VS 2010 don't be afraid to upgrade to VS2012 because sln files are compatibles (you need VS2010 with SP1).
It's doable, but requires a bit of setup. I just got it working with xUnit. Presumably the below will work with NUnit too.
For this to work, you'll need three projects
A VS Test Project -- VSTest
Now when you run the VS2010 test, it'll correctly instrument the test dlls, run the code runner and gather the info into Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With