Skip to content

Improve coverage accuracy for parallel test runs #22118

@pheus

Description

@pheus

Proposed Changes

Review and improve how CI collects coverage when running the Django test suite with --parallel.

The current coverage command runs the test suite through Django's parallel test runner. Since parallel test execution uses worker processes, coverage collected only from the parent process may not include all code exercised by the test workers.

A follow-up change could address this in one of two ways:

  • run the coverage job without Django's --parallel option; or
  • configure coverage.py to collect subprocess/multiprocessing coverage data and add a coverage combine step before generating the report.

Justification

This would make the CI coverage report more accurate and avoid giving an incomplete picture of test coverage.

This is separate from #22093, which only reduces redundant coverage runs across the CI matrix. Once coverage is run on a single matrix entry, it would be good to also ensure that the remaining coverage job captures the full test execution as accurately as possible.

Metadata

Metadata

Assignees

Labels

netboxstatus: acceptedThis issue has been accepted for implementationtopic: testingtype: housekeepingChanges to the application which do not directly impact the end user

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions