pytest-xhtml is a plugin for pytest
that generates a HTML report for test results.
⚠ pytest-xhtml
is the alternative library for pytest-html
. If you have installed pytest-html
, please uninstall it first.
# pip install
$ pip install pytest-xhtml
- unit test
cd testing_unit
$ pytest test_sample.py --html=report.html
- e2e test
# install selenium library
$ pip install selenium
$ cd testing_e2e
$ pytest test_selenium.py --html=report.html
- http test
# install pytest-req library
$ pip install pytest-req
$ cd testing_req
$ pytest test_req.py --html=report.html
# develop
git clone https://github.com/seldomQA/pytest-xhtml.git
$ cd pytest-xhtml
$ pip install .
$ npm run build:css