03 SQ and SQA

Updated 4 Oct 2026

🧪 CSS323 — Software Quality Assurance (SQA) Cheat Sheet


1. What Is Quality?

One-liner: Quality = the characteristic that distinguishes the grade of excellence or superiority of a process, product, or service.

  • Quality means different things in different contexts — it's not just "no bugs"
  • In software: quality covers functionality, reliability, usability, maintainability, and more

🍎 Apple example: A product can work perfectly and still have poor quality — early Apple Maps (iOS 6) technically functioned, but quality was poor because it gave wrong directions. Quality = meeting what users actually need, not just what was specified.


2. The Quality Trilogy

Three interconnected pillars — Plan → Control → Improve

📋 Quality Planning

Define the target before you build:

  • Identify the customer and their needs
  • Develop product features to meet those needs
  • Establish quality goals
  • Develop a process to deliver them
  • Prove process capability (can this process actually hit the goals?)

🔍 Quality Control

Monitor during execution:

  • Choose control subjects (what to measure)
  • Choose units of measurement
  • Establish standards for performance
  • Measure actual performance
  • Interpret the difference (actual vs. standard)
  • Take action on the difference

📈 Quality Improvement

Fix root causes, not symptoms:

  • Prove the need for improvement (with data)
  • Identify specific projects to improve
  • Diagnose root causes
  • Provide remedies and prove they work under real conditions
  • Hold the gains (prevent regression)

🍎 Apple analogy:

  • Planning = writing the feature spec and test plan for a new iOS API
  • Control = running automated unit tests and CI checks on every PR
  • Improvement = analyzing crash reports in Xcode Organizer and fixing root causes, not just symptoms

3. ISO 9126 Quality Model (1991)

Six characteristics — the "six sides of the die" — all must be balanced:

CharacteristicKey QuestionApple Example
FunctionalityAre the required functions available?Does Siri actually answer questions correctly?
ReliabilityHow reliable is it?Does Face ID work in all lighting conditions?
UsabilityIs it easy to use?Can a grandparent use iPad without a manual?
EfficiencyHow efficient is resource use?Does the app drain the battery or not?
MaintainabilityHow easy is it to modify?Can engineers push a fix in hours, not weeks?
PortabilityHow easy is it to move to another environment?Does the app run on iPhone AND iPad AND Mac?

⚠️ A product that scores high on Functionality but low on Usability is still poor quality — all 6 sides matter.


4. Software Quality Assurance (SQA)

Foundation Principle

Quality is measured by conformance to requirements — both explicit and implicit.

Type of RequirementDefinitionExample
ExplicitStated functional requirements"The app shall support Face ID login"
ImplicitUnstated but expectedEase of use, reasonable load time, no data loss

Three Core Concepts

ConceptDefinitionAnalogy
Quality of ConformanceDegree to which design specs are followed in manufacturingDid the code actually match the design doc?
Quality Control (QC)Inspections, reviews, tests to ensure conformanceCatching a bug before it ships
Quality Assurance (QA)Auditing & reporting so management can make proactive decisionsThe process that prevents bugs systematically

🍎 QC vs QA in Apple terms:

  • QC = a tester finding that the camera crashes when zoom > 5x before release
  • QA = the process that ensures camera code is always reviewed by 2 engineers + passes 300 automated tests before merging

5. Variation Control

Variation control = the heart of quality control

Software engineers control variation in three areas:

  1. The process applied
  2. Resources expended
  3. End product quality attributes

The goal is to make quality predictable — not just hoped for.


6. Quality Costs

Fixing bugs early is dramatically cheaper than fixing them in production.

CategoryExamplesWhen It Occurs
PreventionQuality planning, formal technical reviews, training, test equipmentBefore any work begins
AppraisalIn-process inspection, equipment calibration, testingDuring development
Failure (Internal)Rework, repair, failure mode analysisBefore release
Failure (External)Complaint resolution, product returns, warranty work, help lineAfter release — most expensive

🍎 Apple example: A 1-star App Store review that says "crashes on launch" = External Failure cost. It costs far more to repair reputation + issue a hotfix + respond to reviews than it would have cost to write proper unit tests during development.

💡 Rule of thumb: The cost of fixing a bug multiplies by ~10x at each stage: Design → Code → Test → Release → Post-release.


7. SQA Group — 6 Activities

  1. Prepare the SQA Plan for the project
  2. Participate in developing the project's software process description
  3. Review software engineering activities to verify compliance with defined process
  4. Audit designated work products to verify compliance
  5. Ensure deviations in software or work products are documented and handled per procedure
  6. Record noncompliance evidence and report to management

8. Software Reviews

