首页 > 解决方案 > 使用标签在黄瓜场景中设置优先级

问题描述

我正在尝试按顺序执行黄瓜场景。我有多个具有不同区域的功能文件,并希望根据以下优先级执行我的场景。

功能文件:1

  @IE  priority=1
  Scenario: A new user can place a Contact Lens order with WorldPay
    Given the Guest user trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket

  @IE  priority=2
  Scenario: A returning customer can place a express order
    Given The returning customer trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket


  @IE  priority=3
  Scenario: A returning customer can place an order 
    Given The returning customer trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket

功能文件:2

  @GB  priority=1
  Scenario: A new user can place a Contact Lens order with WorldPay
    Given the Guest user trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket

  @GB  priority=2
  Scenario: A returning customer can place a express order
    Given The returning customer trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket


  @GB  priority=3
  Scenario: A returning customer can place an order 
    Given The returning customer trying to buy a mobile phone
    When user pay using a card
    Then the product is added into the basket

我对黄瓜进行了同样的尝试,但无法按顺序执行。

标签: cucumbercucumber-java

解决方案


推荐阅读