Component testing

As a component is a well-bounded (encapsulated) collection of parts, it can be treated as a subsystem for testing. This means that each part needs to be tested (unit test), then the interaction between the parts (system test), and finally the component services themselves (user test). Testing is driven by the test specification for the component.

When a component consists of classes, each class instance (object) must be tested individually. This is normally done through exercising their operations via a test harness. Once you are confident in the operations of the individual classes, they can be tested working with other class instances as identified on the interaction diagrams for the component. Test cases can be derived from ...

Get Service- and Component-based Development: Using Select Perspective™ and UML 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.