Paramterize transaction names in a Web HTTP/HTML script

Sample Script is given below :

Action()
{

int status;

lr_output_message ("Now connecting to server %s", lr_eval_string("{Servername}"));

lr_start_transaction(lr_eval_string("Trans1_{Servername}"));

status=0;

lr_think_time(5);

/* End transaction with operation result – pass or fail */

if (status == 0)

lr_end_transaction(lr_eval_string("Trans1_{Servername}"), LR_PASS);

else

lr_end_transaction(lr_eval_string("Trans1_{Servername}"), LR_FAIL);

lr_start_transaction(lr_eval_string("Trans2_{Servername}"));

status=1;

lr_think_time(10);

/* End transaction with operation result – pass or fail */

if (status == 0)

lr_end_transaction(lr_eval_string("Trans2_{Servername}"), LR_PASS);

else

lr_end_transaction(lr_eval_string("Trans2_{Servername}"), LR_FAIL);

return 0;
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s