Rational Test Virtualization Server
Documentation developerWorks

Default urls:

http://localhost:7819/RTCP
http://localhost:7828

The Rational Test Virtualization Server is the server to run the created virtual services created with RTW.
More on RTVS

The Rational Test Control Panel is the web interface to the RTVS. Is gives users the ability to upload/start/stop virtual services.
More on RTCP

Nice Introduction Video

The RTVS server is installed by installing the Rational Integration Test Agent (RITa). This Agent process connects to the RTCP. This Agent process start RunTest.exe for every stub instance.
Implementation Guide

RTVS reporting

A new RTVS reporting tool is release with V9.0. This is documented at: Reporting Tool. The http://localhost:7828 interface provides a basic query interface where you can try things out.

Figure: New reporing feature of RTVS

RTVS in CI

The documentation "Testing with RIT > Working in Non-GUI mode" contains a lot of information.

ANT starting Stubs

Search for start-stop-stub.xml for a slick starting of a stub. To get an idea, here part of that file.

<target name="start" description="start a stub">
        <startStub domain="${domain}" environment="${environment}" component="${component}" operation="${operation}"
            name="${name}" version="${version}" serverURL="${serverURL}" attributes="${attributes}" />
</target>

Check ANT for a cmd-example syntax.

REST interface

You can leverage the REST interface to interact with the RTCP/RTVS. One can leverage a tool like cURL to interact with RTCP/RTVS.

CMD starting Stubs


A simple cmd file to start a specific stub.
PATH %PATH%;C:\Program Files\IBM\RationalIntegrationTester
IntegrationTesterCmd.exe --serverUrl "http://localhost:7819/RTCP/" --domain "Booking System" --environment "IBM MQ & WAS" --name "FlightBookingStub" -v "3.0"  start-stub

For stopping a stub the specific version needs to be specified. For starting the most recent stub will be started.

The above cmd file can be called

  1. RQM - as a test leveraging the RQM CMD Line-adapter.
  2. Jenkins - as a windows cmd
  3. ANT - as a command

Figure: The error message to deploy more stubs than possible is.

Licensing

The different licenses fits the various needs. The capability/functionality of the application remains the same.

PVU Mode

When you are deploying the RTVS agent as PVU there is no software assisting in being compliant. The customer needs administration to maintain compliancy of using the right license on the correct hardware.
More on PVU.

Agent Mode

Note! This is called "Agent Mode Licensing" by IBM. There is a specific Technote on this Agent Mode Licensing
It contains 2 errors:

The license is returned after 5 minutes if 'idle' time.

Agent - Token Licensing

Advantage of tokens is than the tokens can be re-used by other licenses when returned to the token-pool.

More on Token.

Agent - Simultaneous Session

The simultaneous session license is a server license which is not bound to any capacity. In other words, you can create a large machine (e.g. 16+ cores). You can add cores without needing additional licenses. The Simultaneous Session licenses are returned when instances are stopped (the runtests executables) or performance test stops.

Confirmed 09-2016 by product management:

Note!The RTVS used the ibmrtvs_simultaneous_session license, for a load test (activating RTPS) needs the ibmrpts_simultaneous_session license.

The RTVS SS or RTVS PVU license is needed for a scheduled "Run ...". It will be returned after 5 minutes.

More on Simultaneous Session

Installation

By adding the RIT-Agent as a RTVS-agent you install the RTVS.
Needed file: RIT_AGENT_8.6_MP_ML.zip

Info! The RTVS is installed by installing the RIT Agent.

Figure: Installing the Agent as a RTVS Agent based on PVU. Agent mode (Token licensing) is documented above.

In the Rational Test Control Panel the 'control' of the RTVS is managed. This RTCP can be installed somewhere else.

Which mode to use for an agent?
PVU mode means that this usage is covered by a valid PVU-license. This administration only.
Agent mode means that a token-license is obtained from a license server hosting token-licenses.

See Documentation

Question about running multiple Agents on a large server.
it is possible to configure config/Agent.config to run multiple Engines as shown above.
These must be manually added to the Agent in Physical Views
Select them in the performance test as required
Uncomment and rename the following section of Agent.config See paragraph below.

Adapt the rtcpURL to your needs in the D:\Program Files\IBM\RIT-Agent\config\Agent.config file.

<rtcp enabled="true">
	<jmxPort value="8765"/>
	<!--  -->
	<!-- NOTE: If editing by hand the URL should include http:// at the beginning -->
<rtcpURL value="http://fibula5.vanlint5.nl:7819/RTCP"/>		

Starting Agent as a Service

I had some issues in getting the agent up and running as a service (Windows Server 2016). Here some tips in case of trouble:

To start a service from the Admin-command line you can use:

prunsrv.exe //ES//IBMRITAgent

To configure the service you can use:

prunmgr.exe //ES//IBMRITAgent

The password can be anything (not verified) for LocalService user. Make note that here you have to option to define a log-directory. From that I learned that I had to grand rw privelidges to:

If it can not access the .agent.ServerId it will create lot's of entries in RTCP by reregistring it's service.

Multiple Agents

Once I found this option, to run multiple Agents on 1 server. But at this moment I don't see the real benefit of it.
Slightly different is to have multiple RTVS servers (each having on Agent). That would give the benefit of loadbalancing. At a customer we have proven that the architecture, with 1 agent, can handle 10.000tps+ on one server.

Note! For every stub, the RIT Agent, will start a separate RunTest.exe process.

The RunTest.exe is a multithreaded application. When having multiple cores, it will utilize all cores.

Figure: Selection of a specific agent for deployment of a stub.

Figure: Selection of a specific agent for deployment of a stub.

Configuring multiple agents is basically copy the code-tree and configure the files appropriately. Make sure you have unique directories

  1. config/Agent.config
    • Change workspaces to unique location (e.g. by adding the number behind it).
    • Add an Instance name eg.
      <instance name="Agent2"/>
    • Configure unique jmxPort
      <jmxPort value="9766"/>
    • Apply identifier.
      <identifier name="Agent2"/>
    • By adding a attribute (eg the name) one can filter the agent on a unique name to deploy a stub on.
      <agentAttributes>
      	<attribute value="Agent2" />
      	<attribute value="Domain_Savings" />
      </agentAttributes>
    • Optionally you can define Domaind and/or Environments to allocate specific agents for specific Domains
      <domains>
      	<domain name="testDomain1">
      		<environment name="testEnvironment" />
      	</domain>
      </domains>

      In case of tokens you must specify only one domain per agent.

  2. Agent.ini
    • Add unique idb port
      -Dgreenhat.idb.server.port=7821
  3. RunTest.ini
    • Add unique idb port
      -Dgreenhat.idb.server.port=7821
    • You could crease memory to 1024m
      -Xmx1024m

You have to start the agent by overwriting the connection port, one which is not used by other Agents (don't forget the firewall).

Agent.exe -p 4478

Stub Complexity

The need for behavior of a virtual service is determined by the test to be performed on the calling life application. A virtual service should be as simple as possible. To much complexity raises maintenance. It might be beneficial to shift the applicable test to a later stage of the testing phases.

Below is a initial defintion of Virtual Services complexity.

5 Highly Complex
4 Complex
3 Difficult
2 Normal
1 Easy
0 Test Connection

Some more detail to guide the complexity:

5 Highly Complex
These virtual services contain a high level of complexity or higher. This complexity can be in data manipulation, security or human-organizational complexity. Other factors of complexity can be the usage of the complex stub types like: Behavioural or Model driven/stateful stubs.

4 Complex
These virtual services has a higher complexity definition. Examples are multiple operation in one stub-defintion. An other example is the processing of dynamic messages with repetition and/or optional fields. (One message results in multilpe replies).

3 Difficult
This type of virtual services are extentions of behaviour and datamanipulation. Searching databases based on received keys and sending out one or multiple replies. More than one level of if/then/else and or loops in the scripted behaviour of the service. Coding of RIT-functions is not difficult, but can be considered level-3, while it's not often practiced.

2 Normal
A virtual service defintion which searches data based on received keys of a single message (no parsing algorithms). That testdata is used to generate one or multiple replies.

1 Easy
A virtual service which are created based on recordings or generated based on the Message Exchange Pattern (MEP). These virtual services need little to no editing.

0 Testing Connection
A special level to identify the 'base level' of testing the connection. Being able to capture the recordings, having the correct rights, being able to genete a test/stub of the recordings.

Make note of the following:

A big time-saver are:

Recent discussion is about reducing complexity to improve throughput.

RTVS in Docker

Running Services in Docker Containers

The above shows how to deploy services in a Docker container. This is not deploying a RTVS server in a Docker container, just a single service.

Other Sources

Related document links:

  1. Start and Stop scripts
  2. Deleting Evnrionments
  3. RTVS
    ANT and RTVS
  4. RTVS and CLI
  5. Forrester Research Total Economic Impact Study on Service Virtualization and Test Automation Solutions

    Forrester Research has just completed a Total Economic Impact study for a large financial services institution to quantify the actual return on investment for service virtualization. Read Forrester's analysis to learn how service virtualization is eliminating testing bottlenecks and significantly reducing the cost of testing.
    Get Your Report

I noticed that every running stub takes about 150MB core memory.