Skip to content

Commit 23b12b0

Browse files
committed
Test that tests skipped due to a failure do not initiate exit-on-failure.
Also avoid using deprecated --critical option.
1 parent 2901ed7 commit 23b12b0

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

atest/robot/cli/runner/exit_on_failure.robot

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*** Settings ***
22
Suite Setup Run Tests
3-
... --exitonfailure --critical critical
3+
... --exitonfailure --skiponfailure skip-on-failure
44
... cli/runner/exit_on_failure.robot misc/suites running/fatal_exception/02__irrelevant.robot
55
Resource atest_resource.robot
66

@@ -12,9 +12,12 @@ Passing tests do not initiate exit-on-failure
1212
Check Test Case Passing
1313
Check Test Case Passing tests do not initiate exit-on-failure
1414

15+
Skip-on-failure tests do not initiate exit-on-failure
16+
Check Test Case Skipped on failure
17+
1518
Failing tests initiate exit-on-failure
1619
Check Test Case Failing
17-
Test Should Have Been Skipped Skipped
20+
Test Should Have Been Skipped Not executed
1821

1922
Tests in subsequent suites are skipped
2023
Test Should Have Been Skipped SubSuite1 First
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
*** Settings ***
2-
Default Tags critical
3-
41
*** Test Cases ***
52
Passing
63
No Operation
74

85
Passing tests do not initiate exit-on-failure
96
No Operation
107

8+
Skipped on failure
9+
[Documentation] SKIP
10+
... Test failed but its tags matched '--SkipOnFailure' and it was marked skipped.
11+
...
12+
... Original failure:
13+
... Does not initiate exit-on-failure
14+
[Tags] skip-on-failure
15+
Fail Does not initiate exit-on-failure
16+
1117
Failing
12-
[Documentation] FAIL initiates exit-on-failure
13-
Fail initiates exit-on-failure
18+
[Documentation] FAIL Initiates exit-on-failure
19+
Fail Initiates exit-on-failure
1420

15-
Skipped
21+
Not executed
1622
Fail Not executed

0 commit comments

Comments
 (0)