🧪 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:
| Characteristic | Key Question | Apple Example |
|---|---|---|
| Functionality | Are the required functions available? | Does Siri actually answer questions correctly? |
| Reliability | How reliable is it? | Does Face ID work in all lighting conditions? |
| Usability | Is it easy to use? | Can a grandparent use iPad without a manual? |
| Efficiency | How efficient is resource use? | Does the app drain the battery or not? |
| Maintainability | How easy is it to modify? | Can engineers push a fix in hours, not weeks? |
| Portability | How 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 Requirement | Definition | Example |
|---|---|---|
| Explicit | Stated functional requirements | "The app shall support Face ID login" |
| Implicit | Unstated but expected | Ease of use, reasonable load time, no data loss |
Three Core Concepts
| Concept | Definition | Analogy |
|---|---|---|
| Quality of Conformance | Degree to which design specs are followed in manufacturing | Did the code actually match the design doc? |
| Quality Control (QC) | Inspections, reviews, tests to ensure conformance | Catching a bug before it ships |
| Quality Assurance (QA) | Auditing & reporting so management can make proactive decisions | The 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:
- The process applied
- Resources expended
- 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.
| Category | Examples | When It Occurs |
|---|---|---|
| Prevention | Quality planning, formal technical reviews, training, test equipment | Before any work begins |
| Appraisal | In-process inspection, equipment calibration, testing | During development |
| Failure (Internal) | Rework, repair, failure mode analysis | Before release |
| Failure (External) | Complaint resolution, product returns, warranty work, help line | After 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
- Prepare the SQA Plan for the project
- Participate in developing the project's software process description
- Review software engineering activities to verify compliance with defined process
- Audit designated work products to verify compliance
- Ensure deviations in software or work products are documented and handled per procedure
- 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
| Role | Responsibility |
|---|---|
| Presenter | The developer/designer who walks through their own product |
| Coordinator | Organizes the review at the producer's request; runs the meeting |
| Recorder | Documents all issues found — builds the paper trail |
| Reviewers | QA staff, maintenance staff, user reps — find defects |
FTR Guidelines (Memorize These Numbers!)
| Guideline | Value |
|---|---|
| People involved (including reviewers) | 3 to 5 people |
| Advance preparation time per person | ≤ 2 hours |
| Meeting duration | < 2 hours |
| Focus | A 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
| Timing | Formality | Issue |
|---|---|---|
| Early reviews | Informal | May lack enough info yet |
| Late reviews | Formal | Feedback 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:
- Proof of Correctness — mathematical/logical proof that code meets spec
- Statistical Quality Assurance — data-driven defect tracking
Statistical Quality Assurance Process
- Collect and categorize information about software defects
- Trace each defect back to its root cause
- Apply Pareto Principle (80/20 Rule):
80% of defects can be traced to just 20% of the causes → fix the "vital few"
- 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!)
| Metric | Full Name | What It Means | Example |
|---|---|---|---|
| POFOD | Probability of Failure on Demand | Probability of failure per request | POFOD = 0.001 → 1 in 1,000 requests fails |
| ROCOF | Rate of Fault Occurrence | Failures per operational time unit | ROCOF = 0.02 → 2 failures per 100 time units |
| MTTF | Mean Time to Failure | Average time between observed failures | System runs 500 hrs on average before failing |
| MTBF | Mean Time Between Failure | Same as MTTF (interchangeable term) | — |
Key Formulas
Where:
- = Mean Time Between Failure
- = 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
| Type | Best For |
|---|---|
| Raw Execution Time | Non-stop/always-on systems |
| Calendar Time | Systems with regular usage patterns |
| Number of Transactions | Demand-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
| Type | Key Questions |
|---|---|
| Reliability Validation | Does measured reliability meet spec? Is it good enough for users? |
| Safety Validation | Does the system operate without accidents? Are consequences minimized? |
| Security Validation | Is the system protected against external attack? |
Validation Techniques
| Type | Techniques |
|---|---|
| Static | Design reviews, code inspections, mathematical proofs |
| Dynamic | Statistical testing, scenario-based testing, runtime checking |
| Process | SE 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:
| Approach | How It Works |
|---|---|
| Hazard Avoidance | Design to prevent the hazard from occurring |
| Accident Avoidance | Design to prevent the hazard from causing harm |
| Protection Systems | Add safety systems to detect/limit damage when hazard occurs |
12. SQA Plan — 7 Sections
| Section | Contents |
|---|---|
| 1 — Management | SQA's place in organizational structure |
| 2 — Documentation | Each work product produced during the software process |
| 3 — Standards, Practices & Conventions | All applicable standards/practices + metrics to collect |
| 4 — Reviews and Audits | Approach used in reviews and audits throughout the project |
| 5 — Test | Reference to test plan; defines test record-keeping requirements |
| 6 — Problem Reporting & Corrective Action | Procedures for reporting, tracking, and resolving defects; organizational responsibilities |
| 7 — Other | Tools, SQA methods, change control, record keeping, training, risk management |
13. PSP / TSP / CMMI Overview
| Framework | Scope | Purpose |
|---|---|---|
| PSP (Personal Software Process) | Individual | Build individual skill and discipline |
| TSP (Team Software Process) | Team | Deliver quality products on cost and schedule |
| CMMI (Capability Maturity Model Integration) | Organization | Improve 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
| Phase | Key Activities |
|---|---|
| Planning | Requirements statement, LOC estimation, time estimation, schedule plan |
| Development | Design → Design Review → Implement → Code Review → Compile → Test (log defects at each step) |
| Postmortem | Complete 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)
| Layer | What It Provides |
|---|---|
| Team Member Skills (from PSP) | Process discipline, performance measures, estimating & planning skills, quality management |
| Team Building | Goal setting, role assignment, tailored team process, detailed balanced plans |
| Team Management | Communication, 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!)
| Level | Name | Characteristics |
|---|---|---|
| 1 | Initial | Process is informal and unpredictable — "works on my machine" |
| 2 | Managed | Project management in place; performance is repeatable |
| 3 | Defined | Software engineering AND management processes are defined and integrated |
| 4 | Quantitatively Managed | Product and process are quantitatively controlled (metrics-driven) |
| 5 | Optimizing | Process 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:
| Model | Focus |
|---|---|
| CMMI-DEV | Guidance for managing and monitoring development processes |
| CMMI-SVC | Guidance for those providing services within/outside the organization |
| CMMI-ACQ | Guidance for acquisition leadership — buying and managing external products/services |
18. CMMI-DEV Process Areas by Maturity Level
| Level | Process Areas |
|---|---|
| 5 — Optimizing | Causal Analysis and Resolution (CAR), Organizational Performance Management (OPM) |
| 4 — Quantitatively Managed | Organizational Process Performance (OPP), Quantitative Project Management (QPM) |
| 3 — Defined | Decision Analysis & Resolution, Integrated Project Management, Org Process Definition, Org Training, Org Process Focus, Product Integration, Requirements Development, Risk Management, Technical Solution, Validation, Verification |
| 2 — Managed | Configuration Management, Measurement & Analysis, Project Monitoring & Control, Project Planning, Process & Product Quality Assurance, Requirements Management, Supplier Agreement Management |
19. CMMI Process Areas by Category
| Category | Process Areas (Abbreviations) |
|---|---|
| Process Management | OID, OPD, OPF, OPP, OT |
| Support | CAR, CM, DAR, MA, PPQA |
| Project Management | IPM, PMC, PP, QPM, REQM, RSKM, SAM |
| Engineering | PI, RD, TS, VAL, VER |
20. Process Area (PA) Components
Each Process Area has three component types:
| Type | Components | Description |
|---|---|---|
| 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, subpractices | Context 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. 🔬