Stubs: Overview and tasks
Stubs can be used to simulate services that you are unable to use or that are otherwise unavailable.
For example, if you are testing a TIBCO BusinessWorks process but you do not always have access to TIBCO Designer, you can record the process events and create a stub from them. You can then run the stub in place of Designer. For more information, see Rational Test Virtualization Server overview.
A stub can be simple (for example, to simulate a single service that uses a single message case and the default case) or complex (for example, to simulate a Web Service or some other point-to-point operation that includes multiple message types or operations). In either case, the basic principles are the same, that is, a specific reply is sent when a specific message type is received.
At the most basic level, a stub receives a message and (optionally) validates its contents. Based on the validation results, or on the fact that the message was received, the stub can return some static response, such as a simple log action or a reply message.
- Looking up data in a database or spreadsheet
- Updating one or more records in a database
- Using failure paths
For more information, including detailed task topics, see Creating message-based stubs and Creating and modifying database stubs.