Selenium 如何在cucumber框架中多次运行特征文件的2个标记

Selenium 如何在cucumber框架中多次运行特征文件的2个标记,selenium,automation,cucumber,bdd,Selenium,Automation,Cucumber,Bdd,我想运行我的功能文件的2个标记,在其中我正在做以下事情 登录网站 注销 我的功能文件是: @Login Scenario Outline: XYZ When Then And Examples: |id| |password| |x| |y| @logout Scenario:xyz And Then When 我想多次运行这两个标记 我的跑步者文件: @RunWith(Cucumber.class) @CucumberOptions(features="Features",ta

我想运行我的功能文件的2个标记,在其中我正在做以下事情

  • 登录网站
  • 注销
  • 我的功能文件是:

    @Login
    Scenario Outline: XYZ
    When
    Then
    And
    
    Examples:
    |id|  |password|
    |x|   |y|
    
    @logout
    Scenario:xyz
    And 
    Then 
    When
    
    我想多次运行这两个标记

    我的跑步者文件:

    @RunWith(Cucumber.class)
    @CucumberOptions(features="Features",tags = {"@Login,@logout"},glue={"stepdefinition"})
    

    使用场景大纲…我正在使用场景大纲,其中我给出了用户名和密码password@Grasshopper我想一次又一次地登录,然后多次注销。我刚刚看到了第二个场景,不是第一个。没问题,我怎么能@Grass做到呢