Html Test report is blank when generated

Asked by Ali Ahmed

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:
Last query:
Last reply:
Revision history for this message
Ali Ahmed (ali13xii) said :
#1

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

Revision history for this message
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

Revision history for this message
Ali Ahmed (ali13xii) said :
#3

Found old question that help me resolve issue

Revision history for this message
RaiMan (raimund-hocke) said :
#4

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