1

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
1

1 Answer 1

2

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

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.