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

Notification

Icon
Error

Code coverage icons on test file
jmo21
#1 Posted : Wednesday, November 27, 2013 11:03:05 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/27/2013(UTC)
Posts: 2
Location: United Kingdom

Trying to get to grips with NCrunch, and starting to enjoy having it in my workflow.

Currently the code coverage icons also appear in my Unit Test class.

At the moment they are all there, and when you hover over them (at any line) they say "covered by 1 passing tests", left clicking the icon to show tests, gives a link to the current test you are looking at.

Also, n the icon column, at the first line of each test, a ">" icon appears. Hovering over this it tells me "Tests starting line XX" where is XX is the actual line. what is the point of this icon?

I found the "Instrument output assembly" config setting which switches them off, but it feels like something that NCrunch should figure out itself. For example, don't automatically instrument a class marked [TestClass]
Remco
#2 Posted : Wednesday, November 27, 2013 12:03:11 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi, thanks for posting and for taking the time to try out NCrunch!

As NCrunch monitors all test coverage throughout a solution, your test projects are included in this coverage. Tests do, physically, cover themselves. In many cases the coverage markers on the test can be useful as they allow you to easily analyse complicated test code to see where it is being executed. They also allow you to analyse performance issues inside the test. For this reason, the vast majority of people prefer to have the markers showing next to their test code.

If you find this confusing or it doesn't fit with your view on how the product should work, you are correct in your understanding that turning off the 'Instrument output assembly' option will remove the coverage markers from your test project.
jmo21
#3 Posted : Wednesday, November 27, 2013 1:41:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/27/2013(UTC)
Posts: 2
Location: United Kingdom

thanks Remco.

On further investigation, you need this so that changing a Unit Test code automatically triggers a re-run of tests.

I think this seems like a good idea, but how quickly does the test suite run. Is it possible to configure when the rest run will trigger? eg. wait til compilable, wait til typing stops, wait 3 secs after last key press etc?
Remco
#4 Posted : Wednesday, November 27, 2013 11:17:03 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Yes - the instrumentation is required for impact analysis, so you'll find that switching it off will take away some of the intelligence of the engine in its test prioritisation.

There are a couple of settings you may find useful in changing the manner of build/test execution. Have a look at sliding build delay and custom engine modes.
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download