Category: Data, Ubuntu, github

In this post, we are going to explore how to write data driven tests with Robot Framework. We will take a look at how data driven tests can be written with standard Robot Framework syntax and we will take a look at the Data Driver Library which offers some interesting features.

Of course, we can write separate test cases in order to accomplish this, but data driven tests will make this more concise, less error prone and more clear.

The data_driver.csv contains the data we want to be tested, the first line must contain the arguments to be used for calling the template keyword: We notice after test execution that for each data record in the CSV file, a test is being created and executed: The log.html file also contains this result and we can verify that the Setup, Teardown and the Template are invoked with the data from the CSV file.

We used the standard Robot Framework approach by using templates and we explored the Data Driver Library which offers some interesting functionality by decoupling the test script from the test data.

Related Articles