Sikuli - HTML Test Runner not working

Joined
Jun 29, 2017
Messages
1
Reaction score
1
Hi,

I'm using Python for test in Sikuli following is my code:

Python:
import unittest
import HTMLTestRunner

class UnitTestX(unittest.TestCase):

   #some steps
   click()
   ....

   suite = unittest.TestLoader().loadTestsFromTestCase(UnitTestX)
   outfile = file('my_report.html', 'wb')
   runner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title='Test Report', description='This is demo' )
   runner.run(suite)

and here is the error message:

[error] NameError ( name 'UnitTestX' is not defined )
[error] --- Traceback --- error source first line: module ( function ) statement 129: main ( UnitTestX ) suite = unittest.TestLoader().loadTestsFromTestCase(UnitTestX)
[error] --- Traceback --- end --------------

Here is my folder structure:
Under C driver I have -
The unittest folder in the Python27 - Lib folder
The test scripts are in the Sikuli folder

I am not sure if is because I place the folder in the wrong place or am I missing anything? Please help!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top