How to abort a test and succeeding actions in UFT?
Tags:
Question ID: 105694
1
0

I have a test that requires that a configuration item be present. I can query our database and check that the option is present or not. When the configuration item is not present, my UFT script goes to a Debug dialog error. I can put an if statement before the statement in error and avoid executing the line that will bomb into the debugger. However, then a later statement gets an error. The test is comprised of multiple actions and every action from here on requires the configuration option be present. Is there a command in script that I can use to gracefully abort the test so that succeeding actions in the Test don’t also run?

Marked as spam
Posted by (Questions: 424, Answers: 91)
Asked on October 30, 2014 5:52 pm
71 views
Answers (1)
1
Private answer

You have a few options, but it looks like what you're looking for is the ExitTest utility statement (since you don't want any execution to continue, based on your description...otherwise, you could use ExitAction).

UFT Help > Object Model Reference for GUI Testing > Utility Objects > Utility Statements

- ExitAction
- ExitActionIteration
- ExitTest
- ExitTestIteration

Marked as spam
Posted by (Questions: 0, Answers: 771)
Answered on October 30, 2014 5:54 pm
0
You are correct, sir! ExitTest is exactly what I needed.
( at October 30, 2014 5:55 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top