Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated 13 November 2026
Notes on this paper
Reference texts: Pressman, Software Engineering: A Practitioner's Approach , 9th ed. (SQA planning, review, testing strategies/techniques, cyclomatic complexity, basis path testing); Sommerville, Software Engineering , 10th ed. (software process, agile practice, configuration management); ISO/IEC 25010 SQuaRE (software quality characteristics); ISO/IEC 12207 (life-cycle/configuration-management processes).
Question 7 (10 marks)
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given. The authentication subsystem's declared interface constraints (the specification, not the implementation): login length ∈ [6, 8] characters; password length ∈ [6, 8] characters AND must contain at least one lower-case letter, at least one upper-case letter, and at least one digit.
Find. A black-box test suite, derived purely from these stated constraints, that exercises every equivalence class and every length boundary for both the login and the password fields.
Approach. Apply equivalence partitioning to the length constraint (too-short / valid / too-long, for both fields) and to the password's three required character classes (missing lower-case / missing upper-case / missing digit), then apply boundary value analysis to the length limits (exactly 6, exactly 8, one below, one above).
Test case 1 — valid baseline (both fields valid, all password classes present). Login alice1 (6 chars), password Abc123 (6 chars, has lower/upper/digit).
login = "alice1", password = "Abc123"
Expected result: accepted — the reference case every other test case is compared against.
Test case 2 — login too short. Login equivalence class: length < 6.
login = "bob" (3 chars), password = "Xyz789"
Expected result: rejected — login shorter than the 6-character minimum.
Test case 3 — login too long. Login equivalence class: length > 8.
login = "alice123456" (11 chars), password = "Xyz789"
Expected result: rejected — login longer than the 8-character maximum.
Test case 4 — login at the lower length boundary (BVA). Login exactly 6 characters, the declared minimum.
login = "abcdef" (6 chars), password = "Ab1defg"
Expected result: accepted — 6 is exactly the boundary, not below it.
Test case 5 — login at the upper length boundary (BVA). Login exactly 8 characters, the declared maximum.
login = "abcdefgh" (8 chars), password = "Ab1defgh"
Expected result: accepted — 8 is exactly the boundary, not beyond it.
Test case 6 — password too short. Password equivalence class: length < 6.
login = "carol1", password = "Ab1de" (5 chars)
Expected result: rejected — password shorter than the 6-character minimum, independent of its character content.
Test case 7 — password too long. Password equivalence class: length > 8.
login = "carol1", password = "Ab1defghi" (9 chars)
Expected result: rejected — password longer than the 8-character maximum.
Test case 8 — password missing an upper-case letter. Length is valid (7 chars); character-class equivalence class: no upper-case.
login = "dave12", password = "ab1defg"
Expected result: rejected — violates the "must contain an upper-case letter" rule even though the length is valid.
Test case 9 — password missing a lower-case letter. Length is valid (7 chars); character-class equivalence class: no lower-case.
login = "erin123", password = "AB1DEFG"
Expected result: rejected — violates the "must contain a lower-case letter" rule.
Test case 10 — password missing a digit. Length is valid (7 chars); character-class equivalence class: no digit.
login = "frank12", password = "Abcdefg"
Expected result: rejected — violates the "must contain a number" rule.
Black-box test suite for the authentication subsystem
# Login Password Test intent Expected result
1 alice1 Abc123 Valid baseline Accepted
2 bob Xyz789 Login too short (<6) Rejected
3 alice123456 Xyz789 Login too long (>8) Rejected
4 abcdef Ab1defg Login at lower boundary (6) Accepted
5 abcdefgh Ab1defgh Login at upper boundary (8) Accepted
6 carol1 Ab1de Password too short (<6) Rejected
7 carol1 Ab1defghi Password too long (>8) Rejected
8 dave12 ab1defg Password missing upper-case Rejected
9 erin123 AB1DEFG Password missing lower-case Rejected
10 frank12 Abcdefg Password missing digit Rejected
Topic: Black-box testing (equivalence partitioning + boundary value analysis) of a length- and character-class-constrained authentication interface.
Key relations: equivalence classes = {valid} ∪ {login too short/long} ∪ {password too short/long} ∪ {password missing lower/upper/digit}; boundary values = length 6 vs. 5, length 8 vs. 9.
Why this works: every test case is derived only from the stated login/password rules — never from how the validation is actually coded — which is the black-box definition from Q5a, and each case isolates exactly one constraint so a failing case localizes the defect immediately (e.g. test case 8 alone tells you the upper-case check is broken, independent of the length check).
Common pitfall: testing only "all rules violated at once" cases (e.g. a 2-character all-lowercase password) — a single case like that cannot tell you WHICH rule the implementation actually failed to enforce, whereas isolating one violated constraint per test case (as above) can.
Source: Pressman, Software Engineering: A Practitioner's Approach , 9th ed., Ch. 18 §18.5 (Black-Box Testing: Equivalence Partitioning & Boundary Value Analysis).