First update to LoadRunner 11.50

When I launched LoadRunner to continue my investigations of the new version this morning, I was prompted with an automatic upgrade dialogue box. I’m really pleased that HP has decided to continue with automatic updates for LoadRunner which I first observed with LoadRunner 11.0 (Patch 4).

LoadRunner 11.5 Automatic Update to Patch 1
The update for LoadRunner 11.5 took about 7 minutes after the initial download of the update patch and took my version number from 11.50.2216.0 to 11.50.2552.0.

LoadRunner 11.5.2216.0 to 11.50.2252.0

Updated LoadRunner Date/Time sample script

A couple of days ago, I read Scott Moore’s interesting article about using multipliers to increment LoadRunner date/time variables by multiples of more than one day.

This made me look at my own date/time sample script, mentioned in an earlier post, and incorporate Scott’s suggestions in there. I added some sample code to check to see what day it was and calculate the number of days until next Monday.

Next Monday LoadRunner

Click the icon below to download the script containing this code together with other examples of date/time manipulation in LoadRunner.
zip
DateTimeSamples

 

For those of you who like to see “code” in posts, here is the “Next Monday” code in full…

//What date is next Monday?
lr_save_datetime(“%A”, DATE_NOW, “Today”);

if (strcmp (lr_eval_string(“{Today}”),”Monday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*7), “DDMMYY”);
lr_output_message(“Today is Monday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Tuesday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*6), “DDMMYY”);
lr_output_message(“Today is Tuesday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Wednesday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*5), “DDMMYY”);
lr_output_message(“Today is Wednesday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Thursday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*4), “DDMMYY”);
lr_output_message(“Today is Thursday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Friday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*3), “DDMMYY”);
lr_output_message(“Today is Friday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Saturday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*2), “DDMMYY”);
lr_output_message(“Today is Saturday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}
if (strcmp (lr_eval_string(“{Today}”),”Sunday”)==0)
{
lr_save_datetime(“%d/%m/%y”, DATE_NOW+(ONE_DAY*1), “DDMMYY”);
lr_output_message(“Today is Sunday, next Monday’s Date is %s”,lr_eval_string(“{DDMMYY}”));
}

 

 

New GESHI syntax highlighter for LoadRunner 11.5

In August 2010, I put Stuart Moncrieff’s syntax highlighter on my website so that I could easily copy and past LoadRunner code into documents in the correct colours. Since LoadRunner 11.5 was released with a new compiler and different colours in the script editor, I thought that it was time for an update.

The links below take you to the old and new GeSHi pages which format text in LR 9.x and LR 11.x colours.

http://bish.co.uk/geshi/LR_9_5.php
LoadRunner 9.5 script editor colours

http://bish.co.uk/geshi/LR_11_5.php
LoadRunner 11.5 script editor colours

 

Whilst this may be useful to you, you may also be pleased to know that the new editor supports pasting directly from VUGen into Word or other programs and the source formatting is preserved. This is great if you want to insert code snippets into documents and keep the code readable.