How to call list of variables from a resource file into Robot test?

rcubefather

I have 1000 URL names to send to robot test. So that I have planned to assign each URL to a variable called ${ URL1}, ${URL2}... etc. When I use this inside "test.robot" its working as expected. But When I call these variables from resource file I am getting "resources.txt' is empty" error as shown in below logs.

[ WARN ] Imported resource file 'C:\Users\test\Desktop\IMPORTANT - Robot Fram
work - Final Project Data\URL\resources.txt' is empty.
==============================================================================
Url based apps test suite
==============================================================================
testcase1                                                             | FAIL |
Variable '${URL1}' not found.
------------------------------------------------------------------------------
testcase2                                                             | FAIL |
Variable '${URL2}' not found.
------------------------------------------------------------------------------
Url based apps test suite                                             | FAIL |
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================

resources.txt contents:

${URL1}     http://www.4shared.com/
${URL2}     http://depositfiles.com/
${URL3}     https://www.gmail.com/

test.robot settings content:

*** Settings ***

Library         Selenium2Library
Library         SSHLibrary
Suite Teardown  Close All Browsers
Resource        resources.txt

Please help to me fix this issue.

Thanks in advance

Laurent Bristiel

Your resources.txt should start with the "variables" header:

*** Variables ***
${URL1}     http://www.4shared.com/
${URL2}     http://depositfiles.com/
${URL3}     https://www.gmail.com/

See Resource file structure in the User Guide: "The higher-level structure of resource files is the same as that of test case files otherwise".

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to list all keywords from a .robot file which have no test cases

From Dev

Pass variables from python file to robot framework variables

From Dev

Robot framework resource file not found

From Dev

How to correctly call variables from a txt file into my python code?

From Dev

How to test if some file exists as JSF resource

From Dev

How to feed a list of lists as an argument into a Robot Framework Test Template

From Dev

How to run test cases using robot framework jar file?

From Dev

How to get file from resource folder as File?

From Dev

How to get file from resource folder as File?

From Dev

How do you call variables put into a text file from a batch into a batch file?

From Dev

How to extract variables from log file path, test log file name for pattern in Logstash?

From Dev

How to extract variables from log file path, test log file name for pattern in Logstash?

From Dev

Import Resource - File does not exist (Robot Framework)

From Dev

Pass variables from one test case to another in Robot framework (Global variable)

From Dev

Load resource/file from test/resources using Spring

From Dev

How to load values into an array list from a resource

From Dev

How to load values into an array list from a resource

From Dev

How to call a function from a list?

From Dev

How to make elements of the list by robot framework in RED appears in autocomplete when we call the list?

From Dev

How can I call variables and strings together from a json file in Python?

From Dev

How to access resource files from jar file

From Dev

How to add a .qss file from resource

From Dev

how to remove empty lines from a file in Robot framework

From Dev

Run a script on variables from a list file

From Dev

How to run specific test cases from a test suite using Robot Framework

From Dev

Robot Framework : How to know whether a test library function is being executed from setup/test/teardown

From Dev

get file list in android raw resource directory from code

From Dev

How can I call a Chef resource from an HWRP?

From Dev

How can I call a Chef resource from an HWRP?

Related Related

  1. 1

    How to list all keywords from a .robot file which have no test cases

  2. 2

    Pass variables from python file to robot framework variables

  3. 3

    Robot framework resource file not found

  4. 4

    How to correctly call variables from a txt file into my python code?

  5. 5

    How to test if some file exists as JSF resource

  6. 6

    How to feed a list of lists as an argument into a Robot Framework Test Template

  7. 7

    How to run test cases using robot framework jar file?

  8. 8

    How to get file from resource folder as File?

  9. 9

    How to get file from resource folder as File?

  10. 10

    How do you call variables put into a text file from a batch into a batch file?

  11. 11

    How to extract variables from log file path, test log file name for pattern in Logstash?

  12. 12

    How to extract variables from log file path, test log file name for pattern in Logstash?

  13. 13

    Import Resource - File does not exist (Robot Framework)

  14. 14

    Pass variables from one test case to another in Robot framework (Global variable)

  15. 15

    Load resource/file from test/resources using Spring

  16. 16

    How to load values into an array list from a resource

  17. 17

    How to load values into an array list from a resource

  18. 18

    How to call a function from a list?

  19. 19

    How to make elements of the list by robot framework in RED appears in autocomplete when we call the list?

  20. 20

    How can I call variables and strings together from a json file in Python?

  21. 21

    How to access resource files from jar file

  22. 22

    How to add a .qss file from resource

  23. 23

    how to remove empty lines from a file in Robot framework

  24. 24

    Run a script on variables from a list file

  25. 25

    How to run specific test cases from a test suite using Robot Framework

  26. 26

    Robot Framework : How to know whether a test library function is being executed from setup/test/teardown

  27. 27

    get file list in android raw resource directory from code

  28. 28

    How can I call a Chef resource from an HWRP?

  29. 29

    How can I call a Chef resource from an HWRP?

HotTag

Archive