Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Software quality and quality management systems

Software quality and quality management systems explain how engineers plan, measure and improve the quality of software products and processes using defined policies, processes and metrics.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Good software must meet customers' needs reliably, securely and on time. Engineers use quality management systems to set policies, monitor processes and measure whether a product and the development process meet required quality levels so defects are prevented, detected and fixed cost-effectively.

Key ideas

  • Quality control (QC): activities and techniques used to detect defects in the final product. Define before use: QC focuses on product inspection and testing (detection).

  • Verification vs Validation (V&V): Verification = "are we building the product right?" (conformance to specifications); Validation = "are we building the right product?" (meets user needs).

  • Quality management system (QMS): a set of interrelated or interacting elements (policy, processes, procedures, resources) used to establish quality policy and objectives and achieve them. A QMS standardises how an organization manages quality.

  • Quality policy: short statement from senior management describing overall intentions and direction for quality.

  • Process vs Product quality: process quality means the way work is done (repeatable, documented, measured). Product quality means the characteristics of the software itself (defect count, reliability, performance). Good process quality should produce good product quality (assumption: causal link between process control and fewer defects).

  • Process capability and maturity: the ability of a process to consistently produce outcomes within specifications; assessed via statistical stability or maturity models (e.g., CMMI levels), and improved through standardization and measurement.

  • Plan-Do-Check-Act (PDCA): iterative management method for continuous improvement. Draw a cycle with four boxes in clockwise order: Plan -> Do -> Check -> Act. Label Plan with 'define objectives and processes', Do with 'implement', Check with 'measure and analyze', Act with 'improve'.

  • Total Quality Management (TQM): organization-wide approach focused on continuous improvement, customer focus, and involvement of all employees. TQM uses tools like root-cause analysis, process control charts and the PDCA cycle.

  • Cost of Quality (CoQ): prevention and appraisal costs (to avoid and detect defects) plus failure costs—internal (found before release) and external (found after release).

  • Audits and reviews: audit is a formal, independent examination of QMS compliance with standards (e.g., ISO). management review is senior management's periodic check of QMS performance.

  • Quality planning, quality assurance and quality control activities: Quality planning defines standards and processes; QA establishes process controls (process definitions, training, audits); QC executes product checks (testing, inspections), reports defects and verifies fixes.

  • Metrics used in quality management (definitions):

    • Defect: any instance where the product does not meet a requirement. Related terms: Error = human action that produces an incorrect result; Fault/bug = the underlying code or design cause; Failure = observed deviation of delivered service from expected behavior at run time.
    • Defect density: number of defects per size unit (e.g., per thousand lines of code or per function point).
    • Defect Removal Efficiency (DRE): fraction of defects found and removed before release compared to total defects (pre- and post-release).
    • Mean Time Between Failures (MTBF) and Mean Time To Repair (MTTR): reliability and maintainability metrics used in operational-quality evaluation.
  • Standards and models: QMS is commonly implemented by following standards (for example, ISO 9001 series for general QMS; in software-specific contexts ISO/IEC 25010 for product quality models). ISO/IEC 25010 quality characteristics: functional suitability, performance efficiency, compatibility, usability, reliability, security, maintainability, portability. For process maturity models see CMM/CMMI; typical CMMI maturity levels (1–5): Initial, Managed, Defined, Quantitatively Managed, Optimizing.

  • Continuous improvement: use metrics to discover weak points, run root-cause analysis (Ishikawa/fishbone), plan corrective actions and measure results (PDCA).

When deriving or proving statements in exams, clearly state assumptions: e.g., the exponential reliability model assumes failures follow a Poisson process and failure rate is constant.

Formulas

Defect density = D / S where D = number of defects found, S = size (thousand lines of code KLOC or number of function points). Unit: defects per KLOC or defects per function point. Applies when size is measurable and defects counted for a module or release.

DRE = D_pre / (D_pre + D_post) where D_pre = defects removed before release, D_post = defects found after release. Unitless (ratio). Applies for a release or defined time window.

Reliability R(t) = e^{-λ·t} where λ = constant failure rate (failures per unit time), t = time. R(t) is dimensionless (probability). Applies under the exponential (constant-rate Poisson) model.

