reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 32 forks source link

Calling method 'start_test' of listener 'robotframework_reportportal.listener' failed: KeyError: 'critical' #88

Closed rdagum closed 3 years ago

rdagum commented 3 years ago

RobotFramework 4 removed the critical/non-critical functionality from tests and that's causing the listener to fail.

[ ERROR ] Calling method 'start_test' of listener 'robotframework_reportportal.listener' failed: KeyError: 'critical' [ ERROR ] Calling method 'end_test' of listener 'robotframework_reportportal.listener' failed: KeyError: 'critical' Admin Navigates To Calendars Page | PASS |

rdagum commented 3 years ago

I believe the problems are on these lines: https://github.com/reportportal/agent-Python-RobotFramework/blob/4ef8e7f09353466a6147a27f1f6eeccc8590895a/robotframework_reportportal/model.py#L33

https://github.com/reportportal/agent-Python-RobotFramework/blob/4ef8e7f09353466a6147a27f1f6eeccc8590895a/robotframework_reportportal/result_visitor.py#L71

https://github.com/reportportal/agent-Python-RobotFramework/blob/4ef8e7f09353466a6147a27f1f6eeccc8590895a/robotframework_reportportal/result_visitor.py#L86

iivanou commented 3 years ago

@rdagum The problem is only at line 33 of the model.py. Can you try changes from #89? Thanks.

rdagum commented 3 years ago

Information is flowing better now but I got this error in the console (not sure what the impact is in the result): image

And I also noticed that Suite Setup / Teardowns are shown as "Test" in method type:

image

rdagum commented 3 years ago

It looks like the error is caused because RF4 now reports steps that were not executed when there's a failure.

iivanou commented 3 years ago

@rdagum, I've updated PR. Everything seems running smoothly on my side. Can you confirm that?

And I also noticed that Suite Setup / Teardowns are shown as "Test" in method type Your suite structure depth is greater than 2 that is the maximum depth allowed by Report Portal. See this picture. All items which exceed that limit will be considered to be tests or steps.

rdagum commented 3 years ago

Everything looks good now. Thanks for clarifying about the suite depth. Not a big deal as the total number of tests is correct.