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

Notification

Icon
Error

Only show coverage from pinned tests (or disable coverage and rerun pinned tests).
GreenMoose
#1 Posted : Thursday, September 26, 2013 5:08:51 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 503

Thanks: 142 times
Was thanked: 66 time(s) in 64 post(s)
v1.46

Sometime when I refactor code I want to ensure some code paths are executed from my newly added tests.
However since multiple tests are already covering the code I need to, on every line I want to check, click on it and see if my any of my tests are part of it.

It would be helpful if I could either:
A) Enable only pinned tests (e.g. with engine mode "run pinned tests automatically") to calculate the code coverage.
B) In some easy way reset the code coverage, so I can have above engine mode running to see what code paths my pinned tests are covering, without having to close solution and remove _NCrunch_* folder.

I guess A would be harder to implement but feels like a more compelling feature (toggling that option to quickly spot code coverage without rerunning everything).
Option B I guess can be easily fixed by simply having another command "Reset current metrics" or similar.

Thanks.

*Edit: I just realized removing _NCrunch_* folder was not a very good idea since my pinned statuses for tests seem to be stored in that folder. Shouldn't those "pinned statuses" be stored in *.ncrunchsolution.user instead?
Remco
#2 Posted : Thursday, September 26, 2013 5:36:10 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi,

This is a great suggestion and it fits well with the upcoming idea of adding new configurable options that can be attached to individual engine modes. You might be interested to learn that option A is actually easier to implement, as it gives a clean solution where the coverage is shown selectively (this could be considered similar to choosing to show coverage from one test only, which already exists as a feature).

The 'Pinned' status of tests is generally considered to be fairly transient. For complexity reasons, it isn't really worth storing in the user configuration file, as the only situation where such data would be lost would be either when the _NCrunch_ directory is deleted, or when NCrunch is upgraded.

But yes, I definitely would not recommend deleting the _NCrunch_ folder unless you are trying to recover from a corrupt state. This folder also contains the known execution times of all tests in the solution, which can be very important knowledge when prioritising future execution runs. You'll also lose all your code coverage, execution state, etc.
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