Html Test report is blank when generated

Asked by Ali Ahmed on 2021-01-05

When I run my code, it produces the HTML code in the console and generates a report file but the report file is blank.

Here is the code I'm running:

from HTMLTestRunner import HTMLTestRunner

Debug.on(0);

class Test(unittest.TestCase):
    def setUp(self):
        utils.openApplication("Appname")
        Debug.info('Setup Called')

    def test_isupper(self):
        self.assertTrue('FOO'.isupper())
        self.assertFalse('Foo'.isupper())

if __name__ == '__main__':
    loader = unittest.TestLoader()
    suite = unittest.TestSuite((loader.loadTestsFromTestCase(Test)))

    outfile = file("Report.html", "w")
    runner = HTMLTestRunner()
    runner.run(suite)

I'm using Sikuli IDE 1.1.3, I tried using 2.0.4 but its not running there

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Ali Ahmed
Solved:
2021-01-06
Last query:
2021-01-06
Last reply:
Ali Ahmed (ali13xii) said : #1

And it should have screenshot with report when it fails, correct?

Ali Ahmed (ali13xii) said : #2

Also I am not able to use sikuli methods in 1.1.3, to my test. I am able to do it in 2.0.4 for some reason

Ali Ahmed (ali13xii) said : #3

Found old question that help me resolve issue

RaiMan (raimund-hocke) said : #4

Posting the link to the helping question would be appreciated by other readers.
Thanks.