15.1. Finding Unit Tests for a Single Use Case

Rather than trying to take on a whole use case, we can deal with it piece by piece, one activity at a time. Each activity is defined in terms of a set of preconditions, a single initiating signal, and a set of postconditions.[1]

[1] Unit tests apply to single-system interaction use cases, while system tests apply to activities grouped into larger use cases. We can use activity diagrams to show interactions between use cases at any level.

There may be several possible paths through each use case, such as Add Item to Order, because a use case is a specification of a set of possible behaviors. Each path is determined by combinations of system state and values for signal parameters, and each potential ...

Get Executable UML: A Foundation for Model-Driven Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.