Hi,
I'm using Python for test in Sikuli following is my code:
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
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