Содержание
-
State Transition Testing Technique Training
KaterynaDribas
-
Agenda
1. Practice Third lesson: 1.1. Example; 1.2. Notifications; 1.3. Test cases. 3. Summary. 5. The end. 4. Home Task.
-
Practice
-
Example
Customer selects a mark of the chocolate (e.g. ‘KitKat’). Chocolate vending machine (CVM) Enters money.
-
If amount of money is ok, then CVM will start selection of chocolate. If ‘KitKat’ chocolate is available, then customer will get ‘KitKat’ in a minute. If not enough money is entered, then CVM will ask to enter more. Not enough! Please select In a 10 seconds menu returns to main menu.
-
If there is no selected mark of the chocolate, then customer will get proper message. In a 10 seconds menu returns to main menu. The CVM doesn’t give the change. No chocolate! His money back.
-
Example
Type of choco-late Valida-tion sum Check selected chocola-te Start Give choco-late Enter money Select type of chocolate Enough money, with or w/o change Chocolate exists In 10 seconds Customer selects ‘KitKat’, and enters money. If entered money is enough, the CVM will start selection of chocolate. If ‘KitKat’ is available, then customer will get it in a minute. In a 10 seconds menu returns to main menu.
-
Type of choco- late Valida-tion sum Check selected chocola-te Start Give choco- late Enter money Select type of chocolate Enough money, with or w/o change Chocolate exists In 10 seconds Wait for enough money Enter money Not enough money If entered money is not enough, the CVM will ask to enter more. If there is no ‘KitKat’ then customer will get proper message and his money back. In a 10 seconds menu returns to main menu. The CVM doesn’t give the change. Money back Chocolate doesn’t exist In 10 seconds
-
Example : Notification 1
In examples we should discover how much times user has to enter money to get enough pay. Type of choco- late Valida-tion sum Check selected chocola-te Start Give choco- late Enter money Select type of chocolate Enough money, with or w/o change Chocolate exists In 10 seconds Wait for enough money Enter money Not enough money Money back Chocolate doesn’t exist In 10 seconds Valida-tion sum Wait for enough money Enter money Not enough money
-
Example : Notification 1
Let’s take that ‘KitKat’ costs 10.00 UAH. Verify behavior of system, when entered sum is equal the chocolate cost. What is the minimum number of cases we should make for sum validation? 1st TEST CASE Enter 10 UAH
-
Enter 20 UAH. 2nd TEST CASE Verify behavior of system, when entered sum is more the chocolate cost.
-
Enter whole sum by 1 cop. 3rd TEST CASE Verify behavior of system, when entered sum by 1 cop is equal the chocolate cost. …
-
Every bank notes and coins. 4th TEST CASE Verify behavior of system, when every bank note and coin were entered until get the chocolate cost ,
-
Example: Notification 1
There are many way to verify validation of entered sum. This issue should be clarified with BA. We should find the cases when it has sense.
-
Example : Notification 2
In examples is not clear how many times user can repeat the ope- ration of selecting chocolate until he selects existing chocolate. Type of choco- late Valida-tion sum Check selected chocola-te Start Give choco- late Enter money Select type of chocolate Enough money, with or w/o change Chocolate exists In 10 seconds Wait for enough money Enter money Not enough money Money back Chocolate doesn’t exist In 10 seconds Previous steps Check selected chocola-te Start Money back Chocolate doesn’t exist In 10 seconds Previous steps
-
Example: Notification 2
If the number of types chocolate is 10? Or 30? Or more??
-
Example 2: Notification 2
There are many way to verify validation of entered sum. This issue should be clarified with BA. We should find the cases when it has sense.
-
Example: Causes
Budget constraints Defect location identification Test coverage (higher or good enough for project) It depends on: Time constraints Business need Cost of mistake
-
- Test coverage (higher or good enough for project); - Cost of mistake. - Time constraints; - Budget constraints; - Defect location identification; - Business need;
-
Example: Test Cases. 1st flow
In first test case would be the normal situation: the enough sum of mo-ney is entered the first time; selected mark of chocolate exists in CVM. Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Chocolate doesn’t exist Enter money Select type of chocolate Enough money, with or w/o change Chocolate exists In 10 seconds Start Type of chocola-te Valida-tion sum Check selected chocola-te Give chocola-te
-
Example: Coverage. 1st flow
Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Start Enter money Select type of chocolate Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds
-
Example 2: Test Cases. 2nd flow
In second test case not enough sum is entered the first time, but the sum is getting enough the second time. And ‘Kit Kat’ doesn’t exist in CVM. Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Money back Select type of chocolate Enter money Not enough money Enter money Enough money, with or w/o change Chocolate doesn’t exist In 10 seconds
-
Example: Coverage. 1st, 2nd flows
Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Start Enter money Select type of chocolate Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Wait for enough money Enter money Not enough money Moneyback Chocolate doesn’t exist In 10 seconds
-
Example: Notification 3
But we may want to verify that all combi-nations of states and transitions still work correctly. We have covered all states and transitions. These flows are used to create main test cases.
-
Additional test cases may make you feel that you are on firm ground. There’s probability that they discover defects previous cases don't find. Let’s consider additional combinations of states.
-
Example: Test Cases. 3rd flow
A third test case. The enough sum of money is entered the first time, and selected mark of chocolate doesn’t exist in CVM. Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Chocolate doesn’t exist Enter money Select type of chocolate Enough money, with or w/o change Chocolate doesn’t exist In 10 seconds Start Type of chocola-te Valida-tion sum Check selected chocola-te Money back
-
Example: Coverage. 3rd flow
Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Start Enter money Select type of chocolate Enough money, with or w/o change In 10 seconds Moneyback Chocolate doesn’t exist In 10 seconds
-
Example: Test Cases. 4st flow
A fourth test case. Sum of money is getting enough the second time. And selected mark of chocolate exists in CVM. Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Give chocola-te Select type of chocolate Enter money Not enough money Enter money Enough money, with or w/o change Chocolate exists In 10 seconds
-
Example: Coverage. 3rd, 4st flows
Type of chocola-te Valida-tion sum Check selected chocola-te Wait for enough money Start Enter money Enter money Select type of chocolate Not enough money Money back Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds Chocolate doesn’t exist Type of chocola-te Valida-tion sum Check selected chocola-te Start Enter money Select type of chocolate Give chocola-te Enough money, with or w/o change Chocolate exists In 10 seconds In 10 seconds Wait for enough money Enter money Not enough money Moneyback Chocolate doesn’t exist In 10 seconds
-
Example: Notification 3
We have considered additional combinations. We have covered all states and transitions. &
-
Summary Capture requirements So State Transition testing technique is a tool to: and describe the design of the application. And document them.
-
Summary Describe how the states of the appli- -cation may vary. State3 State4 State2 State1 Action1 Start5 Action4 Action5 Action2 Action3 Determine all the events that occur during the application.
-
Summary
Let’s summarize the steps of the technique. Consider and prioritize according to require-ments all ways which cover whole functionality. Determine all states. Identify all transitions. Create a test case for each way, that covers main functionality. Create additional test cases that cover remaining functionality (if it is needed).
-
Home Task
For creating appointment provider selects the date and enters his Short Name (SN). If provider is not busy on selected date he selects an operatory (Op) and a free time from list. After this appointment is created. If the SN was entered incorrectly the warning message appears and SN should be entered again. If provider is busy at selected date the appropriate message appears and provider has to enter the SN and select the date again.
-
Home Task
Please, build state transition diagram. Show flows needed for covering all functional. 1 2
-
The end
The end of the third lesson. THANK YOU!
Нет комментариев для данной презентации
Помогите другим пользователям — будьте первым, кто поделится своим мнением об этой презентации.