Deploy service stubs


+

Search Tips   |   Advanced Search


Overview

You deploy and run service stubs on a stub server, which is a small application server dedicated to running service stubs.

The client application, or test, addresses the stub server instead of the actual application of the original service.

The local stub server runs in the workbench on the local computer. Service stubs can be accessed locally or over the network by client applications or service tests. The local stub server is automatically stopped when you close the workbench.

If you are using Rational Performance Tester, you can deploy stub servers on remote computers that are running the Agent Controller on Linux and Windows platforms. This allows you to reduce the load on a local computer and to set up a dedicated stub server for performance testing. Remote stub servers remain active when the workbench is closed and can be stopped and started manually from the Stub Monitor view.

To use a service stub instead of the original service, be able to change the endpoint of the client application or service test to replace the URL of the original application with the URL of the stub server.


Deploy service stubs on a stub server

  1. In the stub editor, click the Deploy button.

    Alternatively, you can right-click the stub in the test navigator and select...

      Deploy On | Local stub server

    This opens the Stub Monitor view.

  2. In the Stub Monitor view, click Run.

    If you make any changes to the service stub, the stub is redeployed to the stub server after saving.

  3. To add more service stubs to the stub server, click Add and select a service stub from the workspace.

  4. deploy a stub server on a remote stub server, in the Stub Monitor view, click the New Location button and then, create or select a location for the remote stub server.

    To create a remote location:

    1. Click New.

      The Add Location window opens. The first page of the wizard lets you specify general properties for the remote location.

      Host name IP address or the fully qualified host name of the remote computer.
      Name descriptive name for the remote computer.
      Deployment Directory Directory on the remote computer that will store the test assets, for example: C:\tmp. The directory, which will be created if it does not exist, stores the temporary files that are needed during a schedule run.
      Operating System operating system of the remote computer, ... The second page of the wizard lets you specify the IP aliasing properties for this location.

    2. deploy multiple stub servers on a single computer, select Enable IP Aliasing to make it appear as though each stub server has its own IP address.

    3. To use IP addresses from all network interfaces, select...

        Use IP addresses from all network interfaces at the remote location

      To use addresses from a subset of network interfaces.

        Only use IP addresses from the following network interfaces

      Click Add to add the name of an interface and Edit to change the interface name. Specify network interfaces in the form eth0, eth2.

      If you do not use this form, the connection attempt fails.

    4. Click Next. The third page of this wizard lets you specify file locations.

    5. Specify a project directory and a File name to store the information about the new remote location, and then click Finish.

  5. Copy the URL of the service stub from the Stub Monitor view and paste it into the configuration of the client application.

    You can also directly access the WSDL specification of the service stub, which is a copy of the original WSDL with replaced URL endpoints.


What to do next

You can validate that the service stub is responding correctly by using the generic service client to invoke a call.


Related

  • Service stub overview
  • Create a service stub
  • Edit a service stub
  • Add stub servers to a performance schedule