You can simulate a TCP connection with a virtual service,
also known as a stub.
About this task
The following instructions apply to general-purpose TCP transports.
Although some TCP-based transports have their own logical and physical
transport types, the general steps are the same.
Procedure
- In the Architecture School perspective, create a logical
TCP connection resource (Creating logical TCP connections)
and a physical TCP server resource Creating physical TCP servers.
See Options for creating test resources.
- Create virtual services (message-based stubs) to represent
these resources. See Creating and modifying message-based stubs. To
create stubs by using the Recording Studio, see Recording TCP traffic.
- 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 TCP 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.