You are on page 1of 7

Initial Functional Test Cases for Example ATM System

The following initial test cases can be identified early in the design process as a vehicle for checking that the implementation is basically correct. No attempt has been made at this point to do thorough testing, including all possible errors and boundary cases. That needs to come later. These cases represent an initial check that the functionality specified by the use cases is present. Some writers would argue for developing test cases like these in place of use cases. Here, they are presented as a vehicle for "fleshing out" the use cases, not as a substitute for them.
Use Case System Startup System Startup Function Being Tested System is started when the switch is turned "on" System accepts initial cash amount Initial System State System is off System is requesting cash amount System has just been turned on Input Expected Output

Activate the "on" System requests switch initial cash amount Enter a legitimate System is on amount System output Perform a should demonstrate legitimate inquiry that a connection transaction has been established to the Bank

System Startup

Connection to the bank is established System is shut down when the switch is turned "off" Connection to the Bank is terminated when the system is shut down System reads a customer's ATM card System rejects an unreadable card

System Shutdown

System is on and Activate the "off" not servicing a System is off switch customer Verify from the bank side that a connection to the ATM no longer exists Card is accepted; System asks for entry of PIN Card is ejected; System displays an error screen; System is ready to start a new session System displays a menu of transaction types

System Shutdown

System has just been shut down System is on and Insert a readable not servicing a card customer System is on and Insert an not servicing a unreadable card customer System is asking Enter a PIN for entry of PIN

Session

Session

Session

System accepts customer's PIN

Use Case System Startup

Function Being Tested System is started when the switch is turned "on"

Initial System State System is off

Input

Expected Output

Activate the "on" System requests switch initial cash amount System asks whether customer wants another transaction System displays a menu of transaction types

Session

System is System allows displaying menu Perform a customer to perform of transaction transaction a transaction types System allows multiple transactions in one session Session ends when customer chooses not to do another transaction System is asking whether customer wants Answer yes another transaction System is asking whether customer wants Answer no another transaction

Session

Session

System ejects card and is ready to start a new session

Individual types of Transaction transaction will be tested below System handles an Transaction invalid PIN properly System asks customer to choose Withdrawal an account to withdraw from Enter an incorrect The Invalid PIN A readable card PIN and then Extension is has been entered attempt a performed transaction Menu of Choose transaction types Withdrawal is being transaction displayed System displays a menu of account types

System asks Menu of account System displays a customer to choose Choose checking Withdrawal types is being menu of possible a dollar amount to account displayed withdrawal amounts withdraw System dispenses this amount of cash; System prints a correct receipt showing amount and correct updated balance; System records transaction correctly in the log (showing both message to the bank and approval

System is System performs a displaying the legitimate Withdrawal menu of withdrawal withdrawal transaction properly amounts

Choose an amount that the system currently has and which is not greater than the account balance

Use Case System Startup

Function Being Tested System is started when the switch is turned "on"

Initial System State System is off

Input

Expected Output

Activate the "on" System requests switch initial cash amount back)

System has been started up with less than the maximum System verifies that withdrawal it has sufficient cash Withdrawal amount in cash on hand to fulfill the on hand; request System is requesting a withdrawal amount System verifies that customer's balance Withdrawal is sufficient to fulfill the request System is requesting a withdrawal ammount

Choose an amount greater than what the system currently has

System displays an appropriate message and asks customer to choose a different amount

Choose an amount that the system currently has but which is greater than the account balance

System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays a menu of account types

A withdrawal transaction can be cancelled by the Withdrawal customer any time prior to choosing the dollar amount A withdrawal transaction can be cancelled by the Withdrawal customer any time prior to choosing the dollar amount System asks customer to choose an account to deposit to System asks customer to enter a dollar amount to deposit

System is Press "Cancel" displaying menu key of account types

System is displaying menu Press "Cancel" of dollar key amounts Menu of transaction types Choose Deposit is being transaction displayed

Deposit

Deposit

System displays a Menu of account Choose checking request for the types is being account customer to type a displayed dollar amount

Use Case System Startup

Function Being Tested System is started when the switch is turned "on" System asks customer to insert an envelope

Initial System State System is off

Input

Expected Output

Activate the "on" System requests switch initial cash amount

Deposit

System is displaying a System requests that Enter a legitimate request for the customer insert an dollar amount customer to type envelope a dollar amount System accepts envelope; System prints a correct receipt showing amount and correct updated balance; Insert an envelope System records transaction correctly in the log (showing message to the bank, approval back, and acceptance of the envelope) System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message

