A Data Driven framework for RESTFUL API Testing using Robot Framework.
p.s. - Also added a simple selenium test script (cargo.robot)
Put all your Test Cases inside the test_data.xlsx
file.
- Python3
- Go to the project root
- run the command
pip install -r requirement.txt
as Admininstrator or root.
- run the command
robot test_scripts/data_driven_tests.robot
- make the
${DEBUG MODE}
variable as'Y'
in the test script file. - for all the tests where you need to run, ust mention
${debug_flag}
row value as'Y'
intest_data.xlsx
file
All the fiels are self explanatory
- for
${req_body}
give the expected json (if any) - for validating the response body value, given new line separated nested key names. for example,
Assume this is the reponse json.
"name": "morpheus", "job": { "title": "leader" } }"
and you want to validate values of 'name' and 'job.title' keys, Give the data as.
['name']=morpheus
['job']['title']=leader