action #115022
closedcoordination #154777: [saga][epic] Shareable os-autoinst and test distribution plugins
coordination #108527: [epic] os-autoinst wheels for scalable code reuse of helper functions and segmented test distributions
Complete unit test coverage (with coverage analysis) in os-autoinst/wheel-launcher
Description
Motivation¶
os-autoinst/wheel-launcher is a rather simple "perl project" so let's have full unit test coverage with coverage analysis to provide a good example and template for others to follow
Acceptance criteria¶
- AC1: os-autoinst/os-autoinst-wheel-launcher has a codecov badge showing 100%
Suggestions¶
- The main goal is to cover the logic in wheel code so only cover that but don't overdo it
- Optional: Think about a mocked testapi or using backend::null automatically
- Optional: Include style checks, perl tidy, etc.
Updated by okurz about 2 years ago
- Copied from action #115019: os-autoinst/wheel-boot which can be used to test os-autoinst/wheel-launcher size:M added
Updated by mkittler almost 2 years ago
Looks like coverage isn't tracked at all so far. So I created a draft PR for that (that's likely not working yet due to missing dependencies): https://github.com/os-autoinst/os-autoinst-wheel-launcher/pull/3
Updated by mkittler almost 2 years ago
- Status changed from New to Feedback
I'm waiting for a review on https://github.com/os-autoinst/os-autoinst-wheel-launcher/pull/3. Maybe I can also add unit tests meanwhile (as the existing tests "only" invoke the code via isotovideo).
Updated by mkittler almost 2 years ago
PR to create unit tests: https://github.com/os-autoinst/os-autoinst-wheel-launcher/pull/5
These tests are relying on heavy mocking. They can help to verify that the logic within the wheel code itself is correct. They cannot show whether the invoked test API functions would really behave as expected. For the sake of reaching 100 % code coverage it should be good enough now.
Updated by mkittler almost 2 years ago
- Status changed from Feedback to Resolved
The PR has been merged. So we're at 100 % test coverage including badge.
Updated by okurz almost 2 years ago
- Status changed from Resolved to Feedback
Please also ensure that we stay at 100% in the future
Updated by mkittler almost 2 years ago
Isn't setting the target to 100 % in codecov.yaml
good enough?
Updated by okurz almost 2 years ago
- Status changed from Feedback to Resolved
yes, https://github.com/os-autoinst/os-autoinst-wheel-launcher/blob/main/codecov.yaml#L13 is good enough.