Plug-in Documentation

IBM Rational Test Virtualization Server (RTVS)

Overview

Overview

Service Virtualization helps you to automate the testing of integration in complex application environments much earlier in the development lifecycle. You can use this plug-in to create virtual services that model the services that your application depends on. You can virtualize services that are accessed through various technologies, including HTTP, MQ, JMS, JDBC, TCP/IP, CICS-TG, IMS Connect, SAP, and Software AG web methods. For more information, see Supported technologies for testing in the Rational Integration Tester documentation.

To use this plug-in, you need Rational Test Virtualization Server. To learn more about its installation, see the Installing Rational Test Virtualization Server section of the IBM Rational Solution for Test Automation documentation.

Compatibility

This plug-in supports Rational Test Workbench v8.5 or later.

The steps in this plug-in run on any agents that are supported by both the IBM UrbanCode Deploy and the Rational Test Control Panel Ant client, except for agents on z/OS.

Installation

No special steps are required for installation. See Installing plug-ins in UrbanCode products.

Note: Even when you have an older version of the plug-in (formerly called the GreenHat plug-in) that offers combined steps for automated integration tests and service virtualization, you can install this plug-in. No migration or upgrade process is involved.

Known limitations

The Start scenario and Stop scenario steps do not work within a transient environment.

Steps

Process steps in the IBM Rational Test Workbench Service Virtualization plug-in

Create Transient Environment

Create a transient Rational Integration Tester environment.

Input properties for the Create Transient Environment step
Name Type Description Required
Base Environment String Name of the environment that will be used as the base of the new environment Yes
Description String Description of the new environment No
Domain String Domain name Yes
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes

Delete Transient Environment

Delete a transient Rational Integration Tester environment.

Input properties for the Delete Transient Environment step
Name Type Description Required
Domain String Domain name Yes
Environment String Name of the environment to delete Yes
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
User name String The user name under which to perform the operation to get past environment locks No

Start Scenario

Start a scenario

Input properties for the Start Scenario step
Name Type Description Required
Domain String Domain name Yes
Environment String Environment name Yes
Force Boolean Stop any already-running scenario in the environment No
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
Scenario name String The name of the scenario to start Yes
Scenario owner String Filters the scenarios by owner No
Stop stubs Enumeration:

  • ALL
  • OPERATIONS
  • NONE
Specify ALL to stop all stubs in the environment; OPERATIONS to stop the stubs for
the operations in the scenario; defaults to NONE to leave any existing stubs running
.
No
User name String The user name under which to perform the operation to get through environment locks No

Start Stub

Start a stub.

Input properties for the Start Stub step
Name Type Description Required
Agent attributes String Comma-separated list of agent attributes identifying the agent to run on No
Component String Component the stub exists within No
Domain String Domain name Yes
Environment String Environment name Yes
Operation String Operation the stub exists within No
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
Stub name String The name of the stub (virtual service) to start Yes
User name String The user name under which to perform the operation to get past environment locks No
Version String The version of the stub (virtual service) to start No

Stop Scenario

Stop a scenario.

Input properties for the Stop Scenario step
Name Type Description Required
Domain String Domain name Yes
Environment String Environment name Yes
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
Scenario name String The name of the scenario (virtual service) to stop Yes
Scenario owner String Filters the scenarios by owner No
User name String The user name under which to perform the operation to get past environment locks No

Stop Stub

Stop a stub.

Input properties for the Stop Stub step
Name Type Description Required
Component String Component the stub exists within No
Domain String Domain name Yes
Environment String Environment name Yes
Operation String Operation the stub exists within No
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
Stub name String The name of the stub (virtual service) to stop Yes
User name String The user name under which to perform the operation to get past environment locks No
Version String The version of the stub (virtual service) to stop No

Update Transient Environment

Update a Rational Integration Tester transient environment.

Input properties for the Update Transient Environment step
Name Type Description Required
Domain String Domain name Yes
Environment String Name of the environment to update Yes
Rational Test Control Panel URL String URL of Rational Test Control Panel Yes
Tags Property File String Path to the file with the tag values to update in the environment. One of updateProps
or tagsPropertyFile must be specified.
No
Update properties String A new line separated list of name=value pairs. One of updateProps or tagsPropertyFile
must be specified.
No
User name String The user name under which to perform the operation to get past environment locks No

Usage

Use the Service Virtualization plug-in to automate the virtualization of services from IBM UrbanCode Deploy.

Before you begin

  1. Install the UrbanCode Deploy server. For assistance, see UrbanCode Deploy documentation.
  2. Install the Service Virtualization plug-in on the UrbanCode Deploy server. For assistance, see Installing plug-ins.
  3. Install the UrbanCode Deploy agent and connect it to the UrbanCode Deploy server. For assistance, see UrbanCode Deploy documentation.
  4. Install Rational Test Virtualization Server on the UrbanCode Deploy agent computer and apply a valid license. For assistance, see Installing Rational Test Virtualization Server.

About the task

As a tester, you might have a large number of services to be virtualized against the latest builds of a software system. Instead of manually virtualizing services against every new build, you can install the latest build on an IBM UrbanCode Deploy Agent computer and use it to automatically virtualize the services for you.
After deploying the Service Virtualization plug-in on the UrbanCode Deploy server, create a component and its processes, applications and its processes, environments, and resources. For information about how to create and configure these pieces, see UrbanCode Deploy documentation.

Examples

Example: Virtualizing services in a component process

This component process creates and updates an environment in IBM Rational Test Control Panel. You can use a similar process as part of an overall scenario that includes virtualized services. This process assumes that the application binary files are in the component. It also assumes that the environment contains an installation of Rational Integration Tester. The process runs the following steps in order:

  1. The Create Transient Environment step uses a base environment stored in Rational Test Control Panel to create a transient environment.
  2. The Update Transient Environment step updates the host name tag in the transient environment to correspond to the host where the environment is deployed, which could be in the cloud.
  3. The Start Stub step initiates the virtualized service.
  4. The Stop Stub step shuts down the virtualized service.
  5. The Delete Transient Environment step deletes the transient environment.

Example: Virtualizing services with Rational Test Workbench

The following example describes a scenario that includes a component process that uses virtualized services. In this example, an application in IBM UrbanCode Deploy comprises two components. One component is the user interface for a web application running on an application server. The second component is a virtual representation of a web service.

Before you begin

You must install IBM Rational Test Workbench, including IBM Rational Test Control Panel and IBM Rational Integration Tester. To learn more about Rational Test Workbench, see the Rational Test Workbench Knowledge Center.

About this task

To virtualize the web service, you can use the Green Hat plug-in to create a transient environment that mimics the behavior of the actual web service. The user interface component is deployed as any other component to a node where the IBM UrbanCode Deploy agent is installed, either on a specific host or on the cloud. When the application server is configured on the user interface component, the proxy is installed so that HTTP calls are routed to the IBM Rational Test Control Panel server, which then returns the data from the stub.

Procedure

  1. Use IBM Rational Test Control Panel to record and publish the virtual services that you want to emulate. These virtual services are also known as stubs. When you create the stubs, add environment tags to replace the recorded data with dynamic data, such as the host name. To learn more about stubs, see Stubs in the Rational Integration Tester documentation.
  2. In IBM UrbanCode Deploy, create an application with two components, one for the user interface component and one for the virtualized service. To learn more about creating applications, see UrbanCode Deploy documentation.
  3. Create a component process to install the user interface component. The following steps show an example set of process steps for an application running on Tomcat.
    1. Use the Install Tomcat step in the Tomcat plug-in to install the application server.
    2. Use the Download Artifacts step from a source control plug-in such as the UrbanCode Versioned File Storage plug-in to download the user interface application.
    3. Use the Unzip step in the File Utils plug-in to extract the user interface application.
    4. Use the Modify Tomcat Artifacts step in the Tomcat plug-in to update the WSDL host name that the user interface application uses for calls to web services.
    5. Use the Update Config File step in the Tomcat plug-in to add the proxy information for IBM Rational Test Control Panel to the tomcat6 configuration file. For Tomcat, you change the JAVA_OPTS properties for http.proxyHost and http.proxyPort to point to the host name and port number of the IBM Rational Test Control Panel proxy.
    6. Use the Start Tomcat step in the Tomcat plug-in to start the application server.
    1. Create Transient Environment Use a base environment that you have created in IBM Rational Test Control Panel to create a transient environment. The transient environment is used to start the stub with dynamic property values.
    2. Update Transient Environment Update the environment with properties specific to the deployment environment.
    3. Start Stub Start the virtualized service in the transient environment.
    4. Stop Stub Shut down the virtualized service.
    5. Delete Transient Environment Delete the transient environment.

Results

When you run the application process, the user interface component is deployed and then the virtual services component is deployed.