@@ -106,9 +106,10 @@ def start_before_fixture(self, name):
106
106
fixture .name = name
107
107
108
108
def stop_before_fixture (self , attributes , messages ):
109
- self ._report_messages (messages )
109
+ status = attributes .get ('status' )
110
+ self ._report_messages (status , messages )
110
111
with self .lifecycle .update_before_fixture () as fixture :
111
- fixture .status = get_allure_status (attributes . get ( ' status' ) )
112
+ fixture .status = get_allure_status (status )
112
113
fixture .statusDetails = StatusDetails (message = self ._current_msg , trace = self ._current_tb )
113
114
self .lifecycle .stop_before_fixture ()
114
115
@@ -117,9 +118,10 @@ def start_after_fixture(self, name):
117
118
fixture .name = name
118
119
119
120
def stop_after_fixture (self , attributes , messages ):
120
- self ._report_messages (messages )
121
+ status = attributes .get ('status' )
122
+ self ._report_messages (status , messages )
121
123
with self .lifecycle .update_after_fixture () as fixture :
122
- fixture .status = get_allure_status (attributes . get ( ' status' ) )
124
+ fixture .status = get_allure_status (status )
123
125
fixture .statusDetails = StatusDetails (message = self ._current_msg , trace = self ._current_tb )
124
126
self .lifecycle .stop_after_fixture ()
125
127
@@ -136,7 +138,7 @@ def start_test(self, name, attributes):
136
138
container .children .append (uuid )
137
139
138
140
def stop_test (self , _ , attributes , messages ):
139
- self ._report_messages (messages )
141
+ self ._report_messages (attributes . get ( 'status' ), messages )
140
142
141
143
if 'skipped' in [tag .lower () for tag in attributes ['tags' ]]:
142
144
attributes ['status' ] = RobotStatus .SKIPPED
@@ -168,17 +170,21 @@ def start_keyword(self, name):
168
170
step .name = name
169
171
170
172
def stop_keyword (self , attributes , messages ):
171
- self ._report_messages (messages )
173
+ status = attributes .get ('status' )
174
+ self ._report_messages (status , messages )
172
175
with self .lifecycle .update_step () as step :
173
- step .status = get_allure_status (attributes . get ( ' status' ) )
176
+ step .status = get_allure_status (status )
174
177
step .parameters = get_allure_parameters (attributes .get ('args' ))
175
178
step .statusDetails = StatusDetails (message = self ._current_msg , trace = self ._current_tb )
176
179
self .lifecycle .stop_step ()
177
180
178
- def _report_messages (self , messages ):
181
+ def _report_messages (self , status , messages ):
179
182
has_trace = BuiltIn ().get_variable_value ("${LOG LEVEL}" ) in (RobotLogLevel .DEBUG , RobotLogLevel .TRACE )
180
183
attachment = ""
181
184
185
+ if status == RobotStatus .PASSED :
186
+ self ._current_tb , self ._current_msg = None , None
187
+
182
188
for message , next_message in zip_longest (messages , messages [1 :]):
183
189
name = message .get ('message' )
184
190
level = message .get ('level' )
0 commit comments