Creating a project
- You must have closed IBM DevOps Test Virtualization Control Panel (Test Virtualization Control Panel) sessions that are running if any.
- If Test Integrations and APIs is running and you have just completed the tasks in Creating and running a test, you probably have that project open. To create and run a stub with an HTTP/TCP Proxy, you must create a new project. Therefore, you must close the existing project by clicking . This action closes the project and restarts Test Integrations and APIs.
After you restart Test Integrations and APIs, you must create a new project, provide a name for your project and save it on your local drive. The following instructions are applicable for the Windows™ OS.
You must start the Add Numbers server and client. See Starting Add Numbers server and client.
Starting Add Numbers server and client
You must have created a project as described in Creating a project. Your project must be open in Test Integrations and APIs.
Test Integrations and APIs contains some example APIs. In this example, you use AddNumbers, which has a WSDL document describing the API.
If you want to model a system that does not have a WSDL definition, you can use a Swagger file instead. See Creating and running a test.
You have successfully tested a web service hosted on your local system by using the sample WSDL.
You must configure the client to use the created stub. See Configuring the Add Numbers client to use the stub (virtual service).
Configuring the Add Numbers client to use the stub (virtual service)
You must have completed creating the stub and run it.
To support Test Integrations and APIs Service Virtualization, you must configure HTTP clients to use the Test Integrations and APIs HTTP/TCP Proxy. You must configure the Add Numbers client application to use the Test Integrations and APIs proxy by using the standard Java proxy settings.
You have successfully configured the Add Numbers client to use the stub.
You must verify if the Add Numbers client application is using the HTTP proxy. See Verifying that the Add Numbers client is sending traffic through the proxy.
Verifying that the Add Numbers client is sending traffic through the proxy
The Add Numbers client must be running. If it is not, go to <install_location>/DevOpsTestAPI/examples/addnumbersclient and run the startup script.
You have verified that the Add Numbers client application is using the HTTP proxy.
You must discover the endpoints that are in use by the Add Numbers client application. See Using topology discovery to discover the endpoints in use.
Using topology discovery to discover the endpoints in use
You must discover the endpoints that are in use by the Add Numbers client application by selecting the intercepts registered with Test Virtualization Control Panel.
Topology discovery is the process of observing and modeling the components of a system under test by using only real traffic that flows through the system. You can view the resources that the system calls and choose the ones to include in the system model within your project. You then use this model to make detailed recordings of interactions and create tests and virtual services from those recordings. Topology discovery, recording, and service virtualization all require the HTTP proxy. Therefore, if you configure the HTTP proxy for the client for any one of these tasks, you need not do anything separately for the other tasks.
You have discovered the endpoints used by the HTTP proxy when running the Add Numbers client application.
You must record an operation for a message-based stub for the Add Numbers client application. See Recording an operation.
Recording an operation
You must have completed discovering of the HTTP proxy endpoints.
You can record the traffic that is going through the proxy to and from the Add Numbers server and use the recorded messages to create a stub, which provides a virtual Add Numbers service.
At this stage, the Logical View of the Architecture School perspective shows the component named AddNumbers containing an operation named Add, along with an HTTP transport.
You have recorded requests and responses from the Add Numbers server and used them to create a stub that can listen to the request for one of the operations you recorded and returns the result that you recorded from the server for that request.
You can verify if the client receives responses from the stub when the server application is disabled. See Disabling the server application and verifying that the client receives response from the stub.
Disabling the server application and verifying that the client receives response from the stub
You have successfully created, run, and verified a virtual service (message-based stub) that uses an HTTP proxy as a transport for messages.
- To control what requests the stub must respond to, you can use the stub editor’s Input tab and The Field Editor. For instructions, see The Input tab.
- To control how the stub constructs responses, you can use the stub editors Activity tab and The Field Editor. For instructions, see The Activity tab.










