Feature Suggestions

Condition Coverage

Started by npateman on 1,599 views

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.
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.

Post a reply

Log in to reply.