You are on page 1of 6

Initial Functional Test Cases for Example ATM System

Page 1 of 6

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 System Startup System Shutdown System Shutdown Function Being Tested System is started when the switch is turned "on" Initial System State System is off Input Activate the "on" switch Enter a legitimate amount Expected Output System requests initial cash amount System is on

System is System accepts initial requesting cash cash amount amount 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 has just been turned on System is on and not servicing a customer System has just been shut down

System output should Perform a legitimate demonstrate that a inquiry transaction connection has been established to the Bank Activate the "off" switch System is off

Session

Session

Session

Session

Session

Verify from the bank side that a connection to the ATM no longer exists System is on and Card is accepted; System reads a Insert a readable not servicing a System asks for entry customer's ATM card card customer of PIN Card is ejected; System is on and System displays an System rejects an Insert an unreadable not servicing a error screen; unreadable card card customer System is ready to start a new session System displays a System accepts System is asking Enter a PIN menu of transaction customer's PIN for entry of PIN types System asks whether System is System allows Perform a customer wants another customer to perform a displaying menu of transaction transaction transaction transaction types System is asking System allows System displays a whether customer multiple transactions Answer yes menu of transaction wants another in one session types transaction

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010

Initial Functional Test Cases for Example ATM System

Page 2 of 6

Function Being Tested System is started System when the switch is Startup turned "on" Session ends when customer chooses not Session to do another transaction Individual types of Transaction transaction will be tested below Use Case System handles an Transaction invalid PIN properly System asks customer Withdrawal to choose an account to withdraw from System asks customer Withdrawal to choose a dollar amount to withdraw

Initial System State System is off

Input Activate the "on" switch

Expected Output System requests initial cash amount System ejects card and is ready to start a new session

System is asking whether customer Answer no wants another transaction

A readable card has been entered Menu of transaction types is being displayed Menu of account types is being displayed

Enter an incorrect PIN and then attempt a transaction

The Invalid PIN Extension is performed

Choose Withdrawal System displays a transaction menu of account types System displays a menu of possible withdrawal amounts System dispenses this amount of cash; System prints a correct Choose an amount receipt showing that the system amount and correct currently has and updated balance; which is not greater System records than the account transaction correctly in balance the log (showing both message to the bank and approval back) Choose checking account

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

System verifies that it has sufficient cash on Withdrawal hand to fulfill the request

System verifies that customer's balance is Withdrawal sufficient to fulfill the request A withdrawal Withdrawal transaction can be cancelled by the

System has been started up with less System displays an than the maximum Choose an amount appropriate message withdrawal amount greater than what and asks customer to in cash on hand; the system currently choose a different System is has amount requesting a withdrawal amount Choose an amount System displays an System is that the system appropriate message requesting a currently has but and offers customer the withdrawal which is greater option of choosing to ammount than the account do another transaction balance or not. System is System displays an displaying menu of Press "Cancel" key appropriate message account types and offers customer the

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010

Initial Functional Test Cases for Example ATM System

Page 3 of 6

Function Being Tested System is started System when the switch is Startup turned "on" 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 Deposit to choose an account to deposit to Use Case Deposit System asks customer to enter a dollar amount to deposit

Initial System State System is off

Input Activate the "on" switch

Expected Output System requests initial cash amount

Deposit

System asks customer to insert an envelope

Deposit

System performs a legitimate deposit transaction properly

Deposit

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

option of choosing to do another transaction or not. System displays an appropriate message System is and offers customer the displaying menu of Press "Cancel" key option of choosing to dollar amounts do another transaction or not. Menu of Choose Deposit System displays a transaction types is transaction menu of account types being displayed System displays a Menu of account Choose checking request for the types is being account customer to type a displayed dollar amount System is displaying a System requests that Enter a legitimate request for the customer insert an dollar amount customer to type a envelope dollar amount System accepts envelope; System prints a correct receipt showing amount and correct System is updated balance; requesting that Insert an envelope System records customer insert an transaction correctly in envelope the log (showing message to the bank, approval back, and acceptance of the envelope) System displays an appropriate message System is and offers customer the displaying menu of Press "Cancel" key option of choosing to account types do another transaction or not. System is requesting Press "Cancel" key customer to enter a dollar amount System displays an appropriate message and offers customer the option of choosing to

Deposit

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010

Initial Functional Test Cases for Example ATM System

Page 4 of 6

Use Case System Startup

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

Initial System State System is off

Input Activate the "on" switch

Expected Output System requests initial cash amount

Deposit

Deposit

Transfer

Transfer

Transfer

Transfer

Transfer

Transfer

do another transaction or not. System displays an A deposit transaction System is appropriate message can be cancelled by requesting and offers customer the the customer any time Press "Cancel" key customer to insert option of choosing to prior to inserting an an envelope do another transaction envelope or not. A deposit transaction System displays an is cancelled System is appropriate message automatically if an requesting Wait for the request and offers customer the envelope is not customer to insert to time out option of choosing to inserted within a an envelope do another transaction reasonable time or not. System displays a System asks customer Menu of Choose Transfer menu of account types to choose an account transaction types is transaction specifying transfer to transfer from being displayed from Menu of account System asks customer System displays a types to transfer Choose checking to choose an account menu of account types from is being account to transfer to specifying transfer to displayed System displays a System asks customer Menu of account Choose savings request for the to enter a dollar types to transfer to account customer to type a amount to transfer is being displayed dollar amount System prints a correct receipt showing amount and correct System is displaying a System performs a updated balance; Enter a legitimate request for the legitimate transfer System records dollar amount transaction properly customer to type a transaction correctly in dollar amount the log (showing both message to the bank and approval back) System displays an A transfer transaction System is appropriate message can be cancelled by displaying menu of and offers customer the the customer any time account types Press "Cancel" key option of choosing to prior to entering dollar specifying transfer do another transaction amount from or not. System displays an A transfer transaction System is appropriate message can be cancelled by displaying menu of Press "Cancel" key and offers customer the the customer any time account types option of choosing to

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010

Initial Functional Test Cases for Example ATM System

Page 5 of 6

Use Case System Startup

Function Being Initial System Input Tested State System is started Activate the "on" when the switch is System is off switch turned "on" prior to entering dollar specifying transfer amount to

Expected Output System requests initial cash amount

Transfer

Inquiry

Inquiry

Inquiry

Invalid PIN Extension

Invalid PIN Extension

Invalid PIN Extension

Invalid PIN Extension

do another transaction or not. System displays an A transfer transaction System is appropriate message can be cancelled by requesting and offers customer the the customer any time Press "Cancel" key customer to enter a option of choosing to prior to entering dollar dollar amount do another transaction amount or not. System asks customer Menu of Choose Inquiry System displays a to choose an account transaction types is transaction menu of account types to inquire about being displayed System prints a correct receipt showing correct balance; System performs a System is Choose checking System records legitimate inquiry displaying menu of account transaction correctly in transaction properly account types the log (showing both message to the bank and approval back) System displays an An inquiry transaction appropriate message can be cancelled by System is and offers customer the the customer any time displaying menu of Press "Cancel" key option of choosing to prior to choosing an account types do another transaction account or not. Enter an incorrect PIN; Customer is asked to Attempt an inquiry Customer is asked to re reenter PIN transaction on the -enter PIN customer's checking account Request to re-enter Original transaction Correct re-entry of PIN is being Enter correct PIN PIN is accepted completes successfully displayed An incorrect PIN A correctly re-entered has been re-entered This transaction PIN is used for Perform another and transaction completes successfully subsequent transaction completed as well transactions normally An appropriate Request to re-enter Incorrect re-entry of message is displayed PIN is being Enter incorrect PIN PIN is not accepted and re-entry of the PIN displayed is again requested

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010

Initial Functional Test Cases for Example ATM System

Page 6 of 6

Use Case System Startup

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

Initial System State System is off

Input Activate the "on" switch

Expected Output System requests initial cash amount

Enter incorrect PIN Correct re-entry of Request to re-enter Invalid PIN the first time, then Original transaction PIN on the second try PIN is being Extension correct PIN the completes successfully is accepted displayed second time Enter incorrect PIN Correct re-entry of Request to re-enter the first time and Invalid PIN Original transaction PIN on the third try is PIN is being second times, then Extension completes successfully accepted displayed correct PIN the third time An appropriate Three incorrect reRequest to re-enter message is displayed; Invalid PIN entries of PIN result in Enter incorrect PIN PIN is being Card is retained by Extension retaining card and three times displayed machine; aborting transaction Session is terminated

Page of links for non frames-enabled browsers.

Copyright 2004 - Russell C. Bjork. Permission for non-commercial reproduction for educational use is hereby granted; all other rights are reserved.

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/InitialFunctionalTests.html

15/08/2010