Purpose: Find defects before they are passed to the next activity or shipped to the customer.

Formal Technical Review (FTR) = also called a walkthrough or inspection. One of the most effective QA tools.

Review Roles

RoleResponsibility
PresenterThe developer/designer who walks through their own product
CoordinatorOrganizes the review at the producer's request; runs the meeting
RecorderDocuments all issues found — builds the paper trail
ReviewersQA staff, maintenance staff, user reps — find defects

FTR Guidelines (Memorize These Numbers!)

GuidelineValue
People involved (including reviewers)3 to 5 people
Advance preparation time per person≤ 2 hours
Meeting duration< 2 hours
FocusA discrete work product (not the whole system)
Who is under review?The product, NOT the producer

🍎 Apple analogy: Code review on GitHub. The PR author walks through the changes (Presenter), the tech lead facilitates (Coordinator), comments are recorded in GitHub (Recorder), and other engineers review (Reviewers). Same structure.

Why Do Peer Reviews?

  • Catches ~80% of all errors if done properly
  • Catches both coding errors AND design errors (early!)
  • Enforces organizational standards
  • Provides training and team knowledge insurance

Formality vs. Timing Trade-off

TimingFormalityIssue
Early reviewsInformalMay lack enough info yet
Late reviewsFormalFeedback may come too late — rework is expensive

When to Perform Reviews

  • When analysis is complete
  • When design is complete
  • After first compilation
  • After first test run
  • After all test runs
  • Any time a complete work product is produced

Review Conduct Guidelines

  • Keep it short (< 30 minutes per session)
  • Don't schedule two reviews back-to-back
  • Don't review fragments — review complete work products
  • Use standards to avoid style disagreements
  • Let the coordinator run and maintain order

9. Formal SQA Approaches

Two main approaches:

  1. Proof of Correctness — mathematical/logical proof that code meets spec
  2. Statistical Quality Assurance — data-driven defect tracking

Statistical Quality Assurance Process

  1. Collect and categorize information about software defects
  2. Trace each defect back to its root cause
  3. Apply Pareto Principle (80/20 Rule):

80% of defects can be traced to just 20% of the causes → fix the "vital few"

  1. Correct the vital few causes

🍎 Apple example: Xcode Organizer's crash analytics. You don't fix every crash — you sort by frequency and fix the top 3–5 crash types that account for 80% of all crashes first. That's Pareto applied to software quality.


10. Software Reliability

Definition: The probability of failure-free operation of a computer program in a specified environment for a specified time period.

  • Can be measured directly and estimated using historical + developmental data
  • Reliability problems usually trace back to errors in design or implementation

Reliability Metrics (Know All Four!)

MetricFull NameWhat It MeansExample
POFODProbability of Failure on DemandProbability of failure per requestPOFOD = 0.001 → 1 in 1,000 requests fails
ROCOFRate of Fault OccurrenceFailures per operational time unitROCOF = 0.02 → 2 failures per 100 time units
MTTFMean Time to FailureAverage time between observed failuresSystem runs 500 hrs on average before failing
MTBFMean Time Between FailureSame as MTTF (interchangeable term)—

Key Formulas

Availability=MTBFMTBF+MTTR\boxed{Availability = \frac{MTBF}{MTBF + MTTR}}

Reliability=MTBF1+MTBF\boxed{Reliability = \frac{MTBF}{1 + MTBF}}

Where:

  • MTBFMTBF = Mean Time Between Failure
  • MTTRMTTR = Mean Time to Repair

🍎 Apple example: iCloud availability is measured this way. If iCloud goes down for 1 hour every 999 hours of operation: MTBF = 999, MTTR = 1 → Availability = 999/1000 = 99.9% ("three nines").

Time Units for Reliability Measurement

TypeBest For
Raw Execution TimeNon-stop/always-on systems
Calendar TimeSystems with regular usage patterns
Number of TransactionsDemand-type transaction systems

11. Software Safety

Safety focuses on identifying potential hazards that could cause a system to fail with consequences.

  • Reliability = likelihood of failure
  • Safety = impact/consequences of failure

🍎 Apple example: A bug in Apple Maps is a reliability issue. A bug in an iPhone's autonomous driving integration that causes an accident is a safety issue. Same code base, different stakes.

Validation Perspectives — Three Types

TypeKey Questions
Reliability ValidationDoes measured reliability meet spec? Is it good enough for users?
Safety ValidationDoes the system operate without accidents? Are consequences minimized?
Security ValidationIs the system protected against external attack?

Validation Techniques

TypeTechniques
StaticDesign reviews, code inspections, mathematical proofs
DynamicStatistical testing, scenario-based testing, runtime checking
ProcessSE processes that minimize chance of introducing defects

Safety Review Checklist

  • Are the intended system functions correct?
  • Is the structure maintainable and understandable?
  • Verify algorithm and data structure design against spec
  • Check code consistency with algorithm/data structure design
  • Review adequacy of system testing

Hazard-Driven Analysis

Safety assurance relies on hazard identification first. Three approaches:

ApproachHow It Works
Hazard AvoidanceDesign to prevent the hazard from occurring
Accident AvoidanceDesign to prevent the hazard from causing harm
Protection SystemsAdd safety systems to detect/limit damage when hazard occurs

12. SQA Plan — 7 Sections

SectionContents
1 — ManagementSQA's place in organizational structure
2 — DocumentationEach work product produced during the software process
3 — Standards, Practices & ConventionsAll applicable standards/practices + metrics to collect
4 — Reviews and AuditsApproach used in reviews and audits throughout the project
5 — TestReference to test plan; defines test record-keeping requirements
6 — Problem Reporting & Corrective ActionProcedures for reporting, tracking, and resolving defects; organizational responsibilities
7 — OtherTools, SQA methods, change control, record keeping, training, risk management

13. PSP / TSP / CMMI Overview

FrameworkScopePurpose
PSP (Personal Software Process)IndividualBuild individual skill and discipline
TSP (Team Software Process)TeamDeliver quality products on cost and schedule
CMMI (Capability Maturity Model Integration)OrganizationImprove organizational process capability

They stack: PSP builds disciplined individuals → TSP uses those individuals to build effective teams → CMMI scales team practices across the whole organization.


14. PSP — Personal Software Process

PSP = a framework to help individual engineers plan, measure, and improve their own work using data.

PSP Process Flow (8 Steps — in order)

Planning → Design → Design Review → Code → Code Review → Compile → Test → Postmortem
                                                                              ↓
                                                                      Finished Product

Supporting throughout:

  • Scripts — guide what to do at each step
  • Logs — record time and defects at each step
  • Plan Summary → Project & Process Data Summary Report

PSP Phases & Activities

PhaseKey Activities
PlanningRequirements statement, LOC estimation, time estimation, schedule plan
DevelopmentDesign → Design Review → Implement → Code Review → Compile → Test (log defects at each step)
PostmortemComplete Project Plan Summary with actual time, defect, and size data

PSP Inputs Required

  • Problem description
  • PSP Project Plan Summary form
  • Historical estimated AND actual size/time data
  • Time and Defect Recording Logs
  • Defect Type Standard

PSP Exit Criteria (Must complete ALL before "done")

  • Thoroughly tested program
  • Completed Project Plan Summary
  • Completed design templates
  • Completed Design Review & Code Review Checklists
  • Completed Test Report Template
  • Completed PIP (Process Improvement Proposal) forms
  • Completed Defect and Time Recording Logs

15. TSP — Team Software Process

TSP extends PSP to teams — enabling groups to build quality products within cost and schedule.

TSP Goals

  • Build teams quickly and reliably
  • Optimize team performance throughout a project
  • Accelerate software process improvement
  • Make mature processes normal and expected

TSP ≈ CMM/CMMI maturity level 5 process — for teams.

TSP Strategy (Bottom-Up Layers)

LayerWhat It Provides
Team Member Skills (from PSP)Process discipline, performance measures, estimating & planning skills, quality management
Team BuildingGoal setting, role assignment, tailored team process, detailed balanced plans
Team ManagementCommunication, coordination, project tracking, risk analysis

16. CMMI — Capability Maturity Model Integration

CMMI = A collection of characteristics of effective processes that guides organizations in improving how they develop and manage products/services.

What CMMI Helps Organizations Do:

  • Examine effectiveness of current processes
  • Establish priorities for improvement
  • Implement improvements systematically

The 5 Maturity Levels (Must Know All 5!)

LevelNameCharacteristics
1InitialProcess is informal and unpredictable — "works on my machine"
2ManagedProject management in place; performance is repeatable
3DefinedSoftware engineering AND management processes are defined and integrated
4Quantitatively ManagedProduct and process are quantitatively controlled (metrics-driven)
5OptimizingProcess improvement is institutionalized — continuous, data-driven improvement

🍎 Apple analogy:

  • Level 1: A solo dev who ships features when they "feel ready"
  • Level 2: A startup with a basic Jira board and weekly sprint reviews
  • Level 3: A company with documented engineering processes, defined code review rules, and onboarding guides
  • Level 4: A company measuring defect rates, deployment frequency, and MTTR with dashboards
  • Level 5: Apple's own release pipeline — automated regression testing, statistical process monitoring, CI/CD, and retrospectives feeding back into process updates

