LoadRunner and Performance Center
Showing results for 
Search instead for 
Do you mean 

Converting TruClient scripts to Web-protocol scripts in LoadRunner 12.0

Anonymous_User1 ‎04-08-2014 10:00 AM - edited ‎09-22-2015 01:44 PM

(This post was written by Yang Luo (Kert), from the LoadRunner R&D Team)


HP LoadRunner provides two solutions for load testing over the Web: the transport-based Web HTTP/HTML protocol, and the TruClient protocol. The difference between them is that the transport-based protocol simulates client requests at the network level while TruClient involves an actual browser engine.


In LoadRunner 12.00, a new feature, ‘TruClient to Web’, has been introduced to provide more flexibility. This feature can generate a web transport script from an existing TruClient script (either TruClient Firefox or TruClient IE). The generated web transport script contains the same business process as the original TruClient script, and at the same time most of the TruClient metadata, such as logs, comments, transactions and code structures, is also converted to the equivalent Web HTTP script elements.


Here are some reasons why you might want to convert a TruClient script to a Web HTTP/HTML script:

  • You want to test a business process with low to moderate load, so you record a TruClient script.  When you want to scale the same business process up to significantly higher workloads, you’ll need to convert the TruClient script to the Web HTTP/HTML protocol which is more efficient at running the virtual users.
  • You want the efficiency of a Web HTTP/HTML script, but you love TruClient’s user-friendly recording experience, so you can record it on TruClient and then convert it to the Web HTTP/HTML protocol.  As a bonus, you also get useful metadata recorded by TruClient, such as comments about GUI-events that aren’t recorded by the Web protocol.
  • You want to run a large number of virtual users exercising the same business process, but you want to drive some of them through the GUI to monitor end-user experience.  Typically, you’d record the business process in TruClient, and then convert it to the Web HTTP/HTML protocol.  You would then run most of the virtual users as Web Protocol virtual users, with the rest of the virtual users running the original TruClient script.

This conversion feature is very easy to use. Just open a TruClient script (either TruClient Firefox or TruClient IE script), and click on the ‘Convert’ button highlighted below:


A dialog will open, prompting you for some information. Here you can name the new script, specify the directory, and change the web script recording option properties by clicking the “Options” link (in the same way that you would modify them before recording a new Web HTTP script or regenerating an existing one). When the configuration is completed, click on the “Convert” button in the dialog: 


The conversion process will begin. As it progresses, the TruClient script is replayed on the screen. Meanwhile, a progress bar is displayed. When the TruClient script finishes being replayed, you will see the familiar web code generation progress bar, and a new web script will be added to the current solution in no time at all:



If you go through the new web script, you will find that it contains the same business process as the original TruClient script. Besides the web access APIs, the following information is also carried over to the new script:



In a recorded Web HTTP script there are often dozens or hundreds of requests, some of them initiated by user, others by the browser, making it difficult to understand which script lines correspond to which user actions. Logs from the TruClient script (ie. JavaScript calls to LR.log) will be converted to calls to lr_output_message to help you understand what’s going on:



Defining parameters and value lists is an important part of script development, and requires some time to configure. When the TruClient script is converted, any parameters and value lists that you created are automatically converted for you:


  • LR.advanceParam calls will be converted to lr_advance_param calls.
  • LR.setParam calls will be converted to lr_set_param calls.
  • For LR.getParam calls, the web script will use {paramName} directly, and an appropriate comment will be generated.
  • The parameter file (param.dat) will be copied to the new script:



The same transaction APIs will be generated in the web script, surrounding the web steps representing the equivalent business flow:



The same comments will be generated in the web script:


Think Time

TruClient wait steps will be converted to lr_think_time calls (when the interval is longer than the threshold in the options):


Organization of Actions

  • TruClient steps in Script_View_Init will be converted to the vuser_init action.
  • TruClient steps in Script_View_Action will be converted to the Action file.
  • TruClient steps in Script_View_End will be converted to the vuser_end action:



User Data Points

Calls to LR.userDataPoint in the TruClient script will be converted to lr_user_data_point calls:




Text Verification 

 Text verifications will be converted to calls to web_reg_find in web protocol.

  • In the TruClient script, text verification follows the step which should be verified; in the web script, web_reg_find is called before the request that is to be verified.
  • Not all verifications in TruClient can be converted (such as some operators, or scope attribute)  


Virtual User Status Message Information

LR.vuserStatusMessage steps in TruClient script will be converted to lr_vuser_status_message calls:


