Software Engineering Notes – Part 1
Verification vs Validation
Verification checks whether we are building the product right by ensuring it follows requirements
and design specifications, while Validation checks whether we are building the right product that
satisfies user needs and expectations.
Test Case & Test Suite
A test case is a documented set of inputs, execution conditions, and expected results used to verify
a software feature. A test suite is a collection of multiple related test cases grouped together for
execution.
Regression, UAT, Alpha, Beta, Load & Robustness Testing
Regression Testing ensures new changes do not break existing functionality.
User Acceptance Testing ensures the software is acceptable to end users before final deployment.
Alpha Testing is done at developer’s site with limited users.
Beta Testing is done at customer site with real users before final release.
Load Testing checks performance under expected workload.
Robustness Testing checks behaviour under invalid, stressful or abnormal conditions.
Structural vs Functional Testing
Structural Testing (White-box) focuses on internal structure, logic, and code execution paths.
Functional Testing (Black-box) focuses only on software functionality and output without knowing
internal logic.
Black Box Testing Techniques
1. Equivalence Class Partitioning: Divides input data into valid and invalid classes and selects
one representative from each, reducing effort while maintaining coverage. Example: If valid age is
1–100, test 25 as valid and −5, 150 as invalid.
2. Boundary Value Analysis: Errors mostly occur at boundaries, so boundary values are tested.
Example: For range 1–100, test 0,1,2,99,100,101.
3. Cause-Effect Graph: Identifies logical relationships between inputs (causes) and outputs
(effects). Example: Login success occurs only when both username and password are valid;
otherwise login fails.
White Box Testing
White box testing is based on internal program logic and code structure. It ensures every statement,
condition, loop, and path is executed at least once. Techniques include statement coverage, branch
coverage, condition coverage, loop testing, and basis path testing.
Basis Path Testing & Cyclomatic Complexity
Basis Path Testing derives independent execution paths to ensure maximum logical coverage.
Cyclomatic complexity measures logical complexity and indicates minimum number of test paths
required. Lower complexity means easier maintenance and testing.
Cyclomatic Complexity Formulas
1) V(G) = E − N + 2 (E = edges, N = nodes)
2) V(G) = D + 1 (D = number of decision nodes)
3) V(G) = Number of Regions in Control Flow Graph
A value below 10 is considered good, above 20 indicates highly complex software.