Integrate code test coverage reports into CI pipeline #2792

Closed
opened 2025-12-29 18:22:12 +01:00 by adam · 1 comment
Owner

Originally created by @lampwins on GitHub (Aug 7, 2019).

Proposed Changes

I would like to add code coverage reporting into our CI pipeline. We would have the option of having the pipeline fail if coverage does not meet a defined percentage. I don't think we would necessarily want to do this from day one, but down the road, it will become an option.

For now, I think the simplest way to do this is to use coverage.py which has some support from the Django project.

Justification

Coverage reports aid in a number of testing metrics, but notably, they will help us quantify areas of the codebase which lack adequate testing.

There is no additional development, runtime, or performance hit from implementing this. It is simply an additional stage added to our CI (Travis) pipeline.

Originally created by @lampwins on GitHub (Aug 7, 2019). <!-- NOTE: This type of issue should be opened only by those reasonably familiar with NetBox's codebase and interested in contributing to its development. Describe the proposed change(s) in detail. --> ### Proposed Changes I would like to add code coverage reporting into our CI pipeline. We would have the option of having the pipeline fail if coverage does not meet a defined percentage. I don't think we would necessarily want to do this from day one, but down the road, it will become an option. For now, I think the simplest way to do this is to use [coverage.py](https://coverage.readthedocs.io/en/v4.5.x/) which has some support from the Django project. <!-- Provide justification for the proposed change(s). --> ### Justification Coverage reports aid in a number of testing metrics, but notably, they will help us quantify areas of the codebase which lack adequate testing. There is no additional development, runtime, or performance hit from implementing this. It is simply an additional stage added to our CI (Travis) pipeline.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:22:12 +01:00
adam closed this issue 2025-12-29 18:22:12 +01:00
Author
Owner

@lampwins commented on GitHub (Aug 15, 2019):

Implemented in develop-2.7

@lampwins commented on GitHub (Aug 15, 2019): Implemented in `develop-2.7`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2792