action #17462
closed
Testlib function record_info doesn't mark overall and category results as 'fail'
Added by thehejik about 7 years ago.
Updated about 7 years ago.
Category:
Feature requests
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
- Project changed from openQA Tests to openQA Project
- Category set to 132
- Assignee set to okurz
not currently working on this
- 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?
- Status changed from Feedback to Resolved
assuming you agree with the second approach for now
Also available in: Atom
PDF