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. ...

Get A Practical Guide to Testing Object-Oriented Software 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.