17. CMMI Models — Three Constellations

All three share 16 Core Process Areas:

ModelFocus
CMMI-DEVGuidance for managing and monitoring development processes
CMMI-SVCGuidance for those providing services within/outside the organization
CMMI-ACQGuidance for acquisition leadership — buying and managing external products/services

18. CMMI-DEV Process Areas by Maturity Level

LevelProcess Areas
5 — OptimizingCausal Analysis and Resolution (CAR), Organizational Performance Management (OPM)
4 — Quantitatively ManagedOrganizational Process Performance (OPP), Quantitative Project Management (QPM)
3 — DefinedDecision Analysis & Resolution, Integrated Project Management, Org Process Definition, Org Training, Org Process Focus, Product Integration, Requirements Development, Risk Management, Technical Solution, Validation, Verification
2 — ManagedConfiguration Management, Measurement & Analysis, Project Monitoring & Control, Project Planning, Process & Product Quality Assurance, Requirements Management, Supplier Agreement Management

19. CMMI Process Areas by Category

CategoryProcess Areas (Abbreviations)
Process ManagementOID, OPD, OPF, OPP, OT
SupportCAR, CM, DAR, MA, PPQA
Project ManagementIPM, PMC, PP, QPM, REQM, RSKM, SAM
EngineeringPI, RD, TS, VAL, VER

20. Process Area (PA) Components

Each Process Area has three component types:

TypeComponentsDescription
Required (must be present)Specific Goals (SG), Generic Goals (GG)Must satisfy these to claim the PA is implemented
Expected (typically done)Specific Practices (SP), Generic Practices (GP)Describe what organizations typically do to achieve goals
Informative(guidance)Purpose statements, notes, example work products, subpracticesContext and examples — not audited directly

21. CMMI Model Structure (Pyramid)

        ┌────────────────────────────────────┐
        │  BENCHMARK RATINGS                 │  ← Goals, PAs, Maturity Levels, Capability Levels
        ├────────────────────────────────────┤
        │  CONSTELLATION-SPECIFIC PAs        │  ← DEV / SVC / ACQ specific process areas
        ├────────────────────────────────────┤
        │  CMMI MODEL FOUNDATION             │  ← 16 Core PAs (shared across all constellations)
        ├────────────────────────────────────┤
        │  INSTITUTIONALIZATION              │  ← Policies, Plans, Resources, Training, Monitoring
        └────────────────────────────────────┘  ← FOUNDATION

🍎 Apple codebase analogy:

  • Institutionalization = AppDelegate, project config, CI/CD pipeline (infrastructure)
  • Core PAs = Shared frameworks used across all teams (Networking, Analytics, UI Kit)
  • Constellation PAs = Feature-specific modules (Maps team, Siri team, Camera team)
  • Benchmark Ratings = App Store metrics, crash-free rate dashboards

22. Big Picture Summary

QUALITY TRILOGY
   Planning → Control → Improvement (continuous loop)

ISO 9126 — 6 Characteristics
   Functionality · Reliability · Usability · Efficiency · Maintainability · Portability

SQA TOOLS
   ├── Formal Technical Reviews (FTR) — 3–5 people, <2hrs, catches ~80% of errors
   ├── Statistical QA — Pareto Principle (80% defects from 20% causes)
   └── SQA Plan — 7 sections (Mgmt, Docs, Standards, Reviews, Test, Problem Reporting, Other)

RELIABILITY METRICS
   POFOD · ROCOF · MTTF/MTBF
   Availability = MTBF / (MTBF + MTTR)
   Reliability  = MTBF / (1 + MTBF)

SAFETY = Reliability + Consequences
   Hazard Avoidance → Accident Avoidance → Protection Systems

PROCESS FRAMEWORKS (Individual → Team → Org)
   PSP (8-step: Plan→Design→DR→Code→CR→Compile→Test→Postmortem)
    ↓
   TSP (Goal setting, Team building, Management)
    ↓
   CMMI (5 Levels: Initial→Managed→Defined→Quantitative→Optimizing)
         (3 Models: DEV · SVC · ACQ)
         (4 Categories: Process Mgmt · Support · Project Mgmt · Engineering)

🍎 Final thought: Apple is widely considered a Level 5 organization — not because they never have bugs, but because when a bug appears, their process automatically learns from it, documents it, and prevents it from happening again. That's what CMMI Level 5 actually means: improvement isn't a project, it's a habit.


Cheat sheet for CSS323 Software Engineering — Software Quality Assurance Chapter Quality isn't tested in — it's built in. 🔬