Renan Gaspar Trusted Contributor.
Trusted Contributor.
303 views

Exit script in the first failed step

Jump to solution

Hi, does anyone know if it's possible to make UFT exit the test as soon as a step fails?

So, a simple if condition with Exittest and variations won't help as I can't create this if for each step of a script with 400 lines. This must be something in the setup of the test.

Thanks.

0 Likes
1 Solution

Accepted Solutions
Highlighted
liorde Honored Contributor.
Honored Contributor.

Re: Exit script in the first failed step

Jump to solution

Can you define what mean by a step error? Normally of you are testing a GUI application and an unepxcted "something" occurs, the test will halt by itself.

What you wish to do is a "clean exit"??

Have you considered using something like a recovery scenario for this which will "trap" any error and will perform an ExitAction statement ..?

Dont know if this is your direction but this is what I can come up with ...

 

2 Replies
Highlighted
liorde Honored Contributor.
Honored Contributor.

Re: Exit script in the first failed step

Jump to solution

Can you define what mean by a step error? Normally of you are testing a GUI application and an unepxcted "something" occurs, the test will halt by itself.

What you wish to do is a "clean exit"??

Have you considered using something like a recovery scenario for this which will "trap" any error and will perform an ExitAction statement ..?

Dont know if this is your direction but this is what I can come up with ...

 

Renan Gaspar Trusted Contributor.
Trusted Contributor.

Re: Exit script in the first failed step

Jump to solution

Hi Liorde,

 Thank you for your support.

 I mean any kind of failure. Let's say for example an object is not found, UFT will report "Object not found in the screen ... ", but will keep going. What I want to is to exit the test at this moment.

 And you are right, I didn't know Recovery Scenario could cover this kind of situation, but I just found out that yes, it does.

Thank you again.

 

Kind regards,

Renan Gaspar.

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.