Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to Easily and Quickly Identify Uncovered Methods
CoolBreeze
#1 Posted : Tuesday, July 15, 2014 3:22:58 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 7/11/2014(UTC)
Posts: 79
Location: United States of America

Was thanked: 9 time(s) in 9 post(s)
I want to be able to quickly identify which modules have been executed by my tests and which modules have not been executed by my tests.

For example: One of my code files has these modules:

IdNew
Read
ReadById
ReadCounts
ReadInfo
Validate

I've written tests for: IdNew, Read, and ReadCounts.

I ran my tests and look at the Metrics.

I see 100% coverage for my tests. OK so all of my tests ran.

I look at the metrics for the main code file. I see 50% coverage of the code lines.

But what methods didn't get executed by the tests?

At this point in my work process I want to easily see all methods in my main code file which didn't execute due to running the tests by doing something like clicking on a + sign next to the main code file name in Metrics. I'd like to see it expand to show which modules executed and which ones didn't execute (I'm not sure if that's the best UI design at the moment but wanted to give an idea of what I was looking for). Since I can't see that info I do this:

I open the main code file and I look through the green and black markers (which takes time). I mentally note which methods were called and which ones were not called.

I go back to my test code file and start writing tests for the uncalled methods.

I repeat the test run and examine the code file again.


Ed
Remco
#2 Posted : Tuesday, July 15, 2014 9:47:43 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Ed,

Thanks for posting!

Right now, it's only possible to assess metrics at file-level using NCrunch. It won't go as far down as method level.

The reason for this is that for NCrunch to be able to correlate code coverage with methods, it needs to extract additional information from the build and/or test processes. This naturally results in more processing, poorer performance, etc.

If you'd like to see this as a feature, you're welcome to vote for it on uservoice. If enough people wish to see it, it may be worth the hit in performance, or perhaps a new config option.


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.025 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download