action #17462
closedTestlib function record_info doesn't mark overall and category results as 'fail'
0%
Description
How to reproduce:
Create a new file for test and put following:
use base "opensusebasetest";
use strict;
use testapi;
sub run() {
record_info('It failed!', 'Enter some text here', result => 'fail');
}
sub test_flags() {
return {important => 1};
}
1;call the file within main.pm and run the test.
You will see that corresponding box detail is correctly red/failed but overall and category result remained 'ok'.
Original PR lives at https://github.com/os-autoinst/os-autoinst/pull/716/files
Updated by okurz about 7 years ago
- Project changed from openQA Tests to openQA Project
- Category set to 132
- Assignee set to okurz
Updated by thehejik about 7 years ago
Possibly related also to https://openqa.suse.de/tests/834809 - test failed but overall result is PASSED :(
maybe record_resultfile function?
Updated by okurz about 7 years ago
- Status changed from New to Feedback
I checked the implementation and the documentation of 'record_info' as I defined it in testapi.pm. It behaves exactly like described there "meant for informational purposes". 'record_info' records one step like a "check_screen" or "script_run" which can also fail but does not fail the test. I see the following ways:
- add optional argument to record_info to softfail/fail the module and therefore influence the job result
- use additional explicit record_soft_fail or a fail call in the test where needed
@thehejik what do you think?
Updated by okurz about 7 years ago
- Status changed from Feedback to Resolved
assuming you agree with the second approach for now