tungwaiyip / HTMLTestRunner

HTMLTestRunner is an extension to the Python standard library's unittest module. It generates easy to use HTML test reports.
http://tungwaiyip.info/software/sample_test_report.html
100 stars 333 forks source link

It does not work with Python 3 #16

Open atomar09 opened 8 years ago

atomar09 commented 8 years ago

Hi,

I tried it with Python 3.x but it does not work. Could you please make it Python 3 compatible?

It would be really helpful. I really appreciate your help.

Thanks

dash0002 commented 8 years ago

@atomar09 You'll want to use https://github.com/dash0002/HTMLTestRunner instead.

ItsPavan commented 7 years ago

@dash0002 Please find the attached traceback and provide me a solution.

ETraceback (most recent call last): File "C:\Users\PKumar\Desktop\my_docs\MB_framework.py", line 28, in HTMLTestRunner.main() File "C:\Python34\lib\unittest\main.py", line 93, in init self.runTests() File "C:\Python34\HTMLTestRunner.py", line 727, in runTests TestProgram.runTests(self) File "C:\Python34\lib\unittest\main.py", line 244, in runTests self.result = testRunner.run(self.test) File "C:\Python34\HTMLTestRunner.py", line 539, in run self.generateReport(test, result) File "C:\Python34\HTMLTestRunner.py", line 587, in generateReport report = self._generate_report(result) File "C:\Python34\HTMLTestRunner.py", line 647, in _generate_report cid = 'c%s' % (cid+1), KeyError: 'skip

kavitabarfa commented 6 years ago

For python 3.x follow the steps:

  1. pip install html-testRunner
  2. import HtmlTestRunner (but not HTMLTestRunner)

Note: In version 3 they have changed the package name from HTMLTestRunner to HTMLTestRunner.

ravikiranb36 commented 3 years ago

For python 3.X install HTMLTestRunner-rv pip install htmltestrunner-rv

from HTMLTestRunner import HTMLTestRunner
runner = HTMLTestRunner()
runner.run(suite)