Skip to content

AymanElsayeed/PyTestEx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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