What is the load runner start-transaction and its syntax.

It will start the transaction on the script.
Syntax. Lr-start-transaction("transaction name").

Showing Answers 1 - 10 of 10 Answers

taneja.ishu

  • Jun 30th, 2011
 

Syntax: lr_start_transaction("transaction name");

For ex: lr_start_transaction("Launch_Application");

This function starts recording the traffic response time between the client and server until it find its lr_end_transaction.

  Was this answer useful?  Yes

Kriti Tiwari

  • Sep 10th, 2012
 

lr_start_transaction("TransactionName");

  Was this answer useful?  Yes

sindhu_gt

  • Mar 15th, 2014
 

Hi,

To start the trancaction we need to use the function called it as

lr_start_transaction("Transaction name");

The Transaction name need to follow some naming convention like Application Name_Test Name_Transaction Number_Transaction Name.

for eg., Webtours_TicketBooking_01_Login

Basically we are using transactions to get the response time for each and every action need to get in that web application.

To end transaction we need to use lr_end_transaction("Transaction Name",STATUS);

Status may be PASS or FAIL or AUTO.

  Was this answer useful?  Yes

sindhu_gt

  • Mar 15th, 2014
 

Transactions are the starting and ending point of any user action .

lr_start_transaction("Login");

// User Activity would be recorded here.

lr_end_transaction("Login",LR_AUTO);

During recording of a script we start a transaction with name="Login" then perform the Login activity on the application and after completion of login activity we click on end Transaction Button.
transaction are mainily used for measuring the time taken for any specific activity i.e. Login in above case.

lr_start_transaction ( const char *transaction_name );
Marks the beginning of any transaction.

lr_end_transaction (const char *transaction_name, int status ) ;
Marks the ending of a transaction.
Note:- Name of the transaction in both start and end should be same otherwise LR will throw an error.

you can manually set the status of any transaction using status attribute.
LR_PASS :- For Success
LR_FAIL:- For Failure
LR_AUTO :- value will be automatically assigned
LR_STOP :- For Aborted

Example:- In the following example the user open a link "www.xyz.com" . If the link open successfully the transaction is marked with pass else fail.

lr_start_transaction("Open_Link");


rc = web_url("www.xyz.com",


"URL=http://www.xyz.com/",
"Mode=HTML",
LAST);


/* End transaction with operation result - pass or fail */
if (rc == 0)

lr_end_transaction("Open_Link", LR_PASS);

else

lr_end_transaction("Open_Link", LR_FAIL);

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions