【问题标题】:How to make Gherkin style testcase as datadriven in Robot Framework?如何将 Gherkin 风格的测试用例作为 Robot Framework 中的数据驱动?
【发布时间】:2017-02-16 21:18:55
【问题描述】:

我在 Robot Framework 中有一个 Gherkin 风格的测试用例。例如:

*** Settings ***
Documentation     Tests Login to website

Resource          ../keywords/resources.txt
Test Teardown     Close Browser   

*** Variables ***
${user}         demo
${userpass}     demo

*** Test Cases ***
Scenario: Login as a valid user to website
    Given Browser is opened to home page
    When I log in as ${user} with ${userpass}
    Then I can see page after sign in and verify
    And I will logout

有什么方法可以为多组数据运行相同的测试用例?

【问题讨论】:

    标签: robotframework gherkin


    【解决方案1】:

    您应该能够简单地将您的测试用例转换为关键字,然后将该关键字与Test Template 功能一起使用。然后,您可以创建一整套排列。

    【讨论】:

      猜你喜欢
      • 2019-04-03
      • 2014-02-11
      • 2014-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-05
      • 2022-08-20
      • 1970-01-01
      相关资源
      最近更新 更多