Work Product (Artifact): Test Stub
This artifact is a specialized implementation element used for testing purposes, which simulates a real component.

The purpose of the Test Stub is to simulate a real component which is not available for testing.

Container Artifact
RolesResponsible: Modified By:
Input ToMandatory:
  • None
Optional: External:
  • None
Output From
Brief Outline

There are two aspects regarding the Test Stub: the degree of emulation and the lifecycle. Given the test's scope and goals, a stub's implementation could range from just an almost empty class which complies with a set of interfaces to a full-blown emulator which will perform very close to the real component in terms of functionality. Except for the simple throwaway tests, the stubs will have the same lifecycle as the components under test, therefore in most of the cases they need to be treated the same as product code.

Key Considerations

Testability Elements are typically created and modified in parallel with creating and modifying corresponding application or system implementation elements.

Representation OptionsUML Representation: Element in the implementation model, stereotyped as <<test stub>>. 

See Artifact: Implementation Element.

More Information