【问题标题】:Specflow Scenario Outline with multiple scenarios具有多个场景的 Specflow 场景大纲
【发布时间】:2018-03-10 08:28:36
【问题描述】:

我想知道是否有人让以下黄瓜与 specflow 一起工作。

Feature: testing different user types

Scenario Outline:Validate User RBAC 
Given I have a new User
And The new user can login <username> and <password>

Examples:
|username|password|
|xxxxxxxx|yyyyyyyy|


    Scenario:Test 1
       Then something 
    Scenario:Test 2
       Then something else
    Scenario:Test 3
       Then some other thing

我可以让情景大纲发挥作用。 但是,我想对不同的用户进行一系列测试,并且为每个测试创建不同的用户会减慢我的测试速度。

有这个例子,但我认为代码中可能有错误,对不起,如果我不正确。见:http://toolsqa.com/specflow/data-driven-testing-using-examples-keyword-in-specflow/

【问题讨论】:

    标签: specflow


    【解决方案1】:

    如果您想让不同的用户执行相同的场景,您必须为每个用户使用场景大纲并在示例表中定义它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-23
      • 2014-10-12
      • 2021-04-29
      • 2019-12-15
      • 1970-01-01
      • 2020-03-10
      • 1970-01-01
      • 2015-01-29
      相关资源
      最近更新 更多