In Robot Framework, how to perform data-driven testing by creating a separate test case for each line of data in a text file?

前端 未结 3 1458
温柔的废话
温柔的废话 2021-01-13 15:46

In Robot Framework, we can use Test Template to perform data-driven testing. However, in this method, the number of test cases are fixed. We are not able to add new test cas

3条回答
  •  灰色年华
    2021-01-13 16:41

    There is no way to directly do what you want. What you could do instead is write a script that reads your data file and auto-generates a robot test suite based on that data. The script that you use to run your tests could first run this other script to create the test file before running it.

    You could also create the test suite via a suite setup, though I don't think I recommend doing it that way, as I don't think there's anything to gain and it makes your suite more complex.

提交回复
热议问题