← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #201204]: Skip TestCase based on previous success/failure

 

Question #201204 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/201204

    Status: Answered => Open

Kyle VandenLangenberg is still having a problem:
Thanks for the response.

I'm a huge novice when it comes to this stuff. So let me see if I get
this.

To reiterate what I'm doing in a bit more detail:

I am  using the SIkuli IDE functions to do a lot of find, click, wait,
click, etc... Its just easier to program what I need to do using the
images (click on this button, click on this link, etc...)

So the class xyz opens one program, performs some tasks, saves some
files, and its done. I use some assert exist() statements within the xyz
class to check and see if certain parts of that testcase are correct;
however, as you said, the exceptions that I will likely see are
FindFailed exceptions and these are the ones that cause an error in the
class.

The 2nd class abc then opens the files saved in class xyz and it is
checking them for correctness. (XYZ is exporting file types, ABC is
opening each file type in a text editor to make sure the export occurred
as expected). If XYZ has an exception, the 2nd class automatically can't
work because XYZ never finished. So the entire thing really falls apart.

What you are saying is that at every point where I am executing a Find
(e.g. click(image)), I need to actually use a try/catch statement? Or is
there a way to wrap the entire class and ask the question "If in this
class xyz, at any point, if an exception (error) is returned, save a
value (say FALSE), and then in the abc class, at the very beginning, add
an if statement that will skip the abc class (and hopefully also print
something like "Skipped class abc because of exception in xyz").

Thanks in advance for the help. Again because I am a novice detail is
appreciated.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.