Thursday 7 December 2017

Add Parameter Name in the Transaction Name

It was just a case of using  lr_eval_string in the call to the transaction wrapper.


1. lr_start_transaction(lr_eval_string("Do something {piteration}"));
......................................

lr_end_transaction(lr_eval_string("Do something {pIteration}"),LR_AUTO);



you have to be careful above to make sure that start and end transactions names are the same. To overcome that problem I created a string variable to hold loadrunner transaction name.


char sTranName[20];
........

sprint(sTranName,lr_eval_string("TransactionA_{pIteration}"));

 lr_start_transaction(sTranName);
...........................

lr_end_transaction(sTranName,LR_AUTO);

 

No comments:

Post a Comment