I want to run multiple (like 10 or so) sikuli scripts consecutively and output the result in XML. I have found this SO question:
How to generate report using sikuli for desktop application
and xmlrunner looks quite ok. Now, my sikuli scripts have multiple test methods, but not all of them have tearDown steps since those test don't do much.
- Do I have to implement all 3 methods for a test to work?
- How does the test runner work? Does it start by calling
setUpand then proceeds to call all other methods in sequence?
Furthermore, using template provided in the answer of the question:
import xmlrunner
import unittest
class MyTest(unittest.TestCase):
def setUp(self):
// setUp
def testMyTest(self):
// test
def tearDown(self):
// tearDown
suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
result = XMLTestRunner(file("unittest.xml", "w")).run(suite)
How would I go and include all my sikuli scripts, which are all separate classes in separate folders? Is it possible somehow to reference or import the test .py file generated by sikuli? Reason is, I wouldn't like to copy and paste all code in one large file which would then have many classes and would be very large.