2012-09-21 52 views
0

我可以分成兩部分,一個BDD測試場景:這是編寫BDD測試場景的正確方法嗎?

要求:

如果預訂是沒有資格辦理登機手續,然後顯示以下信息: '成功, 一旦確定,選擇顯示BP。

測試場景:

背景:

GIVEN我已經選中在 和我在網上

方案概要:* - 回程航班不符合BP頁

GIVEN I am on the 'D' Page 
    WHEN i select the 'YES' selection tab 
    THEN the following message is displayed ‘ Success, <Pax Name> ' 

    GIVEN i have selected 'YES' on the D Page 
    WHEN i select 'OK' on the displayed message 
    THEN the BP page is displayed 

另外:

要求:

包括選擇選項卡是是&否允許用戶確認他們是乘客。 (默認突出顯示爲是) a。是 - 如果選擇將xxxxx b。否 - 如果選擇將返回用戶AAAAAAAAA

背景:

GIVEN我已經選中在 和我在網上

GIVEN我對「d」頁面 那麼頁面應該有一個「是」 &「否」,選擇標籤 和「YES」選擇標籤被突出顯示

GIVEN我對「d」頁 當我選擇了「否」的選擇選項卡 然後我回到了檢入頁

回答

0

您可以隨時混合和匹配步驟。 例如,第一種情景可以按如下方式完成:

Scenario: Return Flight is NOT eligible for BP page 
    GIVEN I am on the 'D' Page 
    WHEN i select the 'YES' selection tab 
    THEN the following message is displayed ‘ Success, <Pax Name> ' 
    WHEN i select 'OK' on the displayed message 
    THEN the BP page is displayed 
相關問題