Facing problem in generating reports through HTMLTestRunner
Can you please give a simple example for generating reports through HTMLTestRunner
A small example like, opening the calculator, do small addition and close it.
I have tried with all the answers you provided in last queries(asked by other users) and studied the document suggested by you:
https:/
I hope that you give an example for generating reports, as I’m a tester so having less knowledge in coding that’s why I didn’t get much knowledge from the doc provided by you but I tried the script. Here is my script.
import unittest
import HTMLTestRunner
class Test(unittest.
def setUp(self):
def tearDown(self):
def testA(self):
assert exists(
print "Test case Pass"
def testB(self):
assert not exists(
print "Test case Fail"
suite = unittest.
outfile = open("PATH OF HTML FILE", "w")
runner = HTMLTestRunner.
runner.run(suite)
with this script I’m unable to generate the report
My questions and issues I’m facing
Question1:
When I used “import HTMLTestRunner” I’m getting the following error message:
ImportError ( No module named HTMLTestRunner )
For this the solutions that I have tried are:
I have placed the HTMLTestRunner.py file in the same directory where sikuli.sikuli script file is residing.
Also I have placed the HTMLTestRunner.py file in a folder where ‘sikuli-setup.jar file is residing
Note: when I opened the HTMLTestRunner.py file its opening in note pad.
Question 2:
What is unittest in ‘import unittest’ statement
Was ‘unittest’ means another script.
Will this statement work in Sikuli IDE even if we are not using python/jython
Question 3:
For storing results the process which I’m following is
Taking a Notepad converting it to html file and giving this file properties in output file
i.e. outfile = open("Path of File", "w")
was this process correct?
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: