Posts Tagged LoadRunner
How to Change the TimeOut on LoadRunner
Posted by Martin in Performance on February 25th, 2010
I’m seeing a lot of searches for Timeout issues landing on the blog these days.
This is a very common issue when executing a scenario, meaning basically that the server has not responded in a specified amount of time. LoadRunner defaults to 120 seconds on all Web based protocols (HTTP, WebServices, Click & Script), but this can be easily changed using a command on the begging of the script, web_set_timeout.
The command have only two parameters, the operation and the new value. The operation can be one of these three:
- CONNECT: To establish the connection to the Web server.
- RECEIVE: Time–out on the next “portion” of server response to arrive.
- STEP: Time–out on each VuGen step.
Usually the one we see expiring the most is STEP, for obvious reasons. The error message should look something like “Step Download Timeout”.
The second parameter is the new value, expressed in seconds. So if we want to set up a new value for STEP we have to insert this code in the beginning of our action:
web_set_timeout("STEP","240");
Being 240 seconds our new value.
Usually I change the timeout value of all three operations, just to be sure:
web_set_timeout("STEP","240");
web_set_timeout("CONNECT","240");
web_set_timeout("RECEIVE","240");
Simple, isn’t it??
We just have to be careful when changing this configuration, because the default value is already too high for most user actions.
From my point of view, this should only be used in two cases:
- When we really expect a transaction to be slow, like a large report or file upload, something that the users already expect to be slow;
- Also when we need to troubleshoot a slow transaction, meaning, waiting for a longer period to get the response.
That’s it!!
Configuring WebLogic JMX on LoadRunner Controller
Posted by Martin in Performance on February 4th, 2010
Here is a tip shared by my friend Daisy:
The WebLogic SNMP monitor is enable in the Controller as default. If you need to monitor Weblogic JMX, you have 2 options:
- Use the SiteScope as a monitoring tool instead of Controller;
- Enable the Weblogic JMX monitor into Controller.
- To do this you will have to configure online_resource_graphs.rmd file – located under <LoadRunner DIR>\dat\online_graphs: update the EnableInUi param of the relevant monitor (i.e. for WebLogic (JMX): search for the [WebLogicJMX] section and update its EnableInUi param).
- Also, you might need to install java jdk on Controller (I didn’t have chance to test it):
WebLogic Monitor Requirements and Setup
Requirements
- JDK 1.4 on controller
- Permissions on WebLogic MBeans.
Setup on Controller
- After JDK installation Copy weblogic.jar from the lib folder of WebLogic Server to LoadRunner root\classes.
- Remove jmxri.jar from LoadRunner root \classes.
- Specify the path in the LoadRunner root folder\dat\monitors\WebLogicMon.ini file. Edit the JVM entry in the [WebLogicMon] section. For example: JVM=”E:\Program Files\JavaSoft\JRE\1.4\bin\javaw.exe
- Edit the JavaVersion entry in the [WebLogicMon] section.
Set permissions on WebLogic
- Open the WebLogic console (http://<host:port>/console).
- In the tree on the left, select Security > Realms > myrealm > Users, and click Configure a new User… in the screen on the right. The Create User: General tab opens.
- In the Name box, type weblogic.admin.mbean, enter a password, confirm the password, and then click Apply.
- In the Groups tab, enter the name of any user or group you want to use for monitoring, and then click Apply.
How to Obtain an ICA File Through Citrix Web Interface 4.5 and 4.6
Posted by Martin in Performance on October 8th, 2009
You might be thinking why I’m publishing this here or why do I need a Citrix ICA file. For now I’ll just say that this is an important first step towards performance testing Citrix applications. The full article is not ready yet, but I thought it would be useful to reproduce this information here first, in case the source goes down.
Summary
This article describes how to obtain an ICA file through Citrix Web Interface 4.5 and Web Interface 4.6.
Background
In Web Interface versions earlier than 4.5, you can obtain the ICA file contents using Internet Explorer by using the Save Target As… option when using a link in the applications page (or a similar operation in other Web browsers). When using Web Interface 4.5 or later, this operation no longer results in the ICA file being downloaded.
Procedure
For Web Interface 4.5:
Complete the following procedure:
When using an unsecured transport mechanism (HTTP):
Change the file type association property. To do so:
- Open Windows Explorer.
- From the Tools menu, click Folder options…
- Select the File Types tab.
- Select the ICA / Citrix ICA Client extension.
- Click Advanced and select the Confirm open after download check box.
- Click OK and then click Close.
Once this is done, each time the application launch is attempted (by clicking the application launch link), a dialogue displays asking if you want to open or save the ICA file. Clicking Open launches the application. Clicking Save allows you to save the ICA file to the desired location.
When using a secure transport mechanism (HTTPS) with Internet Explorer:
When using a secure transport mechanism, the ActiveX control (ICO) is used to launch the application (this does not involve saving the ICA file), hence the file cannot be saved. However, changing some settings in Internet Explorer can modify this behaviour so that the ICA file is downloaded. To do this, configure Internet Explorer so that it does not trust the ActiveX control and therefore reverts to downloading the ICA file. Use the following procedure:
-
- Go to Tools > Internet Options from the Internet Explorer menu.
- Select the Security tab.
- Click the Custom level… button to display the Security Settings dialog.
- Ensure that File download is set to Enabled in the Downloads section.
- If the site is currently in the Trusted sites or Local intranet zone list, remove it (the site should be displayed in the Internet zone).
- If you are using an operating system that has the Enhanced Internet Explorer Security Configuration enabled, this feature must be disabled (go to the Control Panel > Add or Remove Programs > Add/Remove Windows Components section).
- Adjust the settings so that Internet Explorer can download files using the following procedure:
Once these changes have been made, follow the same operations as described in the HTTP section above.
For Web Interface 4.6:
- Use a Firefox browser to enumerate the application icons. Right-Click and save the file to the desired location.
- Edit the saved file in Notepad. Remove the “RemoveICAFile=yes” line so that the ICA file is not deleted from the desired location when the application is accessed.
-Or-
- Use Web Interface 4.2 or an earlier version to create the desired ICA file.
- Edit the saved file in Notepad. Remove the “RemoveICAFile=yes” line so that the ICA file is not deleted from the desired location when the application is accessed.
-Or-
If the server farm only contains Presentation Server 4.5 servers, use the Presentation Server Console from Presentation Server 4.0 (Note: Do not use this console to make other changes) and use the built-in feature to create the ICA file by right-clicking the published application. Else, use the Presentation Server Console as normal.
-Or-
Use Internet Explorer 6 or 7 (if asked to save as .aspx, save as .ica) and ensure the Web Interface site is accessed via the internet zone (e.g. by IP address or FQDN)
Using WSDL files to Create WebService Scripts
Posted by Martin in Performance on September 3rd, 2009
Hello Folks,
Today I’m here to show you how to use one of the easiest scripting protocols on LoadRunner, WebService. Being simple doesn’t mean that the protocol it’s not powerful. A lot of large enterprise applications and web portals use WebServices on the back office processes.
There are several ways of scripting this king of application, but today I’ll show how to use .NET WSDL files to create a simple script. Instead of pasting several images on the post I thought it would be more productive to record a screen cast. So here it is, the first video guide of this blog:
The steps are very simple, not much to be done!
- Create a new single protocol script using the Web Service protocol.
- Click on the “Manage Services” button on the top left corner.
- Click on the “Import” button.
- Select URL and then paste your WSDL file URL Remember that it should include the “?WSDL” string at the end.
- Click on the “Import” button and then OK.
- Back to the script view, click on the “Add Service Call” button.
- Select the service you just added on the “Service” drop down list.
- Select the call you want to add on the “Operation” drop down list.
- At this point, you will see a list of parameters (Input and Output) on the middle box.
- The Input parameters are the parameters you will use on your request. On the opposite way, Output parameters are the parameters returned by the server.
- Some input parameters are required and some are optional. You will notice the difference on the “Include argument in call” checkbox.
- The required parameters have this checkbox disabled.
- With this checkbox you can add optional parameters to the request.
- You can also set the values you’ll be sending by filling the “Value” text box.
- You can save the returned parameters by selecting the desired parameter under “Output Arguments” and selecting the “Save returned value in parameter” checkbox.
- Once you’re done with the arguments selection, click on the OK button. This will add the request to the script.
- Once the code is created, you can replace parameters, add static arguments and all sorts of things that can only be done in LoadRunner.
- Returned values will be saved on the selected parameters to be used later, in case you have more than once call per script (sequential steps).
That’s It! On the next guide I plan to show you how to create WebService scripts using application trace files.
See you next time!
Creating Oracle 12 Scripts on LoadRunner
Posted by Martin in Performance on August 31st, 2009
After receiving several questions about the new Oracle 11 protocol on LoadRunner and the version 12 of the E-Business suite, I thought it would interesting to give a few tips about these technologies too.
Oracle Web Applications 11i is the new protocol used by the newer LoadRunner versions to script the E-Business suite. The advantage of it is that you can use a single protocol to script the application instead of using the multi-protocol approach. This can be useful if your license is limited or you don’t want to spend more money on protocols that you don’t have. Another advantage is that this protocol can be used to script the newer version of the E-Business suite, 12.
Tip 1: Correlating the Login
After recording your basic script, the first thing you will have to correlate on the Login is the ICX ticket.
In order to do do this, you will have to add this command right before clicking on the functionality link:
web_reg_save_param("ICX",
"LB=var xgv15 \= \"",
"RB=\"\n",
"Search=Body",
LAST);
Eg.: If you accessing the “Submit Processes and Reports” functionality for example, you will have to add this code right before the “web_text_link(“Submit Processes and Reports”…” line.
This parameter will be used later on the “nca_connect_server” and “frmservlet” requests. On both requests, look for the “icx_ticket=” part of the URL and replace the code to your parameter ({ICX})
You will also need to correlate another session parameter that sometimes is not correlated automatically and sometimes is wrongly correlated when you’re recording the script.
Look for the “web_url(“frmservlet”…” line mentioned above and add the following block BEFORE it:
web_reg_save_param("Jsession",
"LB=/forms/lservlet;jsessionid\=",
"RB=",
"Search=Noresource",
LAST);
This will create the “Jsession” parameter that will be used on another call before the “nca_connect_server” call.
Look for a line that starts with “web_url(“lservlet;jsessionid=” and replace on the URL parameter the large string that comes after “/lservlet;jsessionid=” with your parameter. Remember, do not replace the large session string on the title (first parameter), but on the URL parameter. Eg.:
web_url("lservlet;jsessionid=5ce9bad22e40aa7f7f9c4cff2549fc09a968476354cb39d14a0bd8636339170b.e38NaN0ObNiKai0LbNiSchaRaNaMe0",
"URL=http://<you_application_server>/forms/lservlet;jsessionid={Jsession}?ifcmd=getinfo&ifhost=XXX&ifip=10.10.10.10",
To summarize things you will have to do 5 things.
- Capture the ICX paramter
- Replace the ICX parameter on the frmservlet call
- Replace the ICX parameter on the nca_connect_server request
- Capture the Jsession paramter
- Replace the Jsession parameter on the lservlet;jsessionid= call
This should also work if you’re scripting against an Oracle 11 application with the new LoadRunner protocol.
And remember, this has worked for me, but may not work for you depending on how your application was deployed and configured.
Tip 2: Recording Sessions with HTTPS (SSL)
Your application may be configured to use SSL (HTTPS connections). If this is your case, you probably won’t be able to record your scripts directly since LoadRunner is not able to identify which server you’re connecting to.
To solve this issue you will have to manually add your application server address and port before recording.
Click on the “Options” button on the lower left corner of the recording window (before you start recording).
Select “Network > Port Mapping” on the left side pane and click on the “New Entry” button. This screen should be presented:
Target Server and Port are respectively your application server address and port. Service you can leave as “Auto Detect”. Record Type you can leave as “Proxy”. Set Connection type to “Auto”.
This will enable the SSL Versions and SSL Cyphers fields. With this fields you will have to check with your application administrator or spend some time “guessing” the correct configuration.
Click on Update and start recording the script. If everything was set correctly, LoadRunner should be recording your actions inside the application as usual.


