Quantcast
Viewing all articles
Browse latest Browse all 12134

Re: LR Get Transaction status

Hi Tawana, 

 

I have just made some tests with the function and it is working. 

What I see is that you are not returning 0 in the following script extract.

 

if (lr_get_transaction_status ("07_Validate") == LR_FAIL)

{

 

lr_end_transaction("07_Validate", LR_FAIL);

return 0;

 

}

 

 

Here is the script I have used: 

 

Action()
{
    
    int status;

    lr_start_transaction ("Flight");

    web_url("1",
               "URL=https://t.org/",
               "Mode=URL"LAST ); //unexisting url 

     if (lr_get_transaction_status("Flight") ==LR_FAIL) {   
 

    lr_output_message"the transaction has failed #%d",lr_get_transaction_status("Flight") ); 


     lr_end_transaction("Flight"LR_FAIL);
     return 0;
}
   lr_output_message"the transaction has NOT failed #%d",lr_get_transaction_status("Flight") ); 
 lr_end_transaction("Flight"LR_PASS);



    return 0;
}

 

 

In fact you need to use this function only if during reply in Run Time settings you have enabled the continue on error option. 

 

If this option is not selected the script will fail and the replay will be moved to the vuser_end part of the script where you can put the log out steps. 

 

 

Kind regards, 

Vesela


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>