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 assurance

Clear, exam-focused study notes on Software Quality Assurance (SQA): definitions, principles, formulas, worked examples, common mistakes and exam guidance for B.E./B.Tech students.

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

Software Quality Assurance (SQA) is used by engineers to make sure software meets functional and non-functional requirements and is developed by repeatable, controlled processes. Practically, SQA guides audits, process improvements, and decisions about release readiness so products are safe, reliable and maintainable in industry and organisations.

Key ideas

Start from first principles: quality is the degree to which a product meets stated and implied needs.

  • Quality: the degree to which a product or service conforms to stated requirements and satisfies implied needs. (Assumption: requirements are complete enough to measure conformity.)
  • Software Quality Assurance (SQA): systematic activities implemented in a quality system so that software development processes and products conform to requirements, standards and procedures. (Assumption: there exists a documented quality system and measurable requirements.)

Two fundamental SQA concepts often tested:

  1. Verification and Validation (define before use):

    • Verification: the process of evaluating work-products of a development phase to ensure they meet the specified requirements for that phase. Short form: "Are we building the product right?" (Assumption: there are documented requirements or design artefacts to check against.)
    • Validation: the process of evaluating the final product to check whether it meets the user's needs and requirements. Short form: "Are we building the right product?" (Assumption: user needs are known.)

    Universities frequently ask to contrast them: verification is static/early (reviews, inspections) or dynamic at module level; validation is usually dynamic (system tests, acceptance tests).

  2. Process quality vs Product quality:

    • Process quality: measures and activities that ensure the development process is effective (example activities: process audits, training, CMM/ISO alignment).
    • Product quality: measures of the delivered software (defect density, reliability metrics). Good process quality increases probability of good product quality.
  3. Key SQA activities (define each):

    • SQA planning: preparing an SQA plan describing standards, responsibilities, schedule, audits, metrics and tools. Refer to IEEE Std 730 for SQA plan contents.
    • Audits and reviews: planned examinations to check compliance with standards (e.g., process audit, product audit). Define peer review, walkthrough, inspection and explain inspection roles: moderator, author, reader, recorder, inspector.
    • Configuration management: controlling changes to artefacts so versions are traceable. Define baseline (a formally reviewed and agreed version of an artefact). Describe change control board (CCB) role.
    • Process monitoring and metrics: collecting metrics (defects, effort, schedule variance) and controlling based on thresholds. Include Cost of Quality (prevention, appraisal, internal failure, external failure) as a tracked metric.
    • Corrective and preventive actions: fixing root causes (corrective) and removing potential causes (preventive). Define root cause analysis.
  4. Quality standards and models (brief definitions):

    • ISO (International Organization for Standardization) standards define quality management principles; in SQA we often reference ISO 9001 Quality Management Systems (QMS). For software product quality models, cite ISO/IEC 25010 characteristics: Functional suitability, Reliability, Usability, Performance efficiency, Security, Compatibility, Maintainability, Portability (superseding ISO/IEC 9126). Also relevant: ISO/IEC 12207 (software life cycle) and ISO/IEC/IEEE 29119 (software testing).
    • Capability Maturity Model (CMM): a staged model describing process maturity levels (define levels: initial, repeatable, defined, managed, optimizing) — treat as a model, not a law. In CMMI-DEV, Level 4 is termed Quantitatively Managed.
  5. Reliability and failure concepts:

    • Error / Fault (Defect) / Failure: define each: error = human action that produces an incorrect result; defect/fault = an incorrect step, process, data definition, or code in an artefact that may cause a failure; failure = when software does not perform a required function during operation. Distinguish clearly.

Diagram universities ask for: draw an SQA process flow.

  • Draw three boxes horizontally: "SQA Plan" -> "SQA Activities (reviews, audits, testing oversight, configuration management)" -> "Measurement & Feedback".
  • From "Measurement & Feedback" draw arrow back to both "SQA Plan" (process improvement) and "Development" (corrections). Label arrows with "audit results", "metrics".

Formulas

DRE = D_pre / (D_pre + D_post)

  • DRE: Defect Removal Efficiency (dimensionless, often expressed as %). D_pre = defects found before release; D_post = defects found after release. Applies when counting defects over a defined release period.

Defect density = D_total / (LOC / 1000)

  • D_total: number of defects found (unit: defects). LOC: lines of code (unit: lines). Result unit: defects per KLOC (defects/KLOC). Applies when LOC is a meaningful size metric.

MTBF = Total runtime / Number of failures

  • MTBF: Mean Time Between Failures (time, e.g., hours). Total runtime: accumulated operational hours. Number of failures: count of observed failures. Applies when failures are independent and system restored to similar state after each failure. For non-repairable items, use MTTF (Mean Time To Failure); under the exponential assumption, MTBF equals MTTF.

