ImportError: No module named HTMLTestRunner --- not part of Sikuli

Asked by gemmy

I am using the Sikuli X version from http://www.sikuli.org/download.html
Running the script below in Windows 7 64-bit, gave an error --> ImportError: No module named HTMLTestRunner

import unittest
import HTMLTestRunner #even if i changed it into from HTMLTestRunner import *

class MyTest(unittest.TestCase):
    def setUp(self):
        print 'This is set up method.'
    def testA(self):
        openApp("notepad.exe")
        wait("1357207372704-2.png") # wait until the app appears
        assert exists("1357207372704-2.png")
        print 'notepad existed - Passed'
    def testB(self):
        click("1357208112379-1.png")
        print 'notepad closed - Passed'
    def tearDown(self):
        print 'This is tear down method.'

suite = unittest.TestLoader().loadTestsFromTestCase(MyTest)
outputfile = open("C:\Report.html", "w")
runner = HTMLTestRunner.HTMLTestRunner(stream=outputfile, title='Test Report', description='This is demo' )

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Seems you do not have HTMLTestRunner on your machine ;-)

It is not bundled with Sikuli.

Either download the basic version from the net or use the extended version (makes screenshots automatically) from here:
https://dl.dropboxusercontent.com/u/42895525/HTMLTestRunner.zip

Revision history for this message
gemmy (gemcelmercado) said :
#2

Hi RaiMan,
Thank you for your prompt resolution.
Can i also ask for the xmlrunner version?

Revision history for this message
gemmy (gemcelmercado) said :
#3

Thanks RaiMan, that solved my question.

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