robotframework-datadriver
robotframework-datadriver copied to clipboard
how to parse all .py files under a testcase dir and generate robot testcases dynamic using robotframework-datadriver lib
Hi all
I'm the first time to use datedirver testing mode, and I have used robot framework a few time.
my current requirements is not get testcases from csv/xsl file, I need to parse a special dir in local os:
/path/to/root/testcase/module1_name/feature1_name/feature_script1.py
/path/to/root/testcase/module2_name/feature2_name/feature_script2.py
workding dir should be: /path/to/root/testcase/
I want to parse the module_name
/feature_name
/script_name
and run it in robot framework testcase_name/tag/arguments.
in additional, I will run these .py script in my test device and get the response1 and continue run the same .py script using standand python3 command line lin linux PC and get the response2 compare the response1 and response2 and get the test result.
I will add the module_name
/feature_name
/script_name
to testcase tags as testdata, I need to run testcase with tag module_name
/feature_name
/script_name
I'm not familar with datadriver lib, and I also found an simple example with my_reader to Create Custom Reader
but I can't understand for generate TestCaseData() and how to use it in robot testcase file(get testcase data and use testcase data).