Highlighted
Super Contributor.
Super Contributor.
628 views

How to read current version of vUGen/LoadGenerator

Jump to solution

Hi all,

since working with script templates i have to decide, if a vUser-Script runs in Version 12.60 or below.

Is there a way to get the current version in a C script to evaluate like:

if(lrVersion < 12.60)
{
	lrvtc_connect_ex(strConnection,LAST);
}
else
{
	iRC = lrvtc_connect(strVTSServerName, iVTSServerPort, VTOPT_KEEP_ALIVE);
}

Any suggestions?

Thanks in advance, Christoph

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.
Trusted Contributor.

Hi Cristoph,

 

The version on the current installation can be seen in a text file in the installation directory, that can be parsed.

The file is called "version.txt", and for Loadrunner it is found at:

- For IE: C:\Program Files (x86)\HPE\LoadRunner\dat\WebIE\RRE\content\version.txt

- For Chrome: C:\Program Files (x86)\HPE\LoadRunner\dat\TCChrome\Extension\RRE\content\version.txt

- For Firefox: C:\Program Files (x86)\HPE\LoadRunner\dat\FFProfile\extensions\TruClient@hpe.com\RRE\content\version.txt

 

The file can be parsed using simple I/O and inside you will find a simple one line string that shows the version, in a string for example:

12.55.1333.0

 

Additionally, you can mention the installation path dynamically using system variables.

For Loadrunner installation it is called %LR_PATH%

For Standalone installation it should be called %VUGEN_PATH%

For LG's it is called %LG_PATH%

Any can be used.

 

So, the following should work:

%LG_PATH%\dat\WebIE\RRE\content\version.txt 

Then that file can be opened in an "Execute C" step, and the version string can be parsed.

 

Let me know if you need further help on this.

 

Lup.

 

View solution in original post

0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Oops, Typo in Code.

I mean:

if(lrVersion < 12.60)
{
	iRC = lrvtc_connect(strVTSServerName, iVTSServerPort, VTOPT_KEEP_ALIVE);
}
else
{
	lrvtc_connect_ex(strConnection,LAST);
}
0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Hi Cristoph,

 

The version on the current installation can be seen in a text file in the installation directory, that can be parsed.

The file is called "version.txt", and for Loadrunner it is found at:

- For IE: C:\Program Files (x86)\HPE\LoadRunner\dat\WebIE\RRE\content\version.txt

- For Chrome: C:\Program Files (x86)\HPE\LoadRunner\dat\TCChrome\Extension\RRE\content\version.txt

- For Firefox: C:\Program Files (x86)\HPE\LoadRunner\dat\FFProfile\extensions\TruClient@hpe.com\RRE\content\version.txt

 

The file can be parsed using simple I/O and inside you will find a simple one line string that shows the version, in a string for example:

12.55.1333.0

 

Additionally, you can mention the installation path dynamically using system variables.

For Loadrunner installation it is called %LR_PATH%

For Standalone installation it should be called %VUGEN_PATH%

For LG's it is called %LG_PATH%

Any can be used.

 

So, the following should work:

%LG_PATH%\dat\WebIE\RRE\content\version.txt 

Then that file can be opened in an "Execute C" step, and the version string can be parsed.

 

Let me know if you need further help on this.

 

Lup.

 

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Hi Lup,

I apologize for my late reply.
Checking the mentioned files seems to be a viable option. Currently I'm creating a piece of code that reads these files and compares them to the desired version.

Many thanks for the support
Christoph

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.