Project

General

Profile

Actions

action #112319

open

Better and earlier checks of test code against "wrong API usage"

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

Status:
New
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2022-06-13
Due date:
% Done:

0%

Estimated time:

Description

Motivation

https://openqa.suse.de/tests/8945569#step/firefox_nss/36 failed with

# Test died: Odd name/value argument for subroutine 'testapi::assert_and_click' at sle/tests/fips/mozilla_nss/firefox_nss.pm line 173.
    testapi::assert_and_click("firefox-enter-password-OK", 120) called at sle/tests/fips/mozilla_nss/firefox_nss.pm line 173

as the code was actually using wrong format with assert_and_click('foo', 42) but we enforced the correct usage with https://github.com/os-autoinst/os-autoinst/pull/2078 with signatures. There is no doubt that the usage is wrong and likely the best approach if people ignore the warnings is to actually fail the tests with an error but why so late during the execution for the test for "obviously" wrong code? Can we find a better and especially earlier check of wrong test code or wrong API usage in test code?


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #99663: Use more perl signatures - os-autoinst size:MResolvedokurz2021-10-01

Actions
Actions

Also available in: Atom PDF