Calculation
A defect rate is calculated by testing output for non-compliances to a quality target. Quality is typically specified by functional and non-functional requirements. The following formula can be used to calculate defect rate.defect rate = (defects / output tested) x 100 Defects is the number of items that failed quality tests. Output tested is the total number of tests conducted.Production
A bicycle production line tests every unit for defects. In a week, 4000 bicycles are produced and 3 fail quality tests.defect rate = (3 / 4000) × 100 = 0.075%Product lines may calculate multiple defect rates based on different levels of testing. For example, all bicycles may undergo standard quality testing with a small percentage randomly selected for more detailed testing. This results in a standard defect rate and detailed defect rate.Code
Software testing tests 500,000 lines of code and discovers 33 defects.defect rate = (33/500000) × 100 = 0.0066%Code defects are also commonly measured as defects per thousand lines of code. This can be calculated with the formula:defects per thousand lines of code = defects / (lines of code /1000) In the example above this results in a defects per thousand lines of code of:defects per thousand lines of code = 33 / (500000 / 1000) = 0.066Use Cases
Software testing tests 33 use cases and discovers 4 defects.defect rate = (4/33) × 100 = 12.12% It is common to calculate defect rate according to the number of user stories, use cases, requirements or function points that are tested.Services
Services may be tested for quality control with sampling of service interactions. For example, a call center evaluates 400 calls in a week for customer service quality and finds that 4 calls fail to meet quality standards.defect rate = (4/400) × 100 = 1%Automated services can also be tested for quality control purposes. For example, a website is tested for speed and errors 1000 times a day with 3 defects detected.defect rate = (3/1000) × 100 = 0.3%Overview: Defect Rate | ||
Type | ||
Definition | The percentage of output that fails to meet a quality target. | |
Related Concepts |