1. Gyanastra
  2. Software Engineering
  3. Software Testing
  4. Verification Validation and Terminology
Free lesson, no account needed 11 min read 24 practice questions after it
Asked in past papers10 times
  • ISRO2009
  • UGC NET202320192017201520142013201220092007

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 cc of the code is covered and the executed tests pass with probability pp, then reliability R≤c×pR \le c \times p.
  • 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

  1. During requirements analysis, define validation criteria that describe what the user will accept.
  2. During design, perform verification reviews to check that the design implements the requirements correctly.
  3. During coding, use code reviews and unit testing to verify that each module conforms to its detailed design.
  4. Integrate modules and perform integration testing to verify interfaces and subsystem behaviour.
  5. Perform validation testing against the requirements and user needs, not merely against the design.
  6. Perform system testing to check system-level attributes such as performance, security and reliability.
  7. Finally, carry out acceptance testing, alpha testing or beta testing to obtain user confidence.

The causation chain that explains terminology is shown below.

Figure. It shows the causation chain from human error to artifact fault and then to failure when the fault is activated. A fault may stay latent or activation may be masked or coincidentally correct.

Formulas

  • Defect Removal Efficiency:
    DRE=DphaseDphase+Dlater×100%DRE = \frac{D_{phase}}{D_{phase} + D_{later}} \times 100\%
    where DphaseD_{phase} is the number of defects found in the current phase and DlaterD_{later} is the number found later.
  • Statement coverage:
    Cstmt=SexecStotal×100%C_{stmt} = \frac{S_{exec}}{S_{total}} \times 100\%
    where SexecS_{exec} is the number of executed statements and StotalS_{total} is the total number of statements.
  • Decision coverage:
    Cdec=DexecDtotal×100%C_{dec} = \frac{D_{exec}}{D_{total}} \times 100\%
    where DexecD_{exec} is the number of executed decision outcomes and DtotalD_{total} is the total number of decision outcomes.
  • Reliability bound for a partially tested module:
    R≤c×pR \le c \times p
    where cc is the fraction of code covered and pp 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?

  1. The activity checks the requirements document against quality criteria for a good specification.
  2. It does not check whether the requirements capture the user’s real needs.
  3. 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.

  1. The programmer’s mistake is a human error.
  2. The incorrect assignment in the code is a fault.
  3. When the program runs with x and y unequal, 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.

  1. Dphase=40D_{phase} = 40, Dlater=10D_{later} = 10.
  2. DRE=4040+10×100%=4050×100%=80%DRE = \frac{40}{40+10} \times 100\% = \frac{40}{50} \times 100\% = 80\%.
    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?

  1. c=0.9c = 0.9, p=0.9p = 0.9.
  2. R≤c×p=0.9×0.9=0.81R \le c \times p = 0.9 \times 0.9 = 0.81.
    Answer: Reliability is at most 0.81.

Example 5 (match the list). Match List-I with List-II.

List-IList-II
A. Verificationi. Observable incorrect behaviour during operation
B. Validationii. Checking conformance to specification
C. Faultiii. Incorrect step, process or data definition in an artefact
D. Failureiv. Meets user needs and expectations
  1. Verification checks conformance to specification → A–ii.
  2. Validation checks user needs → B–iv.
  3. Fault is an incorrect definition in an artefact → C–iii.
  4. Failure is observable incorrect behaviour → D–i.
    Answer: A–ii, B–iv, C–iii, D–i.

Comparison

AspectVerificationValidation
Central questionAre we building the product right?Are we building the right product?
Reference documentSpecifications, design, standardsUser needs, requirements, expectations
FocusConformance to specificationFitness for use
Typical techniquesReviews, inspections, walkthroughs, unit testing, integration testingValidation testing, acceptance testing, alpha and beta testing, user reviews
Can be done without executable code?Yes, by static reviewsYes, by reviewing requirements or prototypes with users
TermDefinitionKey point
ErrorHuman action producing an incorrect result; or discrepancy from true valueHuman mistake or deviation
FaultIncorrect step, process or data definition in an artefactCondition that can cause failure
FailureDeviation of delivered behaviour from specified behaviourObservable incorrect behaviour
IncidentFormal record of a failure or suspected failureUsed for tracking and investigation
AspectBlack-box testingWhite-box testing
Internal designHiddenVisible
BasisSpecifications and input–output behaviourCode, control flow, data flow
Also calledFunctional testingStructural testing
Typical techniquesEquivalence partitioning, boundary value analysisStatement coverage, branch coverage, path testing
Test levelPrimary artefact checked
Unit testingCode
Integration testingDesign
Validation testingRequirements
System testingSystem 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: R≤coverage×success probabilityR \le \text{coverage} \times \text{success probability}.
  • 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 R≤c×pR \le c \times p; 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:

  1. State the exact questions asked by verification and validation and classify a given activity correctly.
  2. Define error, fault, failure and incident, and give the causation chain.
  3. Explain why a fault may never produce a failure.
  4. Distinguish static verification from dynamic verification with examples.
  5. Compute DRE from phase and later defect counts.
  6. Apply the conservative reliability bound to a partially covered module.
  7. Match verification, validation, fault, failure and incident with their definitions.
  8. Explain black-box versus white-box testing and state what “black” hides.
  9. Identify mutation testing as a fault-based technique and explain fault seeding.
  10. Classify alpha and beta testing by site and by who performs them.

Attempt the sub-topic test first, then the subject test.

Pages 1–2 of 2