Protocol Testing
As an object interacts with other objects, it will receive multiple messages. These messages must be sequenced in accordance with the specification. Protocol testing investigates whether the implementation of a class satisfies its specification. The various protocols that an object participates in can be inferred from the pre- and postconditions for individual operations defined in its class. Identifying sequences of method invocations by combining a method whose postcondition enables the precondition of another method defines a protocol. It is much easier to see these sequences from the state diagram for a class than deriving them from written pre- and postconditions.
The interaction test suite includes tests of each protocol. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access