I was fooling around the NUint, hoping to discover a way to realize which line of code passes in which test.
Imagine I have a method for which I have 3 tests. Is there any way to find out which test checks which line of code?
Having used NCover, I know you can find out which lines have been tested and which have not. However, you really can't see which unit checked that code.
It can be really useful when dealing with tons of tests...
Also known as closed-box testing, data-driven testing, or functional testing. Also known as translucent testing, as the tester has limited knowledge of the insides of the application. Also known as clear-box testing, structural testing, or code-based testing. Performed by end-users and also by testers and developers.
In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures—are tested to determine whether they are fit for use.
Unit Testing is done during the development (coding phase) of an application by the developers. Unit Tests isolate a section of code and verify its correctness. A unit may be an individual function, method, procedure, module, or object.
JetBrains dotCover can help you to get the info you are looking for. It integrates with the ReSharper unit test runner and collects per-test data. You can see which code is covered by the each particular test (with corresponding highlighting in VS). And what is more interesting, for every piece of code you can get list of tests which cover it and easily rerun them.
Additional info is available here: http://blogs.jetbrains.com/dotnet/2010/07/show-covering-test-with-dotcover/
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