jonathan-s / django-sockpuppet

Build reactive applications with the django tooling you already know and love.
https://github.com/jonathan-s/django-sockpuppet
MIT License
450 stars 22 forks source link

Figure out how to get python codecoverage working with cypress #5

Closed jonathan-s closed 4 years ago

jonathan-s commented 4 years ago

Right now we run some integration tests with cypress.io and it'd be neat if we could get the codecoverage from that.

This looks like a good start on how to achieve that -> https://github.com/cypress-io/code-coverage#examples See also this SO answer -> https://stackoverflow.com/questions/19025336/how-to-get-coverage-data-from-a-django-app-when-running-in-gunicorn

You can get the pid from a background task this way.

abc &
echo "PID: $!"

After we run cypress we need to kill the server to collect coverage. kill -2 pid.