MTBF = 1 / λ where MTBF is in time units (seconds, hours) and λ is failures per unit time. Here MTBF refers to mean up-time between failures (i.e., MTTF). Some texts define MTBF = MTTF + MTTR; under that convention use Availability = MTTF / (MTTF + MTTR) and note that MTTF = 1/λ. Applies for systems with exponential time-between-failures.

Availability = MTBF / (MTBF + MTTR) where MTTR is mean time to repair (same time units as MTBF). Unitless (fraction or percent). Applies for repairable systems.

Note: when software-specific units are used, use hours for MTBF/MTTR if measuring operational time; for defect density use KLOC or function points as the size unit.

Worked examples

  1. DRE and defect density (numerical) Given: In a release, the team removed 240 defects before release. After release the users reported 60 defects. The code size is 120 KLOC. Compute DRE and defect density (using defects found before release). Steps:
  1. Formula for DRE: DRE = D_pre / (D_pre + D_post).
  2. Substitute: DRE = 240 / (240 + 60) = 240 / 300 = 0.8.
  3. Express as percent: 0.8 × 100 = 80%.
  4. Formula for defect density (pre-release defects): Defect density = D / S.
  5. Substitute: Defect density = 240 defects / 120 KLOC = 2 defects per KLOC. Answer: DRE = 80%; Defect density = 2 defects/KLOC.
  1. Reliability and MTBF (numerical) Given: A service has an observed MTBF of 200 hours. Using the exponential model, compute λ and reliability after 50 hours. Steps:
  1. λ = 1 / MTBF = 1 / 200 h = 0.005 failures per hour.
  2. Reliability formula: R(t) = e^{-λ·t}.
  3. Substitute t = 50 h: R(50) = e^{-0.005·50} = e^{-0.25} ≈ 0.7788. Answer: λ = 0.005 per hour; R(50) ≈ 0.779 (77.9%).
  1. QMS diagram (theory/model answer) Typical exam question: "Draw and explain a basic QMS structure." Model answer: draw one large top box labelled 'Quality Policy and Objectives (management)'; below it draw three boxes left-to-right: 'Processes and Procedures', 'Resources (people, infrastructure)', 'Measurement & Monitoring'. Arrows: from Policy -> Processes/Resources/Measurements; back arrows from Measurement to Policy labelled 'Management Review' and from Processes to Measurements labelled 'Audit/Inspection'. Explain each box in 2–3 lines: policy sets direction; processes implement work; resources enable processes; measurement gives data for review; management review drives corrective actions.

Common mistakes

  • Mixing units: reporting MTBF in hours but using λ in per second without conversion.
  • Using reliability formula without stating assumptions: must state constant failure rate (exponential) for R(t)=e^{-λt}.
  • Counting duplicate or cosmetic reports as separate defects for defect density without explaining rule; examiners expect you to define what you count.

For your exam

Kinds of questions:

  • Definitions: define QMS, QA, QC, defect density, DRE, MTBF, availability.
  • Short notes: explain PDCA, management review, audit, process capability in software.
  • Derivations: derive MTBF = 1/λ from the exponential distribution assumption and show R(t)=e^{-λt} with assumptions.
  • Numericals: compute DRE, defect density, reliability values and availability.
  • Diagrams: draw a QMS structure, PDCA cycle or process-audit flow chart. What a full-marks answer includes:
  • Clear definitions (bold or labelled) before using terms.
  • All assumptions stated (e.g., constant failure rate for exponential model).
  • Correct formulae with units and substitution of numbers with units carried through.
  • For diagrams: neat labeled boxes and arrows; short line-by-line explanation of each block.
  • For metrics: explain what was counted (e.g., defects = confirmed faults excluding duplicates) and time window used.

Quick check

  1. What is the primary focus of quality assurance (QA)?
  2. Give the formula for Defect Removal Efficiency (DRE).
  3. Under what assumption is R(t) = e^{-λt} valid? Answers: QA focuses on processes and prevention; DRE = D_pre / (D_pre + D_post); assumes a constant failure rate (Poisson/exponential model).

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?