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;
}

READ  Quality Center Server logs are not created anymore

Leave a Comment