August 24th, 2010
If you need to run a Unix command on a remote server with a LoadRunner script (running on Windows), then there is a neat program called plink that you will find very useful.
If you use any variety of Unix, you will probably already by using PuTTY; well plink is is distributed with PuTTY, and allows you to run remote Unix commands from your DOS prompt.
In this example, I have used it to collect disk I/O metrics from a remote Solaris server.
Read the rest of this entry »
Posted in LoadRunner | 2 Comments »
August 23rd, 2010
Everyone should already know that you can run a command-line program from a LoadRunner script using the system() function. If you have used this, you would already know that things become a little awkward when need to capture the output of the program.
The common solution is to pipe the output of the command to a file (i.e. system(“my_command > output_file.txt”)), and then read the contents of the file. This is clunky and awkward, and not safe when multiple virtual users are writing to the same file.
A much better solution is to run all your command-line (DOS) programs using the popen() function. Read on for examples…
Read the rest of this entry »
Posted in LoadRunner | 3 Comments »
August 15th, 2010
I had always wanted to work at a company that had a library of intereresting/educational books I could borrow; so when I started at JDS Australia in late 2005, I brought in a few of my technical books in case anyone else wanted to borrow them. Gradually other people brought in books too, until there was quite a nice collection.
I like to think that consultants who have read Death March and The Mythical Man Month will be a little wiser than their brethren who have just flicked through Learn x in 24 Hours. The lives of technical people will definitely be more pleasant if they have a manager who has read Peopleware, and everyone will be kept busy if the sales guys have read and applied Influence: The Psychology of Persuasion.
So, for the greater good (or something), I am throwing open the (metaphorical) doors of my personal library to people who don’t work at JDS. If you know me and would like to borrow any of the books listed below, please let me know.
Read the rest of this entry »
Posted in General | 2 Comments »
July 29th, 2010
On increasingly rare occasions, you might be required to load test an application that has a Java-based client. While it’s nice for users to have an application that has a rich GUI, it will probably lead to a world of pain for you as a performance tester.
Don’t immediately reach for LoadRunner’s Java Record-Replay virtual user type. It might not be the right solution.

This article will guide you through your first steps when selecting the correct vuser type to test an application with a Java-based client…
Read the rest of this entry »
Posted in LoadRunner | No Comments »
July 25th, 2010
I like posting LoadRunner code snippets on My Load Test and, judging by the emails and comments that I get, a lot of people find them really useful. To make my code more readable, I have added syntax highlighting that uses the same colours you see in VuGen. If you would like to download a copy of the syntax highlighting code to use on your own blog or forum, or you would like to learn more about how I did it, read on…
Read the rest of this entry »
Posted in LoadRunner | 6 Comments »
June 29th, 2010
I just got back from the US after presenting at HP Software Universe 2010. I will save the content of my presentation for another time, so this is a quick overview of what I saw at the Conference and some of the things I learned from the people who attended.

Read the rest of this entry »
Posted in General | 1 Comment »
February 28th, 2010
On Tuesday March 2nd, I will be presenting on “The Non-Functional Requirements Every Project Forgets” at the ANZTB 2010 testing conference in Melbourne, Australia. Please come and say “hi”.

Read the rest of this entry »
Posted in General | No Comments »
December 28th, 2007
Subject: HTML return value
Hi Stu, you probably know the answer,
what I need to know if there is an option in Vugen to run a url and to save the url content to a string, something like XML apis in Vugen.
Later I can parse the string to see if I got the right value.
There is surely an add-on to web_url to save the return value to a string.
and I need to save it as a variable in Vugen and not writing it to a file.
Tell me if you know if it achievable.
Thanks
Txxxx
Here is some example code…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| // save headers to a parameter
web_save_header(REQUEST, "ParamRequestHeader");
web_save_header(RESPONSE, "ParamResponseHeader");
// save entire body to a parameter
web_set_max_html_param_len("262144"); // default max length is 256 characters
web_reg_save_param("ParamResponseBody", "LB=", "RB=", "Search=Body", LAST);
// check that page contains expected value
web_reg_find("Text=Google", LAST);
web_url("Google",
"URL=http://www.google.com.au/",
"TargetFrame=Main",
"Resource=0",
"RecContentType=text/html",
"Snapshot=t3.inf",
"Mode=HTTP", // If this is HTML, then ParamResponseBody will contain the most recently downloaded item on the page (eg/ a GIF).
LAST); // but note that this means that the resources referenced on the page will not be downloaded.
// An easier way to do this is to define a left and right boundary around the item that you want to check.
lr_output_message("# Request Header:\n %s", lr_eval_string("{ParamRequestHeader}"));
lr_output_message("# Response Header:\n %s", lr_eval_string("{ParamResponseHeader}"));
lr_output_message("# Response Body:\n %s", lr_eval_string("{ParamResponseBody}")); |
thanks stu, look promising, my HTML return code going to be in XML format so I will probably going to use XML api to find a specific values.
Thanks
Txxxx
If you are using this with web services, you just need to use…
1
2
3
| // save entire body to a parameter
web_set_max_html_param_len("262144"); // default max length is 256 characters
web_reg_save_param("ParamResponseBody", "LB=", "RB=", "Search=Body", LAST); |
…then you can use the lr_xml functions to extract values from the parameter containing the SOAP body.
Tags: SOAP, VuGen, web service, web vuser
Posted in Questions | 5 Comments »
December 28th, 2007
Subject: Help wanted in SAP with LR..
Hey Stuart,
I Guess u have got good experience in LR with SAP…
I got into a problem in my work place.. hope u can figure it out.. pelase let me know if u have a solution for his..
I created a Script for R/3, ( Order to Cash ) which will have 10 materials in a single transaction..
When i run the script with 1 Iteration, it is successfull.
But when i run it with 2 Iterations,, its bouncing from the program..
This happens even in Controller…
So please let me know if there is a solution for this..
Vxxxxx.
You need to make sure that the Action part of your script starts and ends in the same place (and with the same state) in your application.
If the screen is different on the second iteration, your script will probably fail.
Note that sometimes the screen looks the same, but object references are different. You can check this by recording two iterations of your business process in a single script and comparing iteration 1 with iteration 2 (including the object IDs).
Hey Stuart,
What you said was absolutely right..
We resolved the issue by adding a set focus function in the loop..so that on each and every iteration, it comes back to the focus..
Thanks a lot!
Tags: SAP, SAPGUI, VuGen
Posted in Questions | 6 Comments »
December 28th, 2007
I frequently receive emails with LoadRunner-related questions. I try to reply to questions when I have time. Maybe posting my answers to MyLoadTest will be an incentive for me to answer more questions, and maybe it will save other people some time.
Subject: Sending email from loadrunner script
Hi Stuart,
We would like to run a LoadRunner script (HTTP WEB Protocol) which will send an email to the user whenever the transaction response time for web page is more than the specified time, or when the application is down for some reason. Basically we would like to monitor the application continuously. How can we achieve this using LoadRunner? Or can you suggest the best solution for monitoring application which would send email notifications to the monitoring team.
Thanks,
Rxxx
The best solution for monitoring a web application’s availability and performance is going to be HP Business Availability Center (BAC). BAC has a component called Business Process Monitor (BPM). BPMs are VuGen scripts that create synthetic transactions against your application. BAC handles the alerting, collection of historical data, and dashboard functionality.
Read the rest of this entry »
Tags: alerting, BPM, monitoring, VuGen
Posted in Questions | 2 Comments »