There's some way to "force error" or "failure" for XMLTestRunner?
Hi. Good evening for everyone.
I'm working with Sikuli + XMLTestRunner on a larger task. In one part of the code that I write on Sikule IDE, I have an IF, and, inside this if I want to "force" an error or failure, because I want to the the info of fail in XMLTestRunner.
I have been trying for 12 hours diferents kinds of codes or style of codes and nothing work's fine.
I see this page http://
Let's take a look about my code:
class C1Cars(
def C1_CT1Ford(self):
type(' sikulix')
### HERE I WANT TO RETURN AN ERROR ####
### SO THE METHOD WILL BE THERE ####
else:
### HERE THE TEST WILL END WITHOUT RETURN ANY ERROR
def suite():
suite = unittest.
suite.
#suite.
return suite
Someone can help me?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Sikuli Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2018-11-30
- Last reply:
- 2018-12-03
1) I think you may try to use "assert" instead of if-else, like
====
assert handlerchamado<=0
====
If statement under assert is correct, script goes as nothing happened, but if assert condition is failed, script should raise an error which should fail the test.
( see http://
2) They say XMLTestRunner is unmaintained ( https:/
RaiMan (raimund-hocke) said : | #2 |
see comment #1
Can you help with this problem?
Provide an answer of your own, or ask Akissel Donner da Silva for more information if necessary.