Back In the print window choose "Save as PDF" as the destination
NOTE.CS

Software Testing

1 topic · 28 Nov 2026
1

Software Testing ★★★★★

Software Engineering

Unit → Integration → System → Acceptance

Unit → Integration → System → Acceptance

Black box testingWhite box testing
Tests behaviour without seeing the codeTests internal code, paths and logic
Done by testersDone by developers
Equivalence partitioning, boundary value analysisStatement, branch and path coverage
  • Regression testing — re-test after a change to make sure nothing old broke.
  • Smoke testing — quick check that the main features work in a new build.
  • Alpha testing (inside the company) vs Beta testing (real users).
  • Verification = are we building the product right? Validation = are we building the right product?
A tiny unit test · C++
// Function under test
int maxOf(int a, int b) { return a > b ? a : b; }

// Unit tests (boundary and normal cases)
assert(maxOf(3, 5) == 5);
assert(maxOf(5, 3) == 5);
assert(maxOf(-1, -1) == -1);
assert(maxOf(INT_MAX, 0) == INT_MAX);

Q & A

  1. What is boundary value analysis?
    Testing at the edges of valid ranges. For an age field 18–60, test 17, 18, 19, 59, 60 and 61, because bugs often hide at boundaries.
  2. Error vs defect vs failure?
    Error: a human mistake. Defect (bug): the fault in the code caused by it. Failure: the wrong behaviour seen when the defective code runs.