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 a WSDL file, 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 (that you completed in Creating and running a test) or you can discover and record an API (that you can complete as described in Discovering, Recording, and Intercepting an HTTP proxy).
You have successfully tested a web service hosted on your local system by using the sample WSDL.
Importing the Add Numbers server’s WSDL file to model its API
You must have completed testing of the web service by using the sample WSDL file.
Test Integrations and APIs creates service components and operations on the canvas to represent the service described in the WSDL file. The options for creating tests and stubs from the service definition are also displayed. You have already used these options to create and run a test in Creating and running a test.
You must create a stub from the WSDL definition. See Creating a stub from the WSDL definition of the API.
Creating a stub from the WSDL definition of the API
You must have completed importing the WSDL in Test Integrations and APIs.
You have successfully created a stub from the WSDL definition for the API.
You must run the stub created. See Running the stub.
Running the stub
You have successfully run the created stub.
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. Details about the use of this proxy are in Discovering, Recording, and Intercepting an HTTP proxy.
You configure the Add Numbers client 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 call the stub. See Calling the stub.
Calling the stub
You must have completed configuring the Add Numbers client to use the stub.
- To model your system when you do not have Swagger definition or WSDL files and for more details about the HTTP/TCP Proxy, see Discovering, Recording, and Intercepting an HTTP proxy.
- For an alternative procedure for creating a stub for the Add Numbers API, click the tile labeled Create a virtualized Web Service on the Test Integrations and APIs Home screen. This opens an internal interactive guide that walks you through creating a stub for the Add Numbers server.
- To create additional stubs for the addition operation, perform the following steps:
- Open the Test Factory perspective in Test Integrations and APIs.
- In the tree on the left, right-click the addition operation and click . This action creates a stub for the operation and an event using Message Exchange Pattern of the operation that was imported from the WSDL file.
- To create stubs from data from your real systems rather than entering data manually, you can record the traffic in the system under test and create stubs from those recordings. For instructions on how to record traffic for creating stubs, see Discovering, Recording, and Intercepting an HTTP proxy. You can also use the recording in combination with a WSDL or Swagger definition to model the system under test. In other words, create the service components, transport resources, and operations by synchronizing with WSDL or Swagger and then record the traffic to create tests and stubs.









