action #176595
opencoordination #127031: [saga][epic] openQA for SUSE customers
coordination #130414: [epic] Improved code coverage in os-autoinst
[retro] Code coverage: Create report about which code is covered by which unit test
0%
Description
Motivation¶
This came up in the retro on 2025-01-31.
We have a lot of unit test files in openQA and os-autoinst, and it can be hard to figure out which covers what parts of the code.
For adding new tests it can be very helpful to quickly find out suggestions on where to put them.
It's possible to gather that information by executing tests and retrieving the JSON coverage data after each test file.
There is a draft https://github.com/os-autoinst/os-autoinst/pull/2644 which creates a JSON file per each code file with information on which uni test file covered it.
This could be run as a nightly job and create a HTML report. Doesn't need to be fancy.
Acceptance Criteria¶
- AC1: We have a reasonably up-to-date HTML report documenting which code lines are covered by which test files
Suggestions¶
- JSON Data can be retrieved from here: https://github.com/perlpunk/os-autoinst/actions/runs/13156688665
- Todos:
- Make this work with cmake: https://github.com/os-autoinst/os-autoinst/pull/2644/files#r1951240209
- Run this as a scheduled github action every day/week or for every push to master
- Create HTML pages from JSON
- Do the same kind of thing for openQA
Updated by tinita about 13 hours ago
How about creating a simple, minimal HTML report from my proof of concept data, and then we look at it together and decide if this is useful, and then we can care about the other details?
Updated by tinita about 13 hours ago
- Subject changed from Code coverage: Create report about which code is covered by which unit test to [retro] Code coverage: Create report about which code is covered by which unit test
- Description updated (diff)