GUI Events

GUI-only events in the TruClient script will be converted to comments:



Run-Time Settings

Run-Time Settings will be copied to the new script if there are equivalent settings in the web protocol:



Some notes about the converted script

  • The generated script is a starting point, but you still need to perform some enhancements to make it pass the replay. For example, the amount of effort for  correlation in the new script will be same as a “native” web script.
  • TruClient scripts execute JavaScript code during replay. But because the web protocol can’t run JavaScript code, some functionality could be broken.
  • Before conversion, make sure your system proxy is configured properly so that the TruClient script can successfully replay.



We hope you found this article useful.  Let us know by leaving a comment in the box below.


You can download LoadRunner here.



Thanks to Kert for providing this article!


About the Author


on ‎04-08-2014 04:32 PM

Very cool!  I'm looking forward to trying this.  


There have been several times over the years that I'd considered creating QTP driven vugen http script creation.  


Rather than create such a monstrosity I always decided repeatedly rerecording was probably easier.  Thankfully it doesn't look like I'll ever have to create that kind of solution because of TC2Web.  


This looks great, thanks!

on ‎04-09-2014 02:56 AM

nice post. thanks for the heads up. does protocol bundle of 11.5 same as 12?

on ‎06-19-2014 11:24 AM

Cool Feature !! .. We start playing around... 

Nice to see HP listen  to customer feedback , ready to go out of the box, and try different method, process  to enhance the tool that helps the performance testing process faster and reliable  in the Software Development  Life Cycle.

 Kudos to HP R&D team to make this happen.   Looking forward to have more such user-friendly features added in near future…


Thank You,


Dhondi Kranti
on ‎07-01-2014 02:19 AM



Good feature for running high volume of users.


My question is will the correlation of web protocols will also be done automatically when trueclient is converted to web script or how are we going to handle it.





on ‎07-28-2014 11:52 AM



Should be possible recording truclient with chrome browser engine on the new version?, some of the applications that we tested use chrome browser.

Also, what is the actual version of mozilla firefox in truclient on vugen v12?,



Cristal Dena

on ‎09-24-2014 01:31 AM

Hi, Thanks for this wonderful Protocol.


I am using Loadrunner 11.52, Will i be able to "convert" the script from TruClient protocol to Webprotocol ?


Coz, I don't see the Convert option in LR 11.52 VUgen.


Appreciate ur help !

on ‎04-24-2015 07:56 AM




  I have Vugen 12 on machine , I tried to convert true client to web , but i was able to convert only login page , other pages were not converting.


  Do I need to change any settings to capture all these pages?





Koushik A
on ‎06-30-2015 12:55 AM



I am trying to convert my script from Truclient to HTTP/HTMl, but I'm geeting error POP-UP as "Operation Failed"  "Object refernce not set to an instanse of an object".


Please help giude me through the issue.



Koushik Arvapelli

Piyush Singh
on ‎03-04-2016 12:57 AM

Hello Everyone,

I have recorded a script using trueclient-web protocol in Loadrunner 12.50, The applicaiton i recorded uses proxy to connect with server.

Now i have provided the same proxy setting in trueclient general settings-->Browser settings. script recorded successfully.


But when i tried to convert the recorded trueclient script into web- HTTP/HTML script, it launches a browser for replay while script regeration and nothing got generated. Since in the brower (launched at the time of regenration) i have got error as firefox uses proxy same as system proxy and unable to connect proxy server.


So any help? where can i change this setting.

I did change proxy settings in trueclient, And in the browser manually.



on ‎05-27-2016 03:22 AM


I have recoreded a script using TruClient-web protocol in LR 12.50. When I try converting it to Web script, I see only the transaction names in the converted script. Tried in both Socket and Winlet level.


    /*2.6: Move mouse over My Workspace listitem*/

    /*2.7: Move mouse over CGPBIS listitem*/

    /*3: Click on CGPB View Member link*/


Kindly help to resolve my issue.

Youga hari hara suthan ayyappa sabbisetty
on ‎07-17-2016 07:14 PM

Hi Everyone,

I tried to convert the script, but i am getting error page "page can't be displayed" Do I need to foucs on any settings ?

27 Feb - 2 March 2017
Barcelona | Fira Gran Via
Mobile World Congress 2017
Hewlett Packard Enterprise at Mobile World Congress 2017, Barcelona | Fira Gran Via Location: Hall 3, Booth 3E11
Read more
Each Month in 2017
Software Expert Days - 2017
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all