I am working on Robot Framework for mobile App Automation. I have written test cases and keywords in Test Suit in Robot Framework and i can execute it. But i am trying to have test cases written in CSV OR Excel file which will be the input to Robot Framework (like we do in Test Complete). How we can write test cases in CSV/Excel file [looking for format] which is readable by Robot-framework and how we execute these test cases in Robot by reading the CSV file.Please help [Note : For now i can just read the CSV file and log the data.But its not executing cases on mobile]
Can we write test cases in CSV OR Excel file in Robot Framework and execute just by reading CSV file
-
In order to help you with your technical issue can you share a minimal reproducible example with us by an edit of your question? That way we can specify our answers to your particular situation.A. Kootstra– A. Kootstra2018-01-25 16:11:29 +00:00Commented Jan 25, 2018 at 16:11
-
In robot Framework we can write test cases under Test Suite. But i want to write test case in Excel file having different sheets(Grouping test cases in different sheets as per module) and then use those Excel file in Robot Framework as Test Cases.Can we write test cases in Excel file ?So that it will be easy for any user to write test cases and track it just by looking into excel sheets. How i can ready data from these excel file as test cases in robot framwork and exeucte it ?Pooja– Pooja2018-01-29 10:27:50 +00:00Commented Jan 29, 2018 at 10:27
1 Answer
Data-driven cases like Robot Framework' Template ones, where the actual test data is fed from an external csv or Excel file?
Regretfully that is not possible at present, due to the way RF parses the source test files and constructs its internal objects.
Rougly put, at the time of parsing it stores the current state ("the text") of the [Template] case and substitutes keywords with methods etc., constructing the set of the actual cases to be ran, at this very moment. If the test data is to be loaded later on - "injected in the run", it will change the number of cases which is far from trivial at this stage.
I do see value in a library/extension for this - for example to "outsource" the cases to PMs/developers ;), but don't think there is one right now.