Neetz World
April 2, 2023

Test Report With Pytest

Posted on April 2, 2023  •  2 minutes  • 353 words

What is Test Report?

Test reporting is always important part of testing. It provides an overview of which testcases are working, which ones are failing and details like what happened if logged or printed.

Calculator Example:

Use the following example for test reporting: Calculator App: https://github.com/neetaBirajdar/test_reporting

Test Report with Pytest

pytest-html Report:

pip install pytest-html
pytest test/test_calculator.py --html=reports/html_report/report.html

pytest-sugar Report:

pip install pytest-sugar
pytest test/test_calculator.py -v

pytest-md Report:

pip install pytest-md-report
pytest test/test_calculator.py --md-report --md-report-verbose=1

Allure Report:

pip install -r requirements.txt
pytest test/test_calculator.py --alluredir=allure_report
allure serve allure_report

allure_report


Hope you find this helpful 😃. Stay tuned for more.

Follow me

To have some coding fun and learning new things!