Can nested Transactions be done within a LR TruClient Script?

Question ID: 109596
1
0

Hello

We are use VuGen 12.63 & using Truclient-web Protocol.

We have a requirement from customer to create Nested Transaction like Shown below.

——————————————————————-

lr_start_transaction(“Overall time of steps “);

        lr_start_transaction(“login”);

    /*

    script login code  

    */

         lr_end_transaction(“login”, LR_AUTO);

lr_end_transaction(“Overall time of steps”, LR_AUTO);

——————————————————————–

I know it’s possible in Web(http/html) protocol, I tried my level best to create in Truclient protocol but it seems to be not working. Because in Truclient for every transaction created, it needs a corresponding steps to get attached into.

 

 

 

Marked as spam
Posted by (Questions: 210, Answers: 15)
Asked on June 10, 2020 2:59 pm
7 views
Answers
0
Private answer

Yes, you can have nested  transactions in TruClient  in all version of LoadRunner 12.xx and 2020.x.

Easiest way is to add them after recording the script by:

  1. Select the step
  2. Right-click of the step and select the "Surround with Transaction"
  3. Enter in the name of the transaction and press OK

If you want more the one step  in the transaction

  1. Select the first step, press the and hold the crtl key and select all the steps you want within the transaction
  2. Right-click on any of the selected steps and select the "Surround with Transaction"
  3. Enter in the name of the transaction and press OK

 

Use the "Transaction editor" tool to edit any of the transaction as needed

-------------------------------------------------------------------------------------------

Here is an example of a TruClient Script with nested Transactions:

Start Transactions: 00_overall;

Start Transactions: 01_homepage

1   Navigate to "https://supportweb.oras...Web%2fHome.aspx"

End Transaction: 01_homepage

 Start Transaction: 02_login

2    + Login

1   Click on User name (or email addre... textbox

2  Type me.me@orasi.com in User name (or email addre... textbox

3  Type ************ in Password passwordbox

Start Transaction: 02B_enter to login

1  Press key Enter on Password passwordbox

End Transaction: 02B_enter to login

End Transaction: 02_login

Start Transaction: 03_logout

4  Click on Logout JavaScript link

 End Transactions: 03_logout; 00_overall **

**Note: when adding the overall end transaction by select last step in the script.  The "Click on Logout JavaScript link " will trigger the End transaction for both the has 03_logout; and 00_overall  and the end will be list together

 

 

Attachments:
Marked as spam
Posted by (Questions: 12, Answers: 354)
Answered on June 10, 2020 3:10 pm