You can simulate an HTTP connection with a virtual service,
also known as a stub.
Procedure
- In the Architecture School perspective, create a logical
HTTP connection resource (Creating logical HTTP connections)
and a physical web server resource for HTTP (Creating physical web server resources).
If you are not creating the stub by using the Recording Studio
perspective, also create an operation that uses the HTTP connection.
See Options for creating test resources.
- Create virtual services (message-based stubs) to represent these resources. See Creating and modifying message-based stubs.
- You can run stubs directly in Rational Integration Tester,
or publish them to Rational Test Control Panel and
run them there. See Publishing and running stubs.
- Use one of the following methods to configure the system
under test so that it sends messages to the stub. If you
recorded HTTP messages in the process of creating the stub, notice
that these choices are similar. Differences between recording and
virtualizing include the fact that packet capture does not allow virtualization,
and no direct connection option is available for recording.
Figure 1 shows
a network with no virtualization.
Figure 1. No proxy,
no virtualization
Results
The dependency for the system under test is now virtualized.
Traffic that matches the operations that are specified in the stub
(or all traffic, in the case of direct connection to the stub) now
receives virtualized responses instead of connecting to the live system.