Highlighted
Absent Member.
Absent Member.
183 views

Unable to continue on error

Hi,
I am using Performance Center 9.52.
I have a script in RTE protocol (happens the same way in other protocols too). I have enabled the Continue on Error setting in the Run time settings, but when an error is encoutnered the Vuser just doesn't continue and goes to Vuser_end.
How do I handle the exception gracefully?

A samplecode is given below:

TE_wait_sync();
TE_wait_text("MODAL QUOTE SUCCESSFULLY COMPLETED",30);
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

Re: Unable to continue on error

Try using a lr_continue_on_error() function before the statement where you are expecting the failure to happen. For example your code needs to be modified to:

lr_continue_on_error(1);
TE_wait_sync();
TE_wait_text("MODAL QUOTE SUCCESSFULLY COMPLETED",30);

The value 1 in the function specifies that the script has to continue on error. You can also add a lr_continue_on_error(0); at the end of the script to disable this meaning the script will stop if an error is encountered.This way you can control the error handling for a particular portion of the code.

Hope this helps.

Thanks
Prashanth Thimmavajjala
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Unable to continue on error

Thanks a lot. I used that function and it works. 1 more question in this is that what is the behavior of the a Vuser supposed to be in case there is an error? I mean suppose we do not continue on error, and an error is encountered, should the Vuser exit OR should that iteration fail and move on to the next iteration?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Unable to continue on error

If you have chosen not to continue on error, then ideally the user should abort the current iteration upon encountering the error and move on to the next iteration. You can try this out by putting your name as the text check and run the script for multiple iterations.

Thanks
Prashanth Thimmavajjala
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Unable to continue on error

That's what. I would also expect it to go onto the next iteration when an error occurs, but in my case Vuser just aborts. Any other RTS you suggest I should be doing?
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.