Artifact:
|
A specialized implementation element used for testing purposes, which simulates a real component. | |
Other Relationships: |
Part Of Implementation Model
Extends: Testability Element |
Role: | Implementer |
Optionality/Occurrence: | Optional. Used if the real components are not available or are too expensive to use for testing. |
Templates and Reports: |
|
Examples: | |
UML Representation: | Element in the implementation model, stereotyped as <<test stub>>. |
More Information: |
Input to Activities: | Output from Activities: |
The purpose of the Test Stub is to simulate a real component which is not available for testing.
There are two aspects regarding the Test Stub: the degree of emulation and the lifecycle. Given the tests' scope and goals, a stub's implemenation 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.
Property Name | Brief Description | UML Representation |
---|---|---|
name | the name of the class | attribute |
description | a brief description of the role of the class in the system | attribute |
responsibilities | a listing of the responsibilities of the class | attribute |
attributes | the attributes of the class | attribute |
The stubs follow the development cycle of the components under test.
See Responsibility in Artifact: Implementation Element.
See Tailoring in Artifact: Implementation Element.
Rational Unified Process |