I have an RF suite setup as follows:
Suite_folder
|- __init__.robot
|-
-Resources
| |-myresources.robot
|-test_cases1.robot
|-test_cases2.robot
I intialise some suite variables in init.robot as follows:
*** Settings ***
...
Suite Setup Prepare Test Run
*** Variables ***
@{KC_Access_Tokens} # List that will contain the tokens needed for the suite
@{KC_Tokens_Claims} # List that will contain the claims for all the tokens
*** Keywords ***
Prepare Test Run
set suite variable @{KC_Access_Tokens} token1 token2 token3
set suite variable @{KC_Tokens_Claims} claim1 claim2 claim3
When I run the suite, Prepare Test Run executes and I can see that the two lists are initialised correctly. However, both lists are empty when I try to use the inside a test case. E.g. if I check their value in test_cases1.robot:
*** Keywords ***
Prepare Test Run
log ${KC_Access_Tokens}
log ${KC_Tokens_Claims}
KC_Access_Tokens and KC_Tokens_Claims are reported empty.
Is it not possible to initialise suite variables inside init.robot?