Software Testing Metrics

Software Testing Metrics are important to quantify the quality of software testing. Let’s discuss some of the common Test Metrics.

Defect Density (%)

It’s the number of defects per thousand lines of code and shows the quality of the application code. Defect Density should be very minimal. Higher the %age of Defect Density, lower the confidence in the software quality. It can also be calculated in terms of – Module(s) or Requirement(s).

Defect Density = (# of Defects / KLoC) * 100

Defect leakage (%)

It is measured to identify the number of defects missed in the software testing phase.

Defect Leakage =  (Defects found in the ‘N+1’ testing phase / Defects found in the ‘N’ testing phase) * 100

Test Cases – Passed %age

The number of test cases passed in the execution phase divided by the total number of test cases.

Passed %age = (# of test cases passed/total # of test cases executed) * 100

Test Cases – Failed %age

The number of test cases failed in the execution phase divided by the total number of test cases.

Failed %age = (# of test cases failed/total # of test cases executed) * 100

Test Cases – Blocked %age

The number of test cases blocked in the execution phase divided by the total number of test cases.

Blocked %age = (# of test cases blocked/total # of test cases executed) * 100

Test Cases – Execution %age

The number of test cases executed in the phase divided by the total number of test cases written or available for test execution in the corresponding phase.

Test Execution %age = (# of test cases executed/total # of test cases available) * 100

Test Case Writing Productivity

The Productivity factor is often talked about and measured by considering total number of test cases written in a particular timeframe.

Daily Productivity (Test Case Writing) =  Total # of Test Cases written / # of hours in a day

Test Case Execution Productivity

The Test Case Execution Productivity is measured by considering total number of test cases executed in a particular timeframe.

Daily Productivity (Test Case Execution) =  Total # of Test Cases executed / # of hours in a day

Defects – High Severity %age

This metric gives a quick idea about the high severity defects out of total identified.

High Severity %age = (# of high severity defects / total # of defects) * 100

Defects – Med Severity %age

This metric gives a quick idea about the med severity defects out of total identified.

Med Severity %age = (# of medium severity defects / total # of defects) * 100

Defects – Low Severity %age

This metric gives a quick idea about the low severity defects out of total identified.

Low Severity %age = (# of low severity defects / total # of defects) * 100

Defects – High Priority %age

This metric gives a quick idea about the high Priority defects out of total identified.

High Priority %age = (# of high Priority defects / total # of defects) * 100

Defects – Med Priority %age

This metric gives a quick idea about the med Priority defects out of total identified.

Med Priority  %age = (# of medium Priority defects / total # of defects) * 100

Defects – Low Priority %age

This metric gives a quick idea about the low Priority defects out of total identified.

Low Priority %age = (# of low Priority defects / total # of defects) * 100