Skip to content

Latest commit

 

History

History
executable file
·
25 lines (19 loc) · 752 Bytes

README.md

File metadata and controls

executable file
·
25 lines (19 loc) · 752 Bytes

Pytest Example

Objective:

This project is to demonstrate how to generate HTML test report and coverage report using Pytest framework and its capabilities which includes:

The code to generate xml coverage report:

pytest --cov-config=tests/.coveragerc --cov-report xml:./tests/reports/coverage.xml --cov=./ ./

The code to generate HTML coverage report:

pytest --cov-config=tests/.coveragerc --cov-report html:./tests/reports/coverage --cov=./ ./  

The code to generate HTML test report:

pytest --cov-config=tests/.coveragerc --cov-report html:./tests/reports/coverage --cov=./ ./  

Test Reports

Reporting