Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
04-Soft-A6, Software Quality Assurance — National Exams, May 2015 (3 hours, open book, 8 questions of equal value; the first FIVE as they appear in the answer book are marked — all eight are solved here as a study resource).
Part (a) — white-box vs. black-box testing.White-box (structural/glass-box) testing derives test cases from knowledge of the program's internal structure — its control flow, logic, loops and conditions — with the goal of exercising every independent path, every logical decision on both its true/false branches, and every loop at its boundaries (basis path testing, Q8, is a white-box technique). Black-box (behavioural/functional) testing derives test cases purely from the specified functional requirements/interface, with no knowledge of internal implementation, focusing on inputs and expected outputs (equivalence partitioning, boundary value analysis — Q7 — are black-box techniques). White-box asks "is every internal path correct?"; black-box asks "does the observable behaviour match the specification?" — the two are complementary, not competing.
Part (b) — cyclomatic complexity. Cyclomatic complexity, V(G), is a software metric that provides a quantitative measure of the logical complexity of a program by counting the number of linearly independent paths through its control-flow graph; it also equals the number of test cases needed to achieve basis-path coverage (execute every statement at least once). Three ways to compute it:
V(G) = E − N + 2, where E is the number of edges and N the number of nodes in the flow graph.
V(G) = P + 1, where P is the number of predicate (decision) nodes in the flow graph.
Count the number of enclosed (bounded) regions of the flow graph and add 1 — the number of regions corresponds directly to the complexity.
Part (c) — two black-box techniques.
Equivalence partitioning — divides the input domain into classes of data from which test cases can be derived, such that one representative value from a class is assumed to exercise the whole class the same way; reduces the number of test cases needed while still covering every distinct behaviour (used for Q7's NOT NULL/duplicate-key/valid-insert classes).
Boundary value analysis (BVA) — complements equivalence partitioning by focusing specifically on values AT and just beyond the edges of each equivalence class (e.g. min, min+1, max, max+1), because defects cluster at boundaries far more often than at the interior of a class (used for Q7's CHAR(20) exactly-20 vs. 21-character cases).