State Transition Testing Technique Training Kateryna Dribas Agenda
State Transition Testing Technique Training Kateryna Dribas
Agenda Introduction Technique Examples
Introduction Let’s remember… Dynamic testing: Testing that involves the execu-tion of the software of a component or system. What is dynamic testing? What is black box testing? Black box testing: Method of testing that examines the functionality of an application without peering into its internal logical structure.
Introduction What is finite state system? Finite state system is any system where user gets a different output for the same input, depending on what has happened before. What is state transition testing? State transition technique is a dynamic black-box testing technique, which is used when the system is defined in terms of states and the transitions between the states is governed by the rules of the system.
Introduction What is it used for? - gives us the opportunity to visualize all of the states in which the system (application) can exist; - to capture certain kinds of system requirements and to document internal system design; - can serve as a guide to creating test cases; - is used in cases when system’s reaction depends on its state.
Technique
Start Card inserted - states (that the software may occupy) - transitions (from one state to another) - events (that cause a transition) Actions that result from a transition are not shown explicitly but they would be a message to the customer saying things (such as 'Please enter your PIN'). Technique: designations A state transition model can be represented as diagram and as a table.
User inserts credit card and enters PIN for getting bank account. He has 3 tries to enter valid PIN and to get access to account. After 3rd invalid try the card will be "eaten". And in 10 seconds start menu appears. Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter invalid PIN Enter valid PIN Enter invalid PIN Technique: State diagram In 10 seconds
Whether all situations were considered? Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter invalid PIN Enter valid PIN Enter invalid PIN Card inserted Card inserted Enter invalid PIN Enter valid PIN Technique: State diagram In 10 seconds Card inserted Enter valid PIN Enter valid PIN Enter invalid PIN Enter valid PIN
The transition of states can be also shown as state transition table. Where every column illustrates every transition from one state to another. Technique: State table
Technique: State table
A first test case here would be the normal situation, where the correct PIN is entered the first time. Wait for PIN 2nd try 3rd try Access to account Eat card Start Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Card inserted Technique: Test Cases. 1st flow Enter invalid PIN In 10 seconds
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Test Cases. 2nd flow Enter invalid PIN A second test (to visit every state) would be to enter an incorrect PIN each time, so that the system eats the card. In 10 seconds
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Cover 1st , 2nd flows Enter invalid PIN In 10 seconds
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Test Cases. 3rd flow A third test case where the PIN was incorrect the first time but OK the second time. In 10 seconds Enter valid PIN
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Cover 1st , 2nd , 3rd flows In 10 seconds Enter valid PIN
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Test Cases. 4th flow A fourth test where the PIN was correct on the third try. In 10 seconds Enter valid PIN
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Cover 1st ,2nd,3rd,4th flows A fourth test where the PIN was correct on the third try. In 10 seconds Enter valid PIN
Wait for PIN 2nd try 3rd try Access to account Eat card Start Card inserted Enter valid PIN Enter invalid PIN Enter valid PIN Enter valid PIN Enter invalid PIN Technique: Cover all flows Enter invalid PIN In 10 seconds
7396-e-lerning_state_1.ppt
- Количество слайдов: 19