Over a million developers have joined DZone.

Code Metric Visualization: Lines of Code and Code Coverage

Coverage is what counts. And you can see it at a glance, just like when you're painting a wall. When voting for visual tools... the eyes have it.

· DevOps Zone

Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

One of the features of NDepend that we get a lot of positive feedback about is its data visualization, and it’s really no surprise. The code metric visualizations allow teams and managers to quickly see what is happening in their code base. With NDepend’s custom code metrics, developers can generate visual reports of what matters to facilitate teamwork as well as keep management in the loop.

We have written before about how a company can use NDepend’s visualizations as a sort of “radiator” to track changes in the source code over time. We also have examples of companies (such as Stago and Siemens Healthcare) using it to great effect in helping architects and developers communicate effectively. %|-748044178_1|%This resulted in producing better quality end products while still meeting deadlines.

Not only is it very informative, but the treemap view is also pretty aesthetically pleasing. We wanted to show it off and at the same time give a glimpse of how NDepend has changed over the years. We are all about making your code beautiful and following best practices, so now you can see how well we follow our own rules.

We decided to compare Lines of Code (LoC) against code coverage of NDepend in its own treemap view. We ran an analysis on both the current version of NDepend as well as a build from 2013.

In this view, red means zero coverage, orange / yellow means not enough, and green means full coverage. As you can see, the source code for NDepend has grown in both lines of code and code coverage. Back in 2013, not even half of the source code was automatically tested but the latest version is over 80% covered by testing. Still, there are some red areas that we are improving on!

Image title

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

Topics:
loc ,code coverage ,visualization ,testing

Published at DZone with permission of Erik Dietrich, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}