Skip to content

Instantly share code, notes, and snippets.

@keokilee
Created March 12, 2011 00:56
Show Gist options
  • Save keokilee/866881 to your computer and use it in GitHub Desktop.
Save keokilee/866881 to your computer and use it in GitHub Desktop.
Run the tests in Jenkins and capture code coverage.
source .env/bin/activate;
coverage erase
coverage run --source="apps/,apps/" manage.py test --with-xunit --exe
# generate an xml coverage report
coverage xml -o coverage.xml
# generate html coverage reports
coverage html -d ../../builds/${BUILD_ID}/coverage_html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment