在一個功能文件中有一個Background和幾個場景,但現在需要一個與不需要運行後臺邏輯的相同功能相關的場景,可以僅爲一個場景禁用?BDD - Cucumber:可以禁用功能中僅一個場景的後臺邏輯?
更新 - 添加實例:
Feature: Sign Up
In order to access to protected parts of site
A user
Should sign up
Background:
Given I am on sign up page
And I am not logged in
Scenario: User sign up succesfully
When I sign up with valid fields
Then I should view dashboard page
Scenario: User altredy sign up
When I sign up with altredy registred user e-mail
Then I should view altredy sign up message and link to forgot password page
Scenario: User try to sign up with missing/wrong data
When I will try to sign up with missing/wrong data
Then I should error message
Scenario: User altredy sign in
#here disable background
Given I am logged in
When I am on sign up page
Then i should be redirect to dashboard page
遺憾的是沒有必要。 – p0deje 2012-03-28 12:39:45
幸運沒有。 – iafonov 2012-03-29 10:54:34
@iafonov爲什麼?已經添加了一個思想有用的片段... – byterussian 2012-03-29 21:50:51