Complete Final Term Preparation Notes
- CS608 (Software Verification and
Validation)
Model-Based Testing
Model-Based Testing (MBT) checks the behavior of a system against predictions made by a
model.
Models include data flow, control flow, decision tables, and state machines. MBT is
applicable to both hardware and software.
It describes the input, conditions, and expected output behavior. It is lightweight and
formal.
Finite State Machines and State Transition Testing
A Finite State Machine (FSM) is a model of computation with defined states, transitions, and
inputs.
Deterministic FSMs (DFA) have one possible next state, while Non-deterministic FSMs
(NFA) can have many.
State Transition Testing is a black-box technique for systems with different states
depending on inputs.
It includes 0-switch and 1-switch coverage. Common in ATM, login systems, etc.
Confidence-Based Testing & Mutation Testing
This testing validates the effectiveness of test cases using fault seeding or mutation.
Mutation Testing introduces artificial faults (mutants) like changing operators or variables.
The goal is to see if the test suite can detect these faults.
Strong test data can kill (detect) mutants. Weak test data will allow them to survive (live
mutants).
Common mutation operators: arithmetic operator replacement, logical connector
replacement, statement removal, etc.
Fault Seeding Technique
Fault Seeding evaluates how effective testing is by inserting known faults (seeded) into the
code.
Testers are unaware which faults are real vs. seeded. Helps calculate test effectiveness.
It is based on the assumption that seeded faults mimic real ones.
Important concept: Competent Programmer Hypothesis - real faults are small and close to
the correct code.
Verification vs Validation
Verification: "Are we building the product right?" - Static process involving reviews,
walkthroughs, inspections.
Validation: "Are we building the right product?" - Dynamic process including actual test
executions like unit, integration, system, UAT.
Verification is done without executing code. Validation is done by executing code.
Walkthroughs, Peer Reviews, and Inspections
Walkthrough: Informal review guided by the document author. Used to gather feedback.
Peer Review: Cross-checking of code by fellow developers for issues and improvements.
Inspection: Formal process with roles (author, moderator, reader, recorder). Fagan
Inspection is a well-known method.
Includes predefined steps: Planning, Overview, Preparation, Inspection, Rework, Follow-up.
Checklists for SRS, Code and Documentation
Checklists help ensure completeness and accuracy in reviews. Used for SRS, code, and
documentation inspections.
They cover naming conventions, coding style, business rule coverage, input/output
validations, etc.
Test Planning
Test Plan: Document describing scope, schedule, features to test, resources, risks, and test
deliverables.
Includes entry/exit criteria, environmental needs, responsibilities, test strategy, schedule,
and mitigation plans.
There are master test plans, phase test plans (unit, integration, acceptance), and test
estimation methods.
Test Case Lifecycle
A test case moves through states: Design → Ready → Executed → Passed/Failed → Blocked.
Blocked test cases stop testing of related modules. Lifecycle helps manage and monitor
progress.
Test Suite Structure & Test Reporting
Test Suite: Organized collection of test cases, grouped by features/modules.
Test Reporting: Post-execution phase where results, defects, and metrics are documented.
Bug tracking tools log and monitor issues.
Regression Testing
Ensures recent code changes don't break existing functionality.
Three main methods:
- Retest All: Re-execute all test cases (time-consuming)
- Regression Test Selection: Only affected test cases are selected
- Test Case Prioritization: Based on business criticality and frequency of use
Challenges: Large test suites, resource/time constraints, test coverage.
Test Management using Microsoft Test Manager (MTM)
MTM supports all phases of testing: planning, test case development, execution, and
reporting.
Allows recording test actions, managing test cases, generating reports, and tracking bugs.
Test data management, masking sensitive data, comparing with baseline data, and
refreshing data are key aspects.