← Back to team overview

sikuli-driver team mailing list archive

[Question #680996]: sikulixX + HtmlTestRunner - continue on assert False

 

New question #680996 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680996

Hello,

I have a script that automates a desktop app. I have the following issue:

So I want to add 80 products and check if they are added. For each one I need to search for it's name ,add it, check if it's added, delete it then search for other ones.

I have  build a generic method that does this, and it requires 3 parameters: nameOfProduct,procutAddImage,checkProductAddedImage. So far so good. It looks something like this:

def addProduct(param1,param2,param3):
      try:
             #do required actions
      except:
               loggerLogMessageThatProductIsNotadded
               assert False

For all the 80 products I'm calling this method. Now in case product no.43 for ex. is not added I want the script to continue. If i'm not using 'assert False' this will work but in the report the test is shown as passed (logs are added).

I want to know if there is possible to display the test as failed if one or more products are not added and to go on with the execution.

Thanks.





-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.