Ashwin Mohan
Ashwin Mohan

Reputation: 11

How to generate report using sikuli for desktop application

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

Answers (1)

ekostadinov
ekostadinov

Reputation: 6940

You can try one of those two:

  • HTMLTestRunner can be used by adding this script (and the .py file) to your currrent solution:

--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

Related Questions