Upload
quentin-bailey
View
213
Download
0
Embed Size (px)
Citation preview
Übungen zurQualitätssicherung von Software (SWQS)
Prof. Dr. Holger Schlingloff
Humboldt-Universität zu Berlinund
Fraunhofer FOKUS
14.5.2013: Modellbasierter Test – Beispiel SATM
Folie 2H. Schlingloff, Software-Qualitätssicherung
Example: Automated Teller Machine
• “Simplified Automated Teller Machine” SATM• One of those common money distributors
Screen display, numerical keypad, card reader, cash dispensing unit, (receipt printer)
• Specification mostly given by screenshots (“rapid prototyping”) implicit information, e.g. which bills
are available• State-transition system
not much calculation user interaction Client-server paradigm
Folie 3H. Schlingloff, Software-Qualitätssicherung
SATM Description
• Description: Initially, the ATM displays the welcome screen. When the customer inserts a valid card, it asks to input the PIN. Afterwards, the customer can choose to display the balance or to withdraw money. If money withdrawal is chosen, the customer can select the amount and packaging of the money. The ATM then asks the bank for acknowledgement of the transaction. If the operation is acknowledged, it is performed and the customer is asked whether to perform another transaction. If the PIN is incorrect, the transaction is aborted and after three failed trials the card is kept. If the PIN is correct, the customer does not need to input it again when making a new transaction.
Your task:• Entities and events?• Interfaces?• Regions, states and transitions?
Folie 4H. Schlingloff, Software-Qualitätssicherung
•Entities and events?
• Interfaces?
Folie 5H. Schlingloff, Software-Qualitätssicherung
Designing a State Machine for the ATM
•Consider the „major operating modes“ of the ATM (idle, ready, waiting-for-PIN, ...)
•Can they be structured?
•Consider which values the variables have in these modes
•A state is a mapping of variables to values
•State transitions occur by environment interactions(or, rarely, by internal actions)
•Design an (incomplete) LTS for (part of) the ATMNow!