Project

General

Profile

Actions

action #133112

open

coordination #127031: [saga][epic] openQA for SUSE customers

coordination #168127: [epic] Up-to-date Perl stack

Switch unit tests to Test2-Suite

Added by tinita almost 2 years ago. Updated about 2 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2023-07-20
Due date:
% Done:

0%

Estimated time:

Description

Motivation

We are using a lot of different test modules in different distributions.

  • Test::Most
  • Test::Warnings
  • Test::Fatal
  • Test::MockModule
  • Test::MockObject
  • OpenQA::Test::TimeLimit

The new Test2 suite comes with a lot of builtin stuff:
https://metacpan.org/pod/Test2::V0

The yath tool (alternative to prove) has a builtin timeout functionality: https://metacpan.org/pod/App::Yath#HARNESS-NO-TIMEOUT

https://metacpan.org/pod/Test2::Mock has some interesting features like call tracing. 18-backend-qemu.t is an example where we would get the tracking for free instead of creating our own hash. in another example we use the %called hash even differently, so this is inconsistent.

https://metacpan.org/pod/Test2::Tools::AsyncSubtest / https://metacpan.org/pod/Test2::AsyncSubtest makes it easy to run tests asynchronously or in a fork.

Also the is function already handles deep comparison and even lists all top level mismatches instead of just reporting the first mismatch and then stop.

We might want to try out if we can switch to Test2 in one of our tests and see if it makes sense.
No need to switch all tests at once.

Only downside: The version in Leap 15.5 is quite old (2017!), so we would have to link it in devel:openQA


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #176475: Use Feature::Compat::Try in our code - os-autoinst size:SResolvedokurz2025-02-03

Actions
Actions

Also available in: Atom PDF