coverage in parallel for django tests

You miss a few steps, from Measuring sub-processes:

  1. change the coverage run command to this one :
    COVERAGE_PROCESS_START=./.coveragerc-app coverage run 
    --parallel-mode --concurrency=multiprocessing 
    --rcfile=./.coveragerc-app manage.py test -v 3 --parallel=$(NPROCS) app
  1. Create a file named sitecustomize.py in your local folder with
    import coverage
    coverage.process_startup()
  1. Add concurrency option in your rcfile (run section):
    concurrency=multiprocessing

Took a read through the coverage documentation linked in answer above, perhaps it's been updated, as just doing the following seems to work for our Django project:

coverage run --concurrency=multiprocessing manage.py test app --parallel=3
coverage combine
coverage report