Given _ , When _ , Then _  And _,

Scenario: The name of the scenario
Given an initial condition
When something happens
Then this is the result

Scenario: The name of the scenario
Given an initial condition
And another condition
When something happens
And something else happens
Then this is the result
And this is also the result

Scenario: Order a Cheque Book
Given the account is in credit
And the user has been authenticated
And the user's address is available
When the user clicks on 'order a cheque book'
Then send cheque book to user

Scenario: Order a Cheque Book, no address available
Given the account is in credit
And the user has been authenticated
And the the bank does not have complete user address details
When the user clicks on 'order a cheque book'
Then ask user for complete their address


Scenario: Order a Cheque Book, user is overdrawn
Given the account is overdrawn
And the user has been authenticated
When the user clicks on 'order a cheque book'
Then refuse to send user a cheque book
Once you have your scenarios they can be added to your story card. For example:

Title: Order Cheque Book
As a customer
I want to access my online account
So that I can order a new cheque book

Scenario: Order a Cheque Book
Given the account is in credit
And the user has been authenticated
And the user's address is available
When the user clicks on 'order a cheque book'
Then send cheque book to user

Scenario: Order a Cheque Book, no address available
Given the account is in credit
And the user has been authenticated
And the the bank does not have complete user address details
When the user clicks on 'order a cheque book'
Then ask user to complete address

Scenario: Order a Cheque Book, user is overdrawn
Given the account is overdrawn
And the user has been authenticated
When the user clicks on 'order a cheque book'
Then refuse to send user a cheque book


Title: Order Cheque Book
As a customer
I want to access my online account
So that I can order a new cheque book

Scenario: Order a Cheque Book
Given the balance of the account is 200
And the account number is 12345
And the user has been authenticated
And the user's address is 15 Credibility Street
When the user clicks on 'order a cheque book'
Then reply YES to the user's request

Scenario: Order a Cheque Book, user is overdrawn
Given the balance of the account is -150
And the account number is 12345
And the user has been authenticated
When the user clicks on 'order a cheque book'
Then reply NO to the user's request

Scenario: Order a Cheque Book, zero account
Given the balance of the account is 0
And the account number is 12345
And the user has been authenticated
When the user clicks on 'order a cheque book'
Then reply NO to the user's request

Scenario: Order a Cheque Book, no address available
Given the balance of the account is 200
And the account number is 12345
And the user has been authenticated
And the the user's address is UNKNOWN
When the user clicks on 'order a cheque book'
Then reply NO_ADDRESS to the user's request

arrow
arrow
    全站熱搜

    chuanstudio 發表在 痞客邦 留言(0) 人氣()