Unit testing
Some parts of the examination require implementing methods adhering to a given specification. Consider an example:
-
Unit test: Test individual methods, classes and packages in isolation.
-
Integration Test: Test a group of associated components/classes.
-
Acceptance / Functional Test: Operate on a fully integrated system, testing against the user interface.
-
Regression Test: Ensure system integrity after (implementation) change.
-
Load test: Responsiveness vs. system load.
Informal problem specification:
A prime number is a whole number greater than 1 whose only factors are 1 and itself.
Sample values: 2, 3, 5, 7, 11, 13, 17, 23, ...
-
Specify but not yet implement classes / methods.
-
Write skeleton (dummy) implementations.
-
Write corresponding unit tests.
-
Implement skeleton.
-
Test your implementation.