SENG 365 — Software Engineering
2026-10-01
By the end of this module, you should be able to:
Before class: Read Chapter 5, Sections 5.1–5.6.
A method has been manually tried with "VII" and returned 7.
What claim has actually been tested? What important behaviour remains unspecified?
I=1 V=5 X=10 L=50 C=100 D=500 M=1000
VII = 7, MDXX = 1520.XL = 40.null input.Identify the unit under test, input, oracle, execution, and assertion.
Write a suite that distinguishes plausible incorrect implementations.
Include:
For every test, state which fault it could reveal.
Exchange suites and assess:
Delete or revise one redundant or brittle test.
Tests are executable interface expectations. Gradle makes those expectations repeatable for every developer and CI environment.
TDD is not the chapter’s organizing framework, but it is a useful discipline:
The Roman-numeral kata makes the design consequences visible: test order influences the implementation you discover.
This test would be brittle because it depends on __________ rather than observable behaviour.
Before class: Read Chapter 5, Sections 5.7–5.9; review Chapter 3, Section 3.8.
How would you reliably test the rare branch?
Running the test many times is not control.
The method constructs its own source of randomness.
What is the smallest useful seam?
Introduce and inject a collaborator:
Then create a hand-written stub that returns a chosen index and records how it was called.
For this implementation:
Which uncovered branch represents a missing requirement? Which might be unreachable by contract?
Inspect the tests and control flow together.
Produce:
Coverage can reveal absence. It cannot prove correctness.
The tests revealed pressure to change __________ because __________.

Course home · Neil Ernst ©️