我有一些文档要上传。为此,我编写了一个方案。我需要多次运行相同的功能文件。如何多次运行功能文件?
答案 0 :(得分:0)
不是使用多个功能文件,而是使用方案大纲,该方案大纲将根据您提供给它的示例表多次执行同一方案
示例:
Scenario Outline: Create ABC
Given I open the application
When I enter username as <username>
And I enter password as <password>
Then I enter title as <title>
And press submit
Examples:
| username | password | title |
| Rob | xyz1 | title1 |
| Bob | xyz1 | title2 |
因此,在这种情况下,同一示例将运行2次,因为示例表包含2个数据,您可以添加尽可能多的数据表,黄瓜将执行该次数