MTTR = Total downtime / Number of failures

  • MTTR: Mean Time To Repair (time, e.g., hours). Total downtime: sum of times the system was non-operational. Applies when repair times are measurable and failures are independent.

Availability A = MTBF / (MTBF + MTTR)

  • A: steady-state availability (dimensionless, often expressed as %). Applies to repairable systems assuming alternating up/down periods with well-defined MTBF and MTTR.

Reliability over time t (exponential model) R(t) = exp(-t / MTBF)

  • R(t): probability of no failure in time t (dimensionless). t: time (same units as MTBF). Applies under Poisson/exponential failure assumption (constant failure rate). Verify applicability for your system.

Defect density per module = defects_in_module / (module_LOC / 1000)

  • Same units as defect density; useful for finding hotspots.

Worked examples

Example 1 — DRE calculation (numeric): Given: During testing before release 240 defects were removed. After release, customers reported 60 defects. Compute DRE. Step 1: Identify values: D_pre = 240, D_post = 60. Step 2: Formula: DRE = D_pre / (D_pre + D_post). Step 3: Substitution: DRE = 240 / (240 + 60) = 240 / 300 = 0.8. Answer: DRE = 0.8 = 80% (interpretation: 80% of defects were removed before release).

Example 2 — Defect density and module hotspot (numeric): Given: A project has 120000 lines of code and 360 confirmed defects found during testing. Compute defect density in defects/KLOC. Step 1: LOC = 120000, so LOC/1000 = 120 KLOC. Step 2: Formula: Defect density = D_total / (LOC/1000) = 360 / 120 = 3. Answer: Defect density = 3 defects/KLOC. Step 3: If Module A has 20,000 LOC and 120 defects, module defect density = 120 / (20) = 6 defects/KLOC — a hotspot; recommend focused code review and root cause analysis.

Example 3 — MTBF and reliability (numeric): Given: System ran for 9000 hours during field operation and experienced 15 failures. Compute MTBF and probability of surviving 200 hours without failure (assume exponential model). Step 1: MTBF = Total runtime / Number of failures = 9000 / 15 = 600 hours. MTBF = 600 h. Step 2: Reliability R(200) = exp(-200 / 600) = exp(-1/3) ≈ 0.716531. Answer: R(200) ≈ 0.7165 (71.65%). (Interpretation: under constant failure rate assumption, ~71.6% chance of no failure in next 200 hours.)

Worked theoretical model answer (exam-style): "List and explain the main sections of an SQA plan." Model answer: An SQA plan typically includes: scope and objectives, organisational roles and responsibilities, applicable standards and procedures, deliverables and baselines, review and audit schedule, configuration management policies, metrics to collect (defects, effort, schedule), tools and environment, training needs, risk assessment, and corrective/preventive action process. For full marks, describe purpose of each section, give examples of metrics, and explain how the plan ties to development schedule.

Common mistakes

  • Saying DRE is "defects removed per KLOC" — mixing up DRE with defect density.
  • Not carrying units in MTBF/MTTR problems or mixing hours and minutes without conversion.
  • Reporting defect density without stating whether LOC counts comment/blank lines or only source lines — always state assumptions.
  • Writing "SQA = testing"; SQA includes process control, audits and configuration management, not only testing.
  • Using exponential reliability formula without stating the constant failure rate assumption.

For your exam

Typical question types:

  • Definitions: define SQA, verification, validation, defect, DRE, MTBF. Full-marks answer: concise definition + one-line explanation/example.
  • Short notes: e.g., "SQA plan" or "configuration management." Full-marks: list sections/activities and a brief role of each.
  • Derivations/explanations: e.g., derive reliability formula from constant failure rate assumption. Full-marks: state assumptions (Poisson process, constant failure rate λ = 1/MTBF), show R(t) = e^{-λt} and substitute λ.
  • Numericals: DRE, defect density, MTBF/MTTR, reliability computations. Full-marks: state formulas, list values, show step-by-step calculation with units, final bold answer and interpretation sentence.
  • Diagram question: draw SQA process, inspection workflow or feedback loop. Full-marks: clean diagram shapes, labeled arrows, short captions explaining flow.
  • Long answer: explain SQA activities across SDLC. Full-marks: cover planning, audit, reviews, metrics, configuration management, corrective actions, relation with testing and continuous improvement.

Quick check

  1. What is the short question that differentiates verification from validation? (One line.)
  2. Write the formula for Defect Removal Efficiency (DRE).
  3. If a system has MTBF = 500 hours, what is the failure rate λ (per hour) under exponential model? Answers: 1) Verification = "Are we building the product right?" Validation = "Are we building the right product?"; 2) DRE = D_pre / (D_pre + D_post); 3) λ = 1 / MTBF = 1 / 500 = 0.002 failures per hour.

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

Stuck on something here?