Cucumber with Serenity does not execute all scenarios with the same tags name

189 Views Asked by At

I'm using cucumber with serenity and want to execute 2 test scenarios with the same tag name. However, it just only run the first one. Could you please have a look?

Cucumber class

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(glue = {"vn.auto", "cucumber.hook"}, features = "src/main/features", tags = {"@mytag"}, plugin = {"pretty"})
public class AppTest {
}

Test scenario:

@mytag
  Scenario: TEST 1
    Given User go to url "https://google.com/"
    When User search with text "selenium"
    Then BNPL - User should see text "Selenium"

  @mytag
  Scenario: TEST 2
    Given User go to url "https://google.com/"
    When User search with text "cucumber"
    Then BNPL - User should see text "Cucumber"

Maven goal:

clean verify serenity:aggregate "-Dcucumber.options=--tags @mytag"

After running maven, the test only executes "TEST 1" but not "TEST 2"

0

There are 0 best solutions below