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

Notification

Icon
Error

Condition Coverage
npateman
#1 Posted : Thursday, August 22, 2024 2:51:15 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/1/2022(UTC)
Posts: 5
Location: United Kingdom

Thanks: 1 times
I would like to suggest a feature of condition coverage.

At current NCrunch shows a green marker showing that you have covered a line of code, but it does not take into account the number of conditions on that line.

For example, when used in combination with something like SonarQube, NCrunch will inform you the code is covered, by SQ may say that you have only covered 2 of 4 conditions.

It would be great if rather than a green marker, it showed an orange marker and then listed the conditions that have been covered, or at a minimum, a count. When all conditions are covered on that line it could then turn green.

Nick.
Remco
#2 Posted : Thursday, August 22, 2024 11:33:39 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)
Thanks for sharing this request.

This has been asked for a few times in the lifespan of the product, but we decided not to go down this road for the following reasons:
- UI complexity: Having an additional or half state on coverage markers makes the UI harder to interpret
- Performance: A structure like this would change a single dimensional data structure (one state for a single line of code) to a multi-dimensional one (multiple states per line). This would greatly increase the memory and CPU requirements of the engine to be able to handle the more complex data structures, thus significantly slowing the engine.
- Engineering: It's actually really hard to do. The algorithm that handles code coverage merging is massive and very tightly constrained. Right now it performs well enough to keep up with merging for a 100+ thread grid without needing more than a single thread. Adding multiple coverage status values per line would likely make the system unmaintainable.
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.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download