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

2019-06-03 Thread TestMechanic
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

TestMechanic posted a new comment:
Yes. It will result in 80 rows report. This is the correct way.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-06-03 Thread Asheru
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

Asheru posted a new comment:
@TestMechanic

Hello,

I think the second approach would result also in 80 separated rows in
the html test report but I have to try.

Thanks for answering.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-27 Thread TestMechanic
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

TestMechanic proposed the following answer:
Hi Asheru,

As far as I understand you are doing data driven test
I had same issue in the past and it is solvable. 

Here is two approaches I would suggest:

1. Do not "assert" in the function
  -- you can return true or false value to the main loop and store message like 
"test 43 failed" in var like errorsText
  -- when your main loop finish you can check if variable errosText is empty 
and decide what to do

2. You can generate dynamically your tests(based on your csv) to match
unit test rules. In this way you will have 80 separated tests and each
can pass or fail independently

I highly recommend using second approach

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-24 Thread RaiMan
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

RaiMan proposed the following answer:
--- This above would be a test for example
Might be a "test" as you see it, but it is not a test in the sense of Python 
unittest/HTMLTestRunner.

Please read at least a tutorial about Python unittest, to understand,
what I am saying.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-24 Thread Asheru
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

Asheru posted a new comment:
But i have built the script so tests are not hardcoded. They are read
from a csv and there they can be defined depending on the needs.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-24 Thread Asheru
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

Asheru posted a new comment:
This above would be a test for example

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-24 Thread RaiMan
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

RaiMan proposed the following answer:
You do not seem to use the stuff according to the unittest rules.

You have to organize your tests into test cases with a possible setup and 
teardown.
Each test case then is run independently one after the other and reveals its 
result to HTMLTestRunner.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-24 Thread RaiMan
Question #680996 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680996

Status: Open => Answered

RaiMan proposed the following answer:
You do not seem to use the stuff according to the unites rules.

You have to organize your tests into test cases with a possible setup and 
teardown.
Each test case then is run independently one after the other and reveals its 
result to HTMLTestRunner.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


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

2019-05-22 Thread Asheru
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.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp