English 中文(简体)
Code coverage with nUnit? [closed]
原标题:

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 8 years ago.

Is there a way to see the code coverage when using nUnit? I know there s such a feature in Visual Studio, but can you use it with nUnit or only with the built-in vs unit tests?

最佳回答

You can use NCover. Now its commercial, but version 1.5.8 (at the bottom of page, community edition) is still free and if you want to visualize it, then use NCoverExplorer.

EDIT:

It s possible to wrap nUnit or mbUnit with Visual Studio code as well. VSTS Code Coverage Runner

问题回答

Visual Studio 2012 finally added support for third party unit test framework.

You can add frameworks using the Extension Manager and automatically "Code coverage" starts working with installed framework.

Code coverage is available only in Visual Studio Ultimate or Premium editions.

See my reply in Does VS2010 Code Coverage support nUnit?

PartCover is free and I ve just blogged how to use it with NUnit See this link

See SD C# Test Coverage. Comes with built-in visualization of test coverage data over your source code as well as summary reports.

If you work at a company with a security-/saving-money-/hassle-employees- policy restricting your choice to VS2010 (Premium or Ultimate), see my answer to: Running NUnit tests in Visual Studio 2010 with code coverage

There, I refer to this other answer, but also give some more details than that: Does VS2010 Code Coverage support nUnit?

I know, copied/referring answers (esp. of others) are worth downvoting, but as I said, I give some details, which would ve helped me quite a lot.





相关问题
State based testing(state charts) & transition sequences

I am really stuck with some state based testing concepts... I am trying to calculate some checking sequences that will cover all transitions from each state and i have the answers but i dont ...

Running genhtml using cygwin Perl.exe in Windows

I m trying to run genhtml using perl.exe from Cygwin in Windows. I have installed cygwin and placed genhtml in the bin directory of cygwin. I went to that directory and used the command line in ...

Highlight text from Visual Studio 2008 add-in

I m writing another code coverage tool for .NET with Visual Studio 2008 integration. Everything goes well except one thing: I can t find a way to highlight some code chunks. I need it to inform user ...

Cobertura ant script is missing Log4J classes

I tried to get Cobertura running inside my ant script, but I m stuck right at the beginning. When I try to insert the cobertura taskdef I m missing the Log4J libraries. Ant properties & ...

How to omit using python coverage lib?

I would like to omit some module that are in some particular directory : eggs and bin coverage -r -i --omit=/usr/lib/,/usr/share/,eggs,bin Name ...

Code coverage with nUnit? [closed]

Is there a way to see the code coverage when using nUnit? I know there s such a feature in Visual Studio, but can you use it with nUnit or only with the built-in vs unit tests?

run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

热门标签