Deposit

System is System performs a requesting that legitimate deposit customer insert transaction properly an envelope

Deposit

A deposit transaction can be System is cancelled by the Press "Cancel" displaying menu customer any time key of account types prior to inserting an envelope A deposit transaction can be cancelled by the customer any time prior to inserting an envelope A deposit transaction can be cancelled by the customer any time prior to inserting an envelope A deposit transaction is

Deposit

System is requesting Press "Cancel" customer to enter key a dollar amount

Deposit

System is requesting customer to insert an envelope System is requesting

Press "Cancel" key

Deposit

Wait for the request to time

Use Case System Startup

Function Being Tested System is started when the switch is turned "on" cancelled automatically if an envelope is not inserted within a reasonable time

Initial System State System is off customer to insert an envelope

Input

Expected Output

Activate the "on" System requests switch initial cash amount out and offers customer the option of choosing to do another transaction or not. System displays a menu of account types specifying transfer from System displays a menu of account types specifying transfer to System displays a request for the customer to type a dollar amount

Transfer

System asks customer to choose an account to transfer from System asks customer to choose an account to transfer to System asks customer to enter a dollar amount to transfer

Menu of transaction types Choose Transfer is being transaction displayed Menu of account types to transfer Choose checking from is being account displayed Menu of account types to transfer Choose savings to is being account displayed

Transfer

Transfer

Transfer

System prints a correct receipt showing amount and System is correct updated System performs a displaying a balance; Enter a legitimate legitimate transfer request for the System records dollar amount transaction properly customer to type transaction correctly a dollar amount in the log (showing both message to the bank and approval back) A transfer transaction can be cancelled by the customer any time prior to entering dollar amount A transfer transaction can be cancelled by the customer any time prior to entering dollar amount System is displaying menu Press "Cancel" of account types key specifying transfer from System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays an appropriate message and offers customer the option of choosing to do another transaction or not.

Transfer

Transfer

System is displaying menu Press "Cancel" of account types key specifying transfer to

Use Case System Startup

Function Being Tested System is started when the switch is turned "on" A transfer transaction can be cancelled by the customer any time prior to entering dollar amount System asks customer to choose an account to inquire about

Initial System State System is off

Input

Expected Output

Activate the "on" System requests switch initial cash amount System displays an appropriate message and offers customer the option of choosing to do another transaction or not. System displays a menu of account types

Transfer

System is requesting Press "Cancel" customer to enter key a dollar amount Menu of transaction types Choose Inquiry is being transaction displayed

Inquiry

Inquiry

System prints a correct receipt showing correct balance; System performs a System is Choose checking System records legitimate inquiry displaying menu account transaction correctly transaction properly of account types in the log (showing both message to the bank and approval back) An inquiry transaction can be System is cancelled by the Press "Cancel" displaying menu customer any time key of account types prior to choosing an account System displays an appropriate message and offers customer the option of choosing to do another transaction or not.

Inquiry

Invalid PIN Customer is asked Extension to reenter PIN

Enter an incorrect PIN; Attempt an Customer is asked to inquiry re-enter PIN transaction on the customer's checking account Request to reenter PIN is being displayed Original transaction Enter correct PIN completes successfully This transaction completes successfully as well

Invalid PIN Correct re-entry of Extension PIN is accepted A correctly reInvalid PIN entered PIN is used Extension for subsequent transactions

An incorrect PIN has been rePerform another entered and transaction transaction

Use Case System Startup

Function Being Tested System is started when the switch is turned "on"

Initial System State System is off completed normally

Input

Expected Output

Activate the "on" System requests switch initial cash amount

Request to reInvalid PIN Incorrect re-entry of enter PIN is Extension PIN is not accepted being displayed Correct re-entry of Invalid PIN PIN on the second Extension try is accepted Request to reenter PIN is being displayed

Enter incorrect PIN

An appropriate message is displayed and re-entry of the PIN is again requested

Enter incorrect Original transaction PIN the first time, completes then correct PIN successfully the second time Enter incorrect PIN the first time Original transaction and second times, completes then correct PIN successfully the third time An appropriate message is displayed; Card is retained by machine; Session is terminated

Correct re-entry of Request to reInvalid PIN PIN on the third try enter PIN is Extension is accepted being displayed

Three incorrect reRequest to reInvalid PIN entries of PIN result enter PIN is Extension in retaining card and being displayed aborting transaction

Enter incorrect PIN three times

You might also like