I have a doubtful pleasure to work with legacy tests written in Robot Framework that abuse usage of global variables.
I would like all global variables to be dumped when the test fails.
How can I achieve that?
asked Feb 27, 2019 at 14:05
-
1Is this what you need? groups.google.com/forum/m/#!topic/robotframework-users/…Rsf– Rsf2019年02月27日 15:26:01 +00:00Commented Feb 27, 2019 at 15:26
1 Answer 1
You can call the built-in keyword Log Variables in a suite teardown or test teardown.
Here's an example that uses a suite teardown:
*** Settings ***
Suite Teardown log variables
*** Test cases ***
Test case 1
set global variable ${FOO} Hello
set global variable ${BAR} World
Fail
answered Feb 27, 2019 at 21:30