Wednesday, August 1, 2012

Creating LoadRunner Dynamic Transaction Names


Today I wanted to use parameterized transaction names within a LoadRunner script. 

1) As I thought that a particular transaction was failing after a particular number of iterations. 

2) For Capturing the response time of  request having different keyword searches for each keyword 

Luckily this was pretty simple in LoadRunner. It was just a case of using lr_eval_string in the call to the transaction wrapper.

lr_start_transaction(lr_eval_string("Do Something {IterationNo}"));
lr_end_transaction(lr_eval_string("Do Something {IterationNo}"), LR_AUTO);

Example

lr_start_transaction(lr_eval_string("Response Time for search of {Keyword_Param}"));

web_url("autoSuggestion", 
"URL=http://lalitgarg.com/json/search/autoSuggestion?q={Keyword_Param}&catId=0&v=", 
"TargetFrame=", 
"Resource=1", 
"RecContentType=application/json", 
"Referer=", 
"Snapshot=t1.inf", 
LAST);

 lr_end_transaction(lr_eval_string(" Response Time for search of {Keyword_Param}"), LR_AUTO);


You have to be careful above to make sure that start and end transaction names are the same. To overcome that problem I created a string variable to hold the LoadRunner transaction name.
char sTranName[20];
sprintf(sTranName,lr_eval_string("TransactionA_{pIteration}"));
lr_start_transaction(sTranName);
lr_end_transaction(sTranName,LR_AUTO);

32 comments:

  1. I am obliged to you for sharing this piece of information here and updating us with your resourceful guidance. Hope this might benefit many learners. Keep sharing this gainful articles and continue updating us.
    CCNA Training in Chennai
    DevOps Training in Chennai
    DevOps Training institute
    DevOps Training near me
    CCNA Training institutes in Chennai
    CCNA Training near me

    ReplyDelete
  2. Very informative piece of article, this blog has helped me to understand the concept even better.
    And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
    software testing training in chennai | software testing course in chennai | testing courses in chennai

    ReplyDelete
  3. Transaction preparing powers extra prerequisites on the server database programming. Transactions are created at the customer and send to the server for preparing.소액결제현금화

    ReplyDelete
  4. SSL is indicated by a green bar in the address field of a browser with a lock icon. It is also indicated by the S suffix in the address bar in HTTPS. What this means is that all information that is transacted over the internet is encrypted.소액결제현금화

    ReplyDelete
  5. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. Machine Learning Final Year Projects In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.

    ReplyDelete
  6. I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. https://www.dynamicmarketing.sg/seo-consultant-singapore

    ReplyDelete
  7. All thanks to this naming firm, their online course helped me learn new techniques and strategies that will help me organize my thoughts in generating a brand name. check list

    ReplyDelete
  8. Through testing one can know the scope of extension and limit (final turning point to unique shape).tensile machine

    ReplyDelete
  9. 1C45F
    ----
    ----
    ----
    ----
    ----
    matadorbet
    ----
    ----
    ----

    ReplyDelete

plz give ur comments !!!!!!