Instead of relying only on opinion, quality assurance can use data about the defects found, to see where the process is weak and to predict how well the software will work.
Statistical Software Quality Assurance
Statistical software quality assurance (SSQA) collects and classifies information about defects, finds the cause of each, and then takes action on the few causes that produce most of the defects. The steps are to collect and classify defects by cause, to apply the Pareto principle, which says that about 80 percent of the defects come from about 20 percent of the causes, to find the "vital few" causes, and to correct the process so that these causes are removed. Typical causes are incomplete or wrong specifications, misinterpretation of customer communication, violation of standards, errors in design or data representation, and errors in the interface.
Definition: Pareto principle. The observation that a small number of causes (about 20 percent) are responsible for most of the effects (about 80 percent), used to focus quality effort on the vital few.
Six Sigma
Six Sigma is a rigorous data-driven approach for removing defects. It aims at no more than 3.4 defects per million opportunities. Its core steps are define the customer requirements, measure the current performance, and analyse the causes of defects, with the further steps improve the process to remove the causes, and control it so that the gain is kept. For a new process the steps are design and verify.
Software Reliability
Software reliability is the probability that a program will work without failure in a given environment for a given time. It differs from hardware reliability because software does not wear out, and a failure is caused by a design fault. The mean time between failures (MTBF) is MTBF = MTTF + MTTR, where MTTF is the mean time to failure and MTTR the mean time to repair. Availability = MTTF / (MTTF + MTTR) × 100 percent. The reliability over a time t, with a constant failure rate lambda = 1 / MTTF, is R(t) = e to the power (-lambda t). A failure is an observed departure from the expected behaviour, while a fault is the defect in the code that causes it.
Table 4.3: Reliability measures
| Measure | Meaning | Formula |
|---|---|---|
| MTTF | Mean time to failure | Average run time to a failure |
| MTTR | Mean time to repair | Average repair time |
| MTBF | Mean time between failures | MTTF + MTTR |
| Availability | Share of time the system is usable | MTTF / (MTTF + MTTR) |
Example 4.3: Availability and reliability
Problem: A system has an MTTF of 400 hours and an MTTR of 8 hours. Find the MTBF, the availability, and the probability of running 50 hours without failure.
Solution:
- MTBF = 400 + 8 = 408 hours.
- Availability = 400 / 408 = 98.04 percent.
- R(50) = e to the power (-50 / 400) = e to the power (-0.125).
Result: MTBF is 408 hours, availability is 98.04 percent and the reliability for 50 hours is 0.8825.
import math
mttf, mttr, t = 400, 8, 50
print(mttf + mttr, round(mttf / (mttf + mttr) * 100, 2))
print(round(math.exp(-t / mttf), 4))
Output
408 98.04
0.8825
Common mistakes
- Confusing a fault, which is in the code, with a failure, which is seen by the user.
- Using MTBF and MTTF as the same thing. MTBF includes the repair time.
- Trying to fix every cause of defects instead of the vital few.
Key takeaways
- SSQA classifies defects by cause and fixes the vital few.
- The Pareto principle says that about 80 percent of defects come from 20 percent of causes.
- MTBF = MTTF + MTTR.
- Availability = MTTF / (MTTF + MTTR).
Practice questions
- State the Pareto principle in quality assurance.
- What is software reliability?
- Write the formula for availability.
Answers to the practice questions
- About 80 percent of defects come from about 20 percent of the causes.
- The probability that software works without failure in a given environment for a given time.
- MTTF divided by (MTTF + MTTR).
Sources
- Official BCA syllabus Software Engineering, course code 26BCA403DS03, Unit IV
