Reputation: 11
I automated an application using sikuli. Now the program is full of image (usual sikuli program), I want to generate the final report for the test cases. I can only see the option for robot framework to generate the report. I don't know python. How can I do that without robot framework? Can you jus guide me with the steps to do that? if there is no option guide with the normal way. Thanks
Upvotes: 0
Views: 2778
Reputation: 6940
You can try one of those two:
--script--
from sikuli import *
import unittest
import HTMLTestRunner
Class ClassName(unittest.TestCase):
#paste your script
suite = unittest.TestLoader().loadTestsFromTestCase(ClassName)
outfile = open("C:\\Sikuli\\Reports\\report.html", "w") # path to report folder
runner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title=' Report Title', description='desc..' )
runner.run(suite)
--script--
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)
Upvotes: 1