Highlighted
Absent Member.
Absent Member.
147 views

How to parse parameter values to the Transaction Names

Jump to solution
Hi,

I want to parse the parameter values to the transaction names, so for every iteration I can obtain the transaction time for specific paramater supplied?

I am trying this code, but no success:

char *qrytime, *newqry;

qrytime = lr_eval_string "{Run_Query}" );

lr_save_string(qrytime,"newqry");


lr_start_transaction("{newqry}");

////////////////////////

lr_end_transaction("{newqry}",LR_AUTO);


Any comments???
Email any Performance related queries, will do my BEST!
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to parse parameter values to the Transaction Names

Jump to solution
Look at this document:

http://www.sqa.its.state.nc.us/library/pdf/HP%20LoadRunner%20Best%20Practices%20.pdf

Text from doc:

Dynamic transactions names are names that change
depending upon a parameterized value. If there are
several reports that are run randomly, the team can
define the transaction name dynamically using the
code below:

Char rname[10];

sprintf( rname, â Run_Report_%sâ , lr_eval_string(â {report}â ) );

lr_output_message(rname);

lr_start_transaction(rname);

lr_end_transaction(rname,2);

View solution in original post

0 Likes
4 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to parse parameter values to the Transaction Names

Jump to solution
Look at this document:

http://www.sqa.its.state.nc.us/library/pdf/HP%20LoadRunner%20Best%20Practices%20.pdf

Text from doc:

Dynamic transactions names are names that change
depending upon a parameterized value. If there are
several reports that are run randomly, the team can
define the transaction name dynamically using the
code below:

Char rname[10];

sprintf( rname, â Run_Report_%sâ , lr_eval_string(â {report}â ) );

lr_output_message(rname);

lr_start_transaction(rname);

lr_end_transaction(rname,2);

View solution in original post

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to parse parameter values to the Transaction Names

Jump to solution
Check out this blog post also for a better example of same:

http://testscripts.blogspot.com/2006/10/dynamic-transaction-names-in.html

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to parse parameter values to the Transaction Names

Jump to solution
Alan,

Thank you! It worked!

The code I was using worked too, except I removed the double quotes and braces to reflect your suggestion.

Thank you,
Krish
Email any Performance related queries, will do my BEST!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to parse parameter values to the Transaction Names

Jump to solution
The solution provided worked!!!
Email any Performance related queries, will do my BEST!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.