Verification and Validation
Ensuring software quality requires rigorous verification and validation (V&V) activities. These techniques help detect defects, measure quality, and build confidence that software meets its requirements and user needs.
V&V: What’s the Difference?
Verification
“Are we building the product right?”
Verification checks whether software conforms to its specifications:
- Does the implementation match the design?
- Does the design satisfy the requirements?
- Are we following standards and processes correctly?
Validation
“Are we building the right product?”
Validation checks whether software meets user needs and expectations:
- Does the software solve the actual problem?
- Will users be satisfied with the solution?
- Does it provide value in the real world?
Why V&V Matters
Software defects are expensive and dangerous:
- Cost escalation: Defects found in production cost 100x more to fix than those caught early
- Safety risks: In critical systems (medical, automotive, aerospace), defects can be fatal
- Business impact: Quality issues damage reputation, lose customers, and reduce revenue
- Maintenance burden: Poor quality code becomes harder and more expensive to maintain
Prevention is cheaper than cure - investing in V&V activities early saves time and money later.
Topics in This Section
V&V Overview
Understand the landscape of verification and validation techniques:
- Techniques - Static vs dynamic, manual vs automated approaches
- Testing - Black box, white box, levels, and purposes
- Static Analysis - Code reviews, inspections, and automated analysis tools
- Inspection - Formal review processes
Test Coverage Criteria
Learn how to measure and achieve thorough testing:
- Terminology - Key concepts in coverage analysis
- Code Coverage - Statement, branch, and path coverage
- Condition Coverage - Decision, condition, and MC/DC coverage
- Basis Path - Cyclomatic complexity and independent paths
- Data Flow - Definition-Use pairs and variable lifecycle
- Mutation Testing - Measuring test suite effectiveness
- Discussion - Trade-offs and practical considerations
Random Testing
Techniques that generate test inputs by sampling rather than systematic design:
- Fundamentals - Theory, reliability prediction, Randoop, AutoTest
- Fuzz Testing - From Miller 1990 to coverage-guided greybox fuzzing
- Property-Based Testing - QuickCheck, Hypothesis, JQF, industry practice
- Mutation Testing - Fault seeding, equivalent mutants, LLM-assisted detection
Exploratory Testing
Human-driven testing where learning, test design, and execution happen simultaneously:
- Techniques and Heuristics - Whittaker’s tours, Hendrickson’s heuristics, dynamic test design
- Session-Based Test Management - Charters, time boxes, metrics, degrees of exploration
- Empirical Evidence - ET vs. scripted experiments, efficiency data, tester knowledge
Operational Profile
Usage-based testing proportional to how software is used in the field:
- Developing an OP - Musa’s five-step procedure, representations, data sources
- Industrial Evidence - AT&T, HP results, Android profile coverage
- Modern Approaches - Operational coverage, adaptive testing, relative coverage
Testing Approaches
Black Box Testing (Functional)
Testing based on requirements and specifications without knowledge of internal structure:
- Focus on inputs, outputs, and behavior
- Tests what the software does, not how it does it
- Examples: Equivalence partitioning, boundary value analysis, use case testing
White Box Testing (Structural)
Testing based on internal code structure and logic:
- Focus on paths, conditions, and control flow
- Tests how the software implements functionality
- Examples: Statement coverage, branch coverage, path testing
Static Analysis
Examining code without executing it:
- Code reviews and inspections
- Automated tools (linters, type checkers, static analyzers)
- Detect issues early, before runtime
Testing Levels
Software testing occurs at multiple levels:
- Unit Testing - Testing individual components in isolation
- Integration Testing - Testing interactions between components
- System Testing - Testing the complete integrated system
- Acceptance Testing - Validating software meets user needs
Key Principles
- Testing shows presence of defects, not absence - You can’t test quality in; you must build it in
- Early testing saves time and money - Shift-left: test as early as possible
- 100% coverage is impossible - Focus on risk-based testing
- Pesticide paradox - Running the same tests repeatedly finds fewer new bugs
- Context matters - Testing approach depends on criticality, domain, and constraints
- Automate when possible - Automated tests enable continuous quality feedback
Test Adequacy
How do you know when you’ve tested enough?
Coverage criteria provide objective measures:
- Structural coverage (statements, branches, paths covered)
- Functional coverage (requirements, features tested)
- Mutation score (test suite effectiveness)
But adequacy also depends on:
- Risk - Critical functionality needs more testing
- Cost - Balance testing investment with value
- Time - Testing under deadlines requires prioritization
Further Exploration
After mastering V&V techniques, explore:
- Defining Quality - Understanding what quality means
- Organizing Quality - Managing quality processes
- Quality Attributes - Achieving specific quality goals
Disclaimer: AI is used for text polishing and explaining. Authors have verified all facts and claims. In case of an error, feel free to file an issue.