Is there any way of taking control after a Fail?

Ask general questions here.
Posts: 1
Joined: Wed Jan 16, 2019 12:10 am

Is there any way of taking control after a Fail?

Post by dance » Wed Jan 16, 2019 12:13 am

I would like to add a method to be used every time Failure is invoked. Is there a way I can do this.
Primarily I want to set a Global flag to indicate that a module has failed.
Then modules that follow can execute or not depending on the value of the flag.
cong ty giup viec nha gia re, uy tin, dich vu cung cap giup viec nha

Posts: 217
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Is there any way of taking control after a Fail?

Post by McTurtle » Fri Jan 18, 2019 9:19 am

Hi Dance,

This can most likely be achieved with the structure of the test suite and setting the correct error behaviour for every test case. Can you post a screenshot of an example test suite structure that you have in mind and I could try to suggest you how to arrange your recordings and set error behaviors so that the right modules will be executed.

There is not method that would get executed every time a failure is invoked. Well, you can't access these methods and change the code in them.

You can also use parameters for that. But this will mean that you have to add code methods at every point in the test suite where you want to update or check the value of the parameter (global flag). That means much more maintenance than simply taming the error behaviour :)

Have you also looked into conditional execution? In combination with setting values of global parameters in modules this could be useful to you.

Conditional: Link to Conditional
Passing values: Link to Passing values