Highlighted
Absent Member.
Absent Member.
170 views

VUGen Script

I have a script with two transactions. How can I make it in such a way that VUGen only treats it as error only and only if both transactions fail. Otherwise, it is passing even one transaction fails. These two transactions are not depend on each other.

Thanks.
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: VUGen Script

Hi,

1. Under Run time settings check continue on error.
2. Put the condn at the end of 2nd transaction that
i) if status of 1 transaction and 2nd
transaction is fail then generate error.

For syntax u can refer help

Hope it Helps!!!




0 Likes
Highlighted
Absent Member.
Absent Member.

Re: VUGen Script

This is possible. Runtime Settings --> Miscellaneous :
a) Error Handling :
i) Continue on error: It continues the script when an error occurs. By doing so all the open transactions will be failed as the same data which caused to the failure is being passed across the iteration.

And place a function in your script to pass the transaction if both the transactions are passed and fail it if any of the one are failed. Refer to the below syntax which gives you an idea on how to place the condition for one case. Just include your second case to the below example and implement in your script.
Eg: lr_start_transaction(â Server response1_Transâ ,LR_AUTO);
Web_reg_find(â Text=Bank of America Home Loansâ ,â Savecount=abc_count1â ,LAST);
Web_url --------------------------
- - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -
If(atoi(lr_eval_string(â {abc_count1}â ))>0)
{
Lr_end_transaction(â Server response1_Transâ ,LR_PASS);
Else
{
Lr_end_transaction(â Server response1_Transâ ,LR_FAIL);
Lr_exit(lr_exit_iteration_and_continue,LR_FAIL);
}

Hope this helps 🙂
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: VUGen Script

Thank for the info. It works as indicated.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.