Set priority in cucumber scenarios by using tags

Viewed 1638

I am trying to execute the cucumber scenario's in sequential order. I have multiple feature files with different regions and want to execute my scenarios based on priority as per below.

feature file: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

feature file: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

I have tried the same with cucumber but unable to execute it in sequential order.

0 Answers
Related