Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Failure #77

Open
zhangpanfeng opened this issue Oct 13, 2020 · 3 comments
Open

Install Failure #77

zhangpanfeng opened this issue Oct 13, 2020 · 3 comments

Comments

@zhangpanfeng
Copy link

  • HtmlTestRunner version: 1.2.1
  • Python version: 3.7.0
  • Operating System: Mac OS

Description

ERROR: Could not find a version that satisfies the requirement html-testRunner (from versions: none)
ERROR: No matching distribution found for html-testRunner

What I Did

pip install html-testRunner
@domenicqatest
Copy link

I'm having the same issue with Python 3.9.0

Are these versions of Python supported?

@Anamika07
Copy link

I am also having the same issue :/

@HenriqueBraz
Copy link

HenriqueBraz commented Feb 8, 2022

I solved it:

  1. pip install html-testRunner is not necessary;
  2. download the html_test_runer.txt below and save it on your project as html_test_runner.py ( it is converted to Python3 );
  3. configure it on your tests.py:

import unittest
from html_test_runner import HTMLTestRunner # ----> import from your downloaded html_test_runer.py is

class TestABCD(unittest.TestCase):

         test1():
               ....
         test2():
              ....
         test3():
              .... 

suite = unittest.TestLoader().loadTestsFromTestCase(TestABCD)
outfile = open("Report.html", "w")
runner = HTMLTestRunner(stream=outfile, title='Test Report')
runner.run(suite)

#######################################################

To create the tests html file "Report.html", type in your teminal: python -m unittest

enjoy :)

html_test_runner.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants