You are on page 1of 2

Transaction Points or Transaction Names

Insert the transaction points to measure the response time of user action.
For naming convention: Applicationname_scenarioname_transactionnumber_actionname

Ex: LoanIQ_DDrequest_ 01_welcomepage

• Start Transaction: lr_start_transaction(transaction name)

o Ex: lr_start_transaction (“LoanIQ_DDrequest_01_welcomepage”)

• End Transaction: lr_end_transaction(transaction name, status)


o Ex: lr_end_transaction (“LoanIQ_DDrequest_01_welcomepage”, LR_AUTO)
• End Transaction Status:
1. Lr_auto: it will automatically identify the end transaction status and return
either pass or fail or stop.
2. Lr_pass: It will directly end transaction with pass status.
3. Lr_fail: It will directly end transaction with fail status.
4. Lr_stop: It will directly end transaction with stop status.

Think Time
• It is actually the user waiting time or idle time b/n transactions or webpage standards.
Lr_think_time(10) Means user waiting time is 10 secs

Syntax: Start T1
End T1
Lr_think_time(10);
Start T2
End T2
Lr_think_time(10);
• Always think time should be placed after the end of the transaction.
• If we include the think time inside of the transaction, the given think time will include
in transaction response time.

Test Check Point or Text Verification Function

• Use the Test check point to verify the test content on the webpage using the below
functions.
1. Web_reg_find()

web_reg_find() :

 It will automatically get recorded for each web page request with the page
title.
 It is the registry function always should be placed before each web page
request.
 It will automatically verify the text at runtime and saves the test count into the
save count parameter.
 Web_reg_find(“text=webtour”,”savecount=test1”, LAST);
Error Handling

• Handle the error at runtime if any user fails in middle of the script execution using the
below steps
• Step 1: use the save count argument to capture the count of the given text at run time.
web_reg_find(“text=webtours”,”savecount=welcomepage” ,LAST);
• Step 2: savecount is an additional argument in web_reg_find() to save the text count
into the given parameter at runtime.
• Step 3: Whenever the savecount value > 0, the page request is passed.
• Step 4: Whenever the savecount value = 0, the page request is failed.

• Use the below mentioned conditions to identify the errors at runtime & continue the
vusers on fail cases to maintain the concurrency load & server.

lr_start_transaction(“webtours_flightbooking_01_welcomepage”);

Web_reg_find(“text=webtours”,”savecount=welcomepage”, Last);

Web url(----------) or web submit data(-------------)

If (atoi (lr_eval_string(“{welcomepage}”)) > 0)


{
lr_output_message(“welcomepage is success”);
lr_end_transaction(“webtours_flightbooking_01_welcomepage”, LR_PASS);
}
else
{
lr_error_message(“welcomepage is fail”);

lr_end_transaction(“webtours_flightbooking_01_welcomepage”, LR_FAIL);

lr_exit(LR_Exit_MAIN_ITERATION_AND_CONTINUE, LR_FAIL)
}

Error Handling

You might also like