带有黄瓜代码的硒的输出令人困惑

时间:2019-06-12 10:15:32

标签: java selenium cucumber

当我在Eclipse中运行此代码时, 在控制台选项卡下显示: 0个场景0个步骤0m0.000s

在junit选项卡下显示: enter image description here

测试也应该通过失败?

TestRunner.java

@RunWith(Cucumber.class)
@CucumberOptions(features = "resources")
public class Runner {

}

stepDefinition.java

public class stepDefinition{

}

Test0.feature

Feature: This will test the following features :
        1) Login
        2) Logout  

Scenario: User successfully Logs in 
Given: When user is on login page 
When: user clicks on "Sign in" button 
And: user enters username and password
Then: Home page is displayed.

Scenario: User successfully Logs out 
Given: When user is on home page 
When: user clicks on his "avatar" icon 
And: user clicks on "log out" option from the drop down.
Then: Login page is displayed.

那么,为什么测试通过了?为什么在控制台中显示为0个场景? 请帮忙!

0 个答案:

没有答案