Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Code Metric Visualization: Lines of Code and Code Coverage

DZone's Guide to

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 ·
Free Resource

Learn how integrating security into DevOps to deliver "DevSecOps" requires changing mindsets, processes and technology.

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

Learn how enterprises are using tools to automate security in their DevOps toolchain with these DevSecOps Reference Architectures.

Topics:
loc ,code coverage ,visualization ,testing

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}