Project

General

Profile

Actions

action #115022

closed

coordination #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

Added by okurz over 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2022-08-04
Due date:
% Done:

0%

Estimated time:

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.

Related issues 1 (1 open0 closed)

Copied from openQA Project - action #115019: os-autoinst/wheel-boot which can be used to test os-autoinst/wheel-launcher size:MWorkable2022-08-04

Actions
Actions #1

Updated by okurz over 2 years ago

  • Copied from action #115019: os-autoinst/wheel-boot which can be used to test os-autoinst/wheel-launcher size:M added
Actions #2

Updated by okurz almost 2 years ago

  • Target version changed from future to Ready
Actions #3

Updated by mkittler almost 2 years ago

  • Assignee set to mkittler
Actions #4

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

Actions #5

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).

Actions #6

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.

Actions #7

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.

Actions #8

Updated by okurz almost 2 years ago

  • Status changed from Resolved to Feedback

Please also ensure that we stay at 100% in the future

Actions #9

Updated by mkittler almost 2 years ago

Isn't setting the target to 100 % in codecov.yaml good enough?

Actions #10

Updated by okurz almost 2 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF