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
Copy file name to clipboardExpand all lines: atest/testdata/running/skip/skip.robot
+74-20Lines changed: 74 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,17 @@ Skip with Library Keyword
18
18
Skip If Keyword with True Condition
19
19
[Documentation] SKIP 1 == 1
20
20
Skip If 1 == 1
21
+
Fail Should not be executed!
21
22
22
23
Skip If Keyword with True Condition And Custom Message
23
24
[Documentation] SKIP Skipped with abandon.
24
25
Skip If 1 == 1 Skipped with abandon.
26
+
Fail Should not be executed!
25
27
26
28
Skip If Keyword with False Condition
27
-
[Documentation] FAIL AssertionError
29
+
[Documentation] FAIL Should be executed!
28
30
Skip If 1 == 2
29
-
Fail
31
+
Fail Should be executed!
30
32
31
33
Skip Keyword with Custom Message
32
34
[Documentation] SKIP Skipped due to reasons
@@ -54,7 +56,12 @@ Remaining teardown keywords aren't run after skip
54
56
[Teardown] Skip with keywords before and after
55
57
56
58
Skip in Teardown After Failure In Body
57
-
[Documentation] SKIP Skipped in teardown:\nTeardown skip\n\nEarlier message:\nFailure in body!
59
+
[Documentation] SKIP
60
+
... Skipped in teardown:
61
+
... Teardown skip
62
+
...
63
+
... Earlier message:
64
+
... Failure in body!
58
65
Fail Failure in body!
59
66
[Teardown] Skip Teardown skip
60
67
@@ -64,26 +71,62 @@ Teardown is executed after skip
64
71
[Teardown] Log Teardown is executed!
65
72
66
73
Fail in Teardown After Skip In Body
67
-
[Documentation] SKIP Skip in body\n\nAlso teardown failed:\nTeardown failed!
74
+
[Documentation] SKIP
75
+
... Skip in body
76
+
...
77
+
... Also teardown failed:
78
+
... Teardown failed!
68
79
Skip Skip in body
69
80
[Teardown] Fail Teardown failed!
70
81
71
82
Skip in Teardown After Skip In Body
72
-
[Documentation] SKIP Skipped in teardown:\nTeardown skip\n\nEarlier message:\nSkip in body
83
+
[Documentation] SKIP
84
+
... Skipped in teardown:
85
+
... Teardown skip
86
+
...
87
+
... Earlier message:
88
+
... Skip in body
73
89
Skip Skip in body
74
90
[Teardown] Skip Teardown skip
75
91
76
-
Skip with Continuable Failures
77
-
[Documentation] SKIP Skipping should stop execution but test should still fail\n\nAlso failures occurred\n\n1) We can continue!\n\n2) We can continue again!
92
+
Skip with Continuable Failure
93
+
[Documentation] SKIP
94
+
... Skipping should stop execution but test should still fail
95
+
...
96
+
... Also failure occurred:
97
+
... We can continue!
98
+
Run Keyword And Continue On Failure
99
+
... Fail We can continue!
100
+
Skip Skipping should stop execution but test should still fail
101
+
Fail Should not be executed!
102
+
103
+
Skip with Multiple Continuable Failures
104
+
[Documentation] SKIP
105
+
... Skip after two failures
106
+
...
107
+
... Also failures occurred:
108
+
...
109
+
... 1) We can continue!
110
+
...
111
+
... 2) We can continue again!
78
112
Run Keyword And Continue On Failure
79
113
... Fail We can continue!
80
114
Run Keyword And Continue On Failure
81
115
... Fail We can continue again!
82
-
Skip Skipping should stop execution but test should still fail
116
+
Skip Skip after two failures
83
117
Fail Should not be executed!
84
118
85
119
Skip in Teardown After Continuable Failures
86
-
[Documentation] SKIP Skipped in teardown:\nTeardown skip\n\nEarlier message:\nSeveral failures occurred:\n\n1) We can continue!\n\n2) We can continue again!
120
+
[Documentation] SKIP
121
+
... Skipped in teardown:
122
+
... Teardown skip
123
+
...
124
+
... Earlier message:
125
+
... Several failures occurred:
126
+
...
127
+
... 1) We can continue!
128
+
...
129
+
... 2) We can continue again!
87
130
Run Keyword And Continue On Failure
88
131
... Fail We can continue!
89
132
Run Keyword And Continue On Failure
@@ -92,32 +135,43 @@ Skip in Teardown After Continuable Failures
92
135
93
136
Skip with Pass Execution in Teardown
94
137
[Documentation] SKIP Skip in body
95
-
[Teardown] Pass Execution Thou shall pass
96
-
Skip Skip in body
138
+
Skip Skip in body
139
+
[Teardown] Run Keywords
140
+
... Pass Execution Thou shall pass
141
+
... AND
142
+
... Fail Should not be executed!
97
143
98
144
Skip in Teardown with Pass Execution in Body
99
145
[Documentation] SKIP Then we skip
146
+
Pass Execution First we pass
100
147
[Teardown] Skip Then we skip
101
-
Pass Execution First we pass
102
148
103
149
Skipped with --skip
104
-
[Tags] skip-this
105
-
[Documentation] SKIP ${TEST_OR_TASK} skipped with --skip command line option.
150
+
[Documentation] SKIP ${TEST_OR_TASK} skipped with '--skip' command line option.
151
+
[Tags] skip-this
106
152
Fail
107
153
108
154
Skipped with --SkipOnFailure
109
-
[Tags] skip-on-failure
110
-
[Documentation] SKIP ${TEST_OR_TASK} skipped with --SkipOnFailure, original error:\nAssertionError
111
-
Fail
155
+
[Documentation] SKIP
156
+
... ${TEST_OR_TASK} failed but its tags matched '--SkipOnFailure' and it was marked skipped.
157
+
...
158
+
... Original failure:
159
+
... Ooops, we fail!
160
+
[Tags] skip-on-failure
161
+
Fail Ooops, we fail!
112
162
113
163
--NonCritical Is an Alias for --SkipOnFailure
114
-
[Tags] non-crit
115
-
[Documentation] SKIP ${TEST_OR_TASK} skipped with --SkipOnFailure, original error:\nAssertionError
164
+
[Documentation] SKIP
165
+
... ${TEST_OR_TASK} failed but its tags matched '--SkipOnFailure' and it was marked skipped.
166
+
...
167
+
... Original failure:
168
+
... AssertionError
169
+
[Tags] non-crit
116
170
Fail
117
171
118
172
--Critical can be used to override --SkipOnFailure
0 commit comments