Software Engineering · Software Testing
Verification Validation and Terminology
Overview
Verification and validation (V&V) are the two complementary quality-assurance activities in software engineering: verification checks whether the software is built correctly with respect to its specifications, while validation checks whether the correct software is being built for the user.
The terminology of error, fault, failure and incident explains how a human mistake becomes an observable incorrect behaviour.
These ideas sit at the start of the Software Testing chapter and are prerequisites for testing levels, static and dynamic techniques, and reliability estimation.
A student must first know the exact definitions, the error–fault–failure chain, and the difference between static and dynamic verification before attempting numerical or statement-based questions.
Key concepts
- Software Quality Assurance (SQA) is the umbrella process that includes both verification and validation, along with reviews, audits, standards, configuration management and testing.
- Verification asks: “Are we building the product right?” It evaluates whether a work product conforms to the specification or conditions imposed at the start of a development phase.
It can be static (reviews, inspections, walkthroughs) or dynamic (executing tests). It checks design against requirements, code against design, and test results against specifications. - Validation asks: “Are we building the right product?” It evaluates whether the delivered software meets the user’s needs and expectations.
It is usually dynamic (validation testing, acceptance testing, alpha and beta testing), but early validation can be done by reviewing requirements or prototypes with users. - Error has two standard exam meanings: (i) a human action that produces an incorrect result, or (ii) the discrepancy between a computed, observed or measured value and the true, specified or theoretically correct value.
It is not “a condition that causes a system to fail” — that is a fault. - Fault (also called defect or bug) is an incorrect step, process, or data definition in a software artefact. It is the condition in the code or design that can cause a failure.
- Failure is the deviation of delivered behaviour from specified behaviour; it is the observable incorrect behaviour during operation.
- Incident is a formal record of a failure or suspected failure, created so that the problem can be investigated.
- The standard causation chain is: human error → fault in the artefact → failure when the fault is activated during execution. A fault may remain latent (never executed), masked (another condition prevents it from causing a failure), or produce coincidental correctness (a correct output despite a fault).
Fault propagation is the process by which a faulty internal state reaches the output. - Testing is defined by Myers as “the process of executing a program with the intent of finding errors.” Test cases are designed to break the software, not merely to show that it works.
Exhaustive testing is impossible in practice because the input domain, state space and path combinations are too large. - Black-box testing treats the system as opaque: the internal design is hidden, and tests are derived from specifications and input–output behaviour.
White-box testing uses knowledge of the internal code and structure; test cases are derived from code, paths and branches, not from specifications. - Fault-based testing designs tests to detect specific faults. Mutation testing is a fault-based technique: it injects small faults (mutants) into the program and checks whether the test suite detects (kills) the mutants.
Fault seeding inserts known faults to estimate the number of remaining faults. - Test levels: unit testing checks code, integration testing checks design, validation testing checks requirements, and system testing checks system-engineering issues.
Alpha testing is conducted at the developer’s site by an internal team of skilled testers; beta testing is conducted at the customer site by real users. - Reliability can be specified as the probability of failure-free operation for a given time, or as Mean Time To Failure (MTTF). A conservative exam bound for a module is: if only fraction of the code is covered and the executed tests pass with probability , then reliability .
- Internal error has its cause inside the software (coding or design mistake). External error is an error whose cause cannot be identified anywhere within the software system.
How it works
- During requirements analysis, define validation criteria that describe what the user will accept.
- During design, perform verification reviews to check that the design implements the requirements correctly.
- During coding, use code reviews and unit testing to verify that each module conforms to its detailed design.
- Integrate modules and perform integration testing to verify interfaces and subsystem behaviour.
- Perform validation testing against the requirements and user needs, not merely against the design.
- Perform system testing to check system-level attributes such as performance, security and reliability.
- Finally, carry out acceptance testing, alpha testing or beta testing to obtain user confidence.
The causation chain that explains terminology is shown below.
Drawing the diagram…
Formulas
- Defect Removal Efficiency:
where is the number of defects found in the current phase and is the number found later. - Statement coverage:
where is the number of executed statements and is the total number of statements. - Decision coverage:
where is the number of executed decision outcomes and is the total number of decision outcomes. - Reliability bound for a partially tested module:
where is the fraction of code covered and is the probability of success on the covered code. This is the conservative convention used in exams.
Worked examples
Example 1 (verification vs validation). A team reviews the requirements document to check that every requirement is testable and unambiguous. Is this verification or validation?
- The activity checks the requirements document against quality criteria for a good specification.
- It does not check whether the requirements capture the user’s real needs.
- Therefore it asks “Are we building the document right?” — this is verification.
Answer: Verification.
Example 2 (error–fault–failure chain). A programmer writes if (x = y) instead of if (x == y). Classify the error, fault and possible failure.
- The programmer’s mistake is a human error.
- The incorrect assignment in the code is a fault.
- When the program runs with
xandyunequal, the condition may evaluate to true and take the wrong branch, producing an observable wrong output — a failure.
Answer: Human error → fault in code → failure when executed.
Example 3 (defect removal efficiency). In a review of 500 requirements, reviewers find 40 defects. Later phases find 10 more defects in those requirements. Compute DRE.
- , .
- .
Answer: DRE = 80%.
Example 4 (reliability bound). A module is tested with a suite that covers 90% of the code; on the covered code, the probability of success is 0.9. What is the maximum reliability according to the conservative exam convention?
- , .
- .
Answer: Reliability is at most 0.81.
Example 5 (match the list). Match List-I with List-II.
| List-I | List-II |
|---|---|
| A. Verification | i. Observable incorrect behaviour during operation |
| B. Validation | ii. Checking conformance to specification |
| C. Fault | iii. Incorrect step, process or data definition in an artefact |
| D. Failure | iv. Meets user needs and expectations |
- Verification checks conformance to specification → A–ii.
- Validation checks user needs → B–iv.
- Fault is an incorrect definition in an artefact → C–iii.
- Failure is observable incorrect behaviour → D–i.
Answer: A–ii, B–iv, C–iii, D–i.
Comparison
| Aspect | Verification | Validation |
|---|---|---|
| Central question | Are we building the product right? | Are we building the right product? |
| Reference document | Specifications, design, standards | User needs, requirements, expectations |
| Focus | Conformance to specification | Fitness for use |
| Typical techniques | Reviews, inspections, walkthroughs, unit testing, integration testing | Validation testing, acceptance testing, alpha and beta testing, user reviews |
| Can be done without executable code? | Yes, by static reviews | Yes, by reviewing requirements or prototypes with users |
| Term | Definition | Key point |
|---|---|---|
| Error | Human action producing an incorrect result; or discrepancy from true value | Human mistake or deviation |
| Fault | Incorrect step, process or data definition in an artefact | Condition that can cause failure |
| Failure | Deviation of delivered behaviour from specified behaviour | Observable incorrect behaviour |
| Incident | Formal record of a failure or suspected failure | Used for tracking and investigation |
| Aspect | Black-box testing | White-box testing |
|---|---|---|
| Internal design | Hidden | Visible |
| Basis | Specifications and input–output behaviour | Code, control flow, data flow |
| Also called | Functional testing | Structural testing |
| Typical techniques | Equivalence partitioning, boundary value analysis | Statement coverage, branch coverage, path testing |
| Test level | Primary artefact checked |
|---|---|
| Unit testing | Code |
| Integration testing | Design |
| Validation testing | Requirements |
| System testing | System engineering |
Revision summary
- Verification = “product right”; validation = “right product”.
- SQA includes both verification and validation.
- Error → fault → failure; not every fault causes a failure.
- Error is a human action or a value discrepancy; fault is a condition in the artefact; failure is observable.
- A fault can be latent, masked, or produce coincidental correctness.
- Testing is executing a program with the intent of finding errors.
- Exhaustive testing is impossible in practice.
- Black-box means design is hidden; white-box uses code.
- Mutation testing is a fault-based testing technique.
- DRE = defects found now ÷ total defects found now and later.
- Reliability bound: .
- Alpha testing is at developer site; beta testing is at customer site.
Previous-year exam insights
- Direct definition questions swap verification and validation wording; check whether the question says “product right” or “right product”.
- Fault-definition traps: a “condition that causes a system to fail” is a fault, not an error.
- Statement I/II questions test whether static verification can find faults without executing code, and whether exhaustive dynamic testing is possible.
- Match-the-list questions pair V&V with their reference documents, and pair error/fault/failure/incident with their definitions.
- Numeric questions use DRE and the conservative reliability bound ; calculate the product carefully.
- Black-box vs white-box questions test what is hidden and whether test cases come from specifications or from code.
- Fault-based testing is identified with mutation testing, not with unit or stress testing.
- Alpha/beta testing questions check the site and the team: alpha at developer site with internal testers, beta at customer site with real users.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- State the exact questions asked by verification and validation and classify a given activity correctly.
- Define error, fault, failure and incident, and give the causation chain.
- Explain why a fault may never produce a failure.
- Distinguish static verification from dynamic verification with examples.
- Compute DRE from phase and later defect counts.
- Apply the conservative reliability bound to a partially covered module.
- Match verification, validation, fault, failure and incident with their definitions.
- Explain black-box versus white-box testing and state what “black” hides.
- Identify mutation testing as a fault-based technique and explain fault seeding.
- Classify alpha and beta testing by site and by who performs them.
Attempt the sub-topic test first, then the subject test.