【发布时间】:2016-08-12 14:27:32
【问题描述】:
我目前收到一条不寻常的错误消息,在我的 BDD 脚本运行期间,我通过命令行运行时收到以下响应:
Feature: As a user I want to purchase a mobile on a monthly plan
@ACQ_Test_01
Scenario: Buy a pay monthly phone
Given I am on the Store Homepage
When I click on the Mobile Phones roundel link
And I select a "Apple" "Iphone 6s"
-->And I select the "1GB+AYCE min" price plan<--
Then I can complete my order
1 scenario (1 undefined)
5 steps (1 skipped, 1 undefined, 3 passed)
0m0.130s
(箭头中的那个是在我的命令行中突出显示为未定义的那个)
但是,在我的 step_definitions 文件夹下的 .rb 脚本中,我有以下内容:
Given (/^I am on the Store Homepage$/) do
**CONTENT-HERE**
end
When (/^I click on the Mobile Phones roundel link$/) do
**CONTENT-HERE**
end
When (/^I select a "Apple" "Iphone 6s"$/) do
**CONTENT-HERE**
end
When (/^I select the "1GB+AYCE min" price plan$/) do
**CONTENT-HERE**
end
Then (/^I can complete my order$/) do
**CONTENT-HERE**
end
我不知道为什么这个黄瓜脚本错过了一步,但这让我很生气。有人可以帮忙吗?
编辑:在后面,如果有人也能回答为什么它没有向我显示它所期望的 sn-ps,那就太好了。
【问题讨论】: