0
votes

I have 2 Testcases within a Robot suite. This suite is like the Initialization Suite which has a dependency on an underlying framework(UF).

UF has different folder structure for the main Initialization Suite, Functional Suites and few other tools and calls them with separate robot commands. So I cannot store variables with Set Global Variables during initialization but have to create resource files which I will import in Functional Suites.

TC1: Parses a json file and creates a variables.txt file.

TC2: Uses few variables stored in variables.txt and logs into server the gets the node details and stores in hostname.txt

  • Is there a way to import/source the variables.txt within TC2 ?
  • Looking for this implementation, as there are Common User Keywords(CUKW) which will also need this variables.txt. As this is dynamically generated I cannot define it as Resource in Settings section in CUKW.

New to Robot framework, Apologies for any misunderstanding. Any better implementation suggestions are most welcome.

Thanks in Advance!

1

1 Answers

1
votes

You can use the import resource keyword.

Imports a resource file with the given path.

Resources imported with this keyword are set into the test suite scope similarly when importing them in the Setting table using the Resource setting.