You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests that are not run due to earlier fatal error should get SKIP status, not FAIL #4170
With the implementation of SKIP status, it makes more sense to mark Test Cases that were not even started as SKIP instead of FAIL
As @pekkaklarck mentioned on slack it would be good to implement this for all ways to gracefully stop execution like
Fatal Error keyword
--exitonfailure
Yeah, SKIP is a much better status than FAIL with tests that aren't run due to an earlier fatal error. In additions to things already listed in the description, also stopping with signals (incl. pressing Ctrl-C) works this way. Ought to be easy to change, probably updating tests is much more work.
changed the title [-]BuiltIn.Fatal Error should mark skipped test cases as SKIP, not FAIL[/-][+]Tests that are not run due to earlier fatal error should get SKIP status, not FAIL[/+]on Dec 15, 2021
When using the --dotted console mode, we actually already now use x on console instead of F with these failures to separate the "real" failure from others. If using SKIP, not FAIL, there would be no need for that functionality anymore.
How to handle --exitonerror (#1807) turned out to be a bit tricky:
If there's a parsing error (e.g. an invalid setting) no tests are run and all are marked skipped. The whole execution getting SKIP status isn't good.
If there's an import error, all tests in that executed suite and in subsequent suites are skipped. If that was the first suite, all tests are skipped and the overall status is SKIP like with parsing errors. If, on the other hand, a suite has been executed successfully before, overall status is PASS which is even worse because lot of tests were skipped and the reason for skipping was an error.
I'm actually not sure what's the best way to handle this. With import errors we possibly could FAIL all tests in that suite and SKIP tests in subsequent suites. With parsing errors this is trickier. Ideally we should mark tests in the suite containing the parsing error FAILed but that can be hard. Possibly just the fist executed test, regardless did that suite contain errors, could get FAIL status.
Need to also handle a situation where a fatal error occurs in suite setup specially. Tests in that suite should get FAIL status, not SKIP. Tests in subsequent suite should get SKIP.
This would be nice enhancement but due to the problems caused by --exitonerror this is too big task for RF 5.0. The best way to handle those problems would probably be making errors in data more severe so that, for example, all tests in a suite would fail if there's a failing import or an invalid setting.
Making errors more severe would somewhat badly backwards incompatible. Doing it in RF 5.1 may thus not be safe but I initially assign this to that release anyway.
One way to handle --exitonerror with parsing errors would be not running anything. Currently, if you run robot --exitonerror tests.robot and the file contains, for example, an invalid setting, the suite is run and all tests are failed due to the error. We could, instead, decide not to run anything and just report the error. That's the same approach we use normally when you try to run a non-existing file or a file that doesn't contain any tests.
Even after this change, we still needed to handle, for example, failed library imports properly when --exitonerror is used, but that could be handle same way as a failed suite setup.
Activity
pekkaklarck commentedon Dec 15, 2021
Yeah, SKIP is a much better status than FAIL with tests that aren't run due to an earlier fatal error. In additions to things already listed in the description, also stopping with signals (incl. pressing Ctrl-C) works this way. Ought to be easy to change, probably updating tests is much more work.
[-]BuiltIn.Fatal Error should mark skipped test cases as SKIP, not FAIL[/-][+]Tests that are not run due to earlier fatal error should get SKIP status, not FAIL[/+]pekkaklarck commentedon Dec 15, 2021
When using the
--dottedconsole mode, we actually already now usexon console instead ofFwith these failures to separate the "real" failure from others. If using SKIP, not FAIL, there would be no need for that functionality anymore.pekkaklarck commentedon Dec 15, 2021
How to handle
--exitonerror(#1807) turned out to be a bit tricky:I'm actually not sure what's the best way to handle this. With import errors we possibly could FAIL all tests in that suite and SKIP tests in subsequent suites. With parsing errors this is trickier. Ideally we should mark tests in the suite containing the parsing error FAILed but that can be hard. Possibly just the fist executed test, regardless did that suite contain errors, could get FAIL status.
pekkaklarck commentedon Dec 15, 2021
Need to also handle a situation where a fatal error occurs in suite setup specially. Tests in that suite should get FAIL status, not SKIP. Tests in subsequent suite should get SKIP.
pekkaklarck commentedon Jan 19, 2022
This would be nice enhancement but due to the problems caused by
--exitonerrorthis is too big task for RF 5.0. The best way to handle those problems would probably be making errors in data more severe so that, for example, all tests in a suite would fail if there's a failing import or an invalid setting.Making errors more severe would somewhat badly backwards incompatible. Doing it in RF 5.1 may thus not be safe but I initially assign this to that release anyway.
pekkaklarck commentedon Oct 12, 2022
One way to handle
--exitonerrorwith parsing errors would be not running anything. Currently, if you runrobot --exitonerror tests.robotand the file contains, for example, an invalid setting, the suite is run and all tests are failed due to the error. We could, instead, decide not to run anything and just report the error. That's the same approach we use normally when you try to run a non-existing file or a file that doesn't contain any tests.Even after this change, we still needed to handle, for example, failed library imports properly when
--exitonerroris used, but that could be handle same way as a failed suite setup.pekkaklarck commentedon Jan 16, 2023
This change would change test statuses which can cause backwards compatibility problems. It's safer to do it in RF 7.0.
rikerfi commentedon Mar 16, 2023
If I use
prerebotmodifier, am I able to separate/detect this SKIP from e.g. usage ofSkipkeyword?