Wednesday, March 5, 2014

What is Virtual Table Server (VTS) in HP LoadRunner 11.52

HP has announced its newer version of its flagship tool HP LoadRunner 11.52. LoadRunner 11.52 has major changes in Virtual Table Server (VTS). In this blog post, we will see about the new features of Virtual Table Server of HP LoadRunner 11.52.

Virtual Table Server is a tool that enables sharing of test data and parameters between LoadRunner Virtual Users (VUsers). Usually performance testers use parameterization in their scripts, but in Virtual Table Server it acts as centralized repository to store data which can be shared between VUsers during the test execution.

Below is the revamped design of new VTS.




Virtual Table Server Admin

Differences between old VTS and new VTS
Old VTS was a windows based application. New VTS is a web based application. By default, it can been accessed using http://localhost:4000, since it is a web based, we can access it remotely and it support IE, Chrome, and Firefox browsers. It runs as windows service; during start up it will automatically starts. Basic authentication and https can be enabled to access remotely.

Old VTS utilizes memory, sometime it might crash. But in new VTS, it is disk oriented using NoSQL data engine which enables high throughput.
You need to include #include “vts2.h” statement and some manual work needs to be done like loading DLL file in each load generator machine. But in new VTS, no need to include the statement and loading DLL files.

  • New VTS has been integrated to run logic where we can control the execution. Old VTS doesn’t have such integration.
  • New VTS is now available for Linux Load generators as well.
  • New VTS now supports Unicode.
  • Data size also increased. HP has tested up to 10 million rows of data. Performance is consistent.
  • Old VTS was not supported by HP. But HP fully supports VTS.
[sociallocker][/sociallocker]

How to install/upgrade new VTS?

Install HP LoadRunner 11.52 in all machines including load generators
Install VTS on a server machine
After installation, by default VTS can be accessed using 4000 port, which can be changed.
Navigate to http://localhost:4000
On the console UI, you can import your data using SQL query or by CSV file as shown below



Virtual Table Server – Import from database
Create a C language script as shown below:

int rc = 0;
char *VtsServer = "192.168.0.100";
int nPort = 8888;

PVCI2 pvci = 0;

vuser_init()
{

pvci = lrvtc_connect(VtsServer,nPort,VTOPT_KEEP_ALIVE);
lr_log_message("pvci=%d\n", pvci);

return 0;
}

In Action.c, add some code to retrieve one column from the server and remove from the server at the same time. You can run the action multiple iterations, and it will retrieve one:

char * cname; //column name
int ret;

RetrieveMessage()
{
lr_start_transaction("retrieve_column");
rc = lrvtc_retrieve_messages1("cname",";");
lr_log_message("lrvtc_retrieve_messages1 rc=%d\n", rc);
lr_log_message("cname is %s", lr_eval_string("{cname}"));
lr_end_transaction("retrieve_column", LR_AUTO);
}

Action()
{
RetrieveMessage();
return 0;
}

In vuser_end.c, add API call to close the VTS handle:

vuser_end()
{
lrvtc_disconnect();
return 0;
}

  • You can test it in VuGen and then run it in Controller.
  • Turn on the API access port before you execute the script.
  • Like the old VTS, the new one uses 8888 as the port for API to access.
  • It is turned off by default, Navigate to the administrative UI to enable it.

1 comment:

Jagan said...


We are facing issue in using the VTS latest version. Our script first uploads data into VTS server and then later they retrive by quering. We are able to perform upload of data using vugen, however when we try to query a column/row data we are getting vtsCustom.h(31): Error: vtc_query_column: Server error -

@ line {vtc_query_column(pvci, cQueryColumn, nRandNum, &cColData);}

This was working well with the old version of VTS. To make this work for the new version we have updated PVCI to PVCI2 and stopped loading the vtclient.dll file. We haven't used VTCERR in our script anywhere, hence didnt have chance to modify them. But when column query is called we believe this refers to VTCERR because of which we are getting the server error, how can we make sure that it refers to VRCERR2. Which file should be modified exactly to make this happen.