Here's my .coveragerc
include = */<project-dir>/*
My sample script:
echo "Running unit tests along with coverage"
coverage run -m pytest
echo "printing coverage report"
ls -al
echo "getting coverage report"
coverage report --debug=trace
exitCode=$?
This works fine locally however in Jenkins, I'm seeing this error
Coverage.py warning: No data was collected. (no-data-collected)
I can see Once coverage run -m pytest
is run, .coverage
file is created.
I'm confused since .coverage file exists, why is
coverage report
having trouble finding data?