Software Engineering · Software Quality
Quality Control and Assurance
Overview
Software quality management ensures that a software product satisfies stated and implied requirements and is fit for use.
Within it, Quality Assurance (QA) builds quality into the process, while Quality Control (QC) detects defects in the product through reviews, inspections, and testing.
UGC NET asks this topic through definitions, comparison of QA and QC, review types and roles, ISO/CMM standards, statistical SQA, and defect-based quality metrics.
Before studying this lesson, know the basic software process, verification and validation, and the idea of a software defect.
Key concepts
- Software quality is conformance to requirements plus fitness for use. Quality has both functional and non-functional aspects.
- Correctness: degree to which software meets its specification. Accuracy: meeting specifications with precision. Completeness: degree to which specified functions are present.
Robustness: extent to which software tolerates unexpected problems. Reliability: probability of failure-free operation for a specified time under stated conditions.
Safety: absence of unacceptable hazards, especially hazards that may cause an entire system to fail. Maintainability, portability, usability, efficiency, and security are other quality attributes. - In quality-management usage, good quality means meeting both functional and non-functional requirements; predictable means the process is under statistical control; reliable means the program does not fail for a specified time in a given environment.
- Software Quality Assurance (SQA) is an umbrella activity applied throughout the software engineering process. It is planned, systematic, preventive, and process-oriented.
It includes standards, process definition, training, reviews, audits, testing, measurement, and management reporting. In the commonly used Pressman convention, QA also includes auditing and reporting functions of management. - Software Quality Control (QC) is product-oriented and detective. It includes inspections, reviews, and tests used throughout the process to ensure that each work product meets the requirements placed upon it.
QA prevents defects; QC finds and corrects them. - Verification asks: “Are we building the product right?” It checks conformance to specification. Validation asks: “Are we building the right product?” It checks that the product meets user needs.
Reviews and inspections are mainly verification; execution-based testing is mainly validation. - Reviews include informal peer review, walkthrough, inspection, and audit. An audit is an independent examination of process or work products against standards and is usually an SQA activity.
A walkthrough is an informal, author-led presentation to reviewers for knowledge sharing and defect detection. An inspection is a formal, structured peer review, usually following Fagan’s procedure. - A walkthrough is generally less formal than an inspection. The author leads or presents the work product. It has no strict entry/exit criteria and often no formal defect log.
- A formal inspection has defined roles, checklists, entry and exit criteria, preparation, a formal defect log, rework, and follow-up.
It is generally more effective than a walkthrough for finding subtle defects because it is structured and requires preparation.
More inspectors help only up to a point; adding inspectors does not increase defects proportionally because of coordination cost and diminishing returns. - Inspection roles: moderator plans and leads the inspection meeting and keeps it focused; author explains the work product but should not act as moderator; reader paraphrases the artifact during the meeting; recorder all defects and issues; inspectors examine the product against checklists.
The inspection meeting defects; it should not drift into solving all defects. - The SQA group develops and maintains quality standards and processes, performs audits and reviews, collects quality metrics, provides training, and reports to management independently of the project manager whose project is being audited.
Independence preserves objectivity. - A quality manual or organizational quality management plan defines the quality policy, quality objectives, and organizational responsibilities for quality. Project-level planning may be documented in a quality assurance plan.
- The ISO 9000 family is a quality-management standard series.
ISO 9001 specifies requirements for a quality management system and is the certifiable standard; for UGC’s older exam convention, ISO 9001:2000 is the software-engineering applicable standard.
ISO 9000-3 gives guidelines for applying ISO 9001 to software development, supply, and maintenance. ISO 9003 is the older standard for final inspection and test. - CMM is the Capability Maturity Model for process maturity.
Its levels are 1 Initial, 2 Repeatable/Managed, 3 Defined, 4 Quantitatively Managed, 5 Optimizing. Continuous process improvement is characteristic of the Optimizing level. - Statistical SQA collects defect data, categorizes defects, traces each defect to its underlying cause, isolates the vital few causes using the Pareto principle, and corrects the process.
It does not mean replacing testing by sampling, surveying customers, or correcting every problem found. - Static metrics are measured from representations such as source code or design without executing the program. Dynamic metrics are measured during execution.
Product metrics measure the artifact, for example size, complexity, defect density, reliability, and usability.
Process metrics measure the process, for example review rate, defect removal efficiency, effort, and schedule variance. - Effective software metrics should be simple and computable, objective and consistent, use consistent units and dimensions, and be programming-language independent.
Overall quality assessment is not purely objective; it involves judgment. - Software reliability is the probability that software performs required functions without failure for a specified time under stated conditions. It depends primarily on residual faults or errors.
In UGC usage, the specified time may be expressed as execution time, calendar time, or clock time; execution time is the most meaningful for software. - Availability is the fraction of time a system is operational. Software Maturity Index (SMI) measures release stability; as SMI approaches 1, the product becomes more stable.
How it works
-
Plan quality. Define quality policy, standards, review and test criteria, roles, and metrics. Document these in the quality manual or project quality plan.
-
Prevent defects through QA. Train staff, define processes, use checklists, perform process audits, and verify adherence to standards. QA acts throughout the lifecycle.
-
Detect defects through QC. Apply reviews, walkthroughs, formal inspections, and testing to work products. Log defects, rework, and verify corrections.
-
Feed defect data back. Use root-cause analysis and Pareto analysis to find the vital few causes. Change the process so the same defects are prevented in future.
-
Use independent SQA reporting. The SQA group audits projects and reports to management independently of the project manager to preserve objectivity.
-
Formal inspection procedure. The standard Fagan-style order is: Planning → Overview → Preparation → Inspection meeting → Rework → Follow-up. Planning fixes roles, checklist, schedule, and entry criteria.
Overview introduces the artifact. Preparation is individual examination before the meeting. The meeting defects. Rework fixes them. Follow-up verifies the fixes and checks exit criteria. -
Compute quality metrics. Use defect density, defect removal efficiency, inspection yield, capture-recapture estimation, availability, and SMI as shown below.
Keep units consistent, usually defects per KLOC or defects per function point.
Drawing the diagram…
Drawing the diagram…
Formulas
- Defect density: , where is the number of defects and is the product size in KLOC or function points.
- Defect removal efficiency: , where is defects found before delivery and is defects found after delivery.
- Inspection yield or effectiveness: .
- Two-inspector capture-recapture estimate: , where and are the numbers of distinct defects found by inspectors 1 and 2, and is the number found by both. The number missed is .
- Software Maturity Index: , where is the total modules in the baseline/current release before latest changes, added, changed, and deleted. SMI approaches 1 for a stable product.
- Availability: , where MTTF is mean time to failure or operating time between failures and MTTR is mean time to repair. Equivalently, . Use the same time unit throughout.
Worked examples
Example 1: Definitions and classification.
Classify the following: (i) process audit, (ii) code inspection, (iii) “Are we building the right product?”
(i) A process audit checks process against standards; it is a QA activity.
(ii) A code inspection examines a work product for defects; it is a QC activity.
(iii) “Are we building the right product?” is validation, not verification.
Final answer: QA; QC; validation.
Example 2: Defect density and DRE.
A project has 12,000 LOC. System testing reports 36 defects, and 9 more defects are reported in the first six months after delivery. Compute pre-delivery defect density, post-release defect density, total defect density, and DRE.
Size KLOC. Pre-delivery density defects per KLOC. Post-release density per KLOC. Total density per KLOC.
.
Final answer: 3, 0.75, 3.75 defects/KLOC; DRE = 80%.
Example 3: Capture-recapture estimation.
Inspector P finds 12 defects. Inspector Q finds 15 defects. Both find 6 defects. Estimate total defects present, defects missed, and review effectiveness.
. Unique defects found . Missed . Effectiveness .
Final answer: estimated 30 defects present, 9 missed, 70% effectiveness.
Example 4: Inspection yield.
A 2,000-line module is inspected and 30 defects are found. Historical data show the team’s inspections typically find 60% of all defects present at inspection time. Estimate total defects present, defects escaped, and found defect density.
Total present . Escaped . Size KLOC, so found density defects per KLOC. Total present density per KLOC.
Final answer: 50 present, 20 escaped, 15 found defects/KLOC.
Example 5: Availability.
A signal processor is expected to operate for 91.25 days after repair, and mean repair time is 5 minutes. Find availability.
Convert MTTR to days: days.
.
Thus .
Final answer: 99.9962%.
Comparison
| Aspect | Quality Assurance QA | Quality Control QC |
|---|---|---|
| Orientation | Process-oriented | Product-oriented |
| Nature | Preventive | Detective |
| Main question | Are we following the right process | Does this work product meet requirements |
| Typical activities | Standards, process definition, training, audits, metrics, management reporting | Reviews, inspections, tests, defect logging, rework |
| Timing | Throughout the lifecycle | At each work product and test stage |
| Example | Process audit | Code inspection |
| Aspect | Verification | Validation |
|---|---|---|
| Question | Are we building the product right? | Are we building the right product? |
| Focus | Conformance to specification | Meeting user needs |
| Typical methods | Reviews, inspections, static analysis | Execution-based testing, acceptance testing |
| Defect type caught | Specification and design defects | Requirement and user-need mismatches |
| Aspect | Walkthrough | Formal inspection |
|---|---|---|
| Formality | Informal | Formal, defined process |
| Leader | Author presents | Moderator leads |
| Preparation | Limited or none | Required individual preparation |
| Roles | Few formal roles | Moderator, author, reader, recorder, inspectors |
| Record | Often informal notes | Formal defect log |
| Effectiveness | Good for understanding and early feedback | Better for subtle defects and measurable quality |
| Role | Main responsibility |
|---|---|
| Moderator | Plans inspection, leads meeting, keeps focus, ensures process |
| Author | Presents or explains the work product |
| Reader | Paraphrases the artifact during the meeting |
| Recorder | Records all defects and issues |
| Inspector | Examines artifact against checklist and standards |
Revision summary
- QA is preventive and process-focused; QC is detective and product-focused.
- SQA is an umbrella activity applied throughout the software process.
- Verification = product right; validation = right product.
- Walkthrough is author-led and informal; inspection is moderator-led and formal.
- Recorder defects; author should not be moderator.
- Formal inspection order: Planning, Overview, Preparation, Inspection meeting, Rework, Follow-up.
- DRE = pre-delivery defects ÷ total defects × 100%.
- Defect density = defects ÷ size, with size in KLOC or function points.
- Capture-recapture: total ≈ D1 × D2 ÷ common defects.
- SMI approaches 1 as a product stabilizes.
- ISO 9001 is certifiable; ISO 9000-3 is software guidance. CMM Level 5 is Optimizing.
- Reliability depends on residual errors; safety focuses on hazards that may fail the system.
Previous-year exam insights
- Direct concept questions: identify SQA as the umbrella activity, and validation as “Are we building the right product?”
- Statement I/II questions often compare QA and QC: QA is preventive/auditing/reporting; QC is inspections, reviews, and tests on work products.
- Match-list questions test review types, roles, and quality attributes: walkthrough, inspection, QA, QC, correctness, robustness, reliability, safety.
- Formal inspection questions test roles and order: moderator vs author vs recorder, and the Fagan sequence.
- Numeric questions use availability, defect density, defect removal efficiency, inspection yield, capture-recapture, and SMI. Check units, especially minutes vs days and LOC vs KLOC.
- ISO/CMM questions test exact standard numbers: ISO 9001, ISO 9000-3, ISO 9003, and CMM continuous improvement at Level 5.
- Statistical SQA traps: the correct idea is root-cause analysis plus Pareto’s vital few, not correcting every problem or replacing testing by sampling.
- Check first whether the question is about process or product, formal or informal review, verification or validation, and whether the formula’s denominator is total defects or only found defects.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- Write one-line definitions of SQA and QC and classify any activity as QA or QC.
- Explain verification vs validation using the two standard questions.
- Distinguish walkthrough, inspection, and audit by formality, leader, roles, and output.
- List the formal inspection steps in correct order and assign each inspection role correctly.
- Explain why an SQA group should report independently of the project manager.
- Compute defect density and DRE from pre-delivery and post-delivery defect counts.
- Compute inspection yield and estimate remaining defects from inspection capture rate.
- Use two-inspector capture-recapture to estimate total defects and review effectiveness.
- Compute availability after converting time units correctly, and compute SMI for a release.
- Identify ISO software-quality standards and CMM maturity levels, and explain statistical SQA and Pareto root-cause correction.
Attempt the sub-topic test first, then the subject test.