Quality Metrics Around Application Code
Tracking metrics around quality provides the necessary data to help us understand the health of the code for an application in a production environment.
The one metric that pops to everyone mind first is to track the number of defects (where a production environment is not working as the code was intended), but this number alone does not provide much information to help us gage the health of an application. Tracking the number of defects from production (arrivals) against the number of closed defects (kills) gives us a better picture showing two trends:
- How often defects are being reported from a production environment
- How well the team is doing in fixing the problems.
When you look at an Arrival/Kill chart, they usually include a trend line showing the accumulative number of open defects. The trend line will show if the number of open defects is growing or if teams are actively addressing defects.
There is a wide range in the criticalness of defects, two ways to look this is by tracking the priority and severity of each defect. This information along with the number of new defects arriving and the number defects being closed provides the data needed to start measuring the health of the code for an application.
- Priority: indicates the urgency with which the defect would need to be fixed
- Severity: indicates the effect the defect has on the system in terms of its impact.
Priority and severity are usually represented by a range of values to help differentiate the urgency of addressing each defect.
Tracking the percentage of high priority and severity defects over time can help teams understand the health of the code for an application. This percentage can be calculated at any given point in time by taking the number of high priority defects or critical severity defects and divide it into the total number of defects. Where this comes into play along with the other metrics is when metrics are tracked over time. Start tracking metrics to gather the necessary historical data teams need to develop acceptable standards for an application’s code base. When the metrics crest out of the range of acceptable, be sure to have a contingency plan in place addressing corrective actions. Metrics can play an important role for teams providing the data to be used in monitoring the health of their applications. All metrics should provide data to help answer a question, in this case, tracking the arrival/kill metrics, along with the percentage of high priority and severity defects, helps provide the data needed to answer the question: what is the health of an application from a code perspective”.