CH05.L05 . BBT-4-state transition
Summary
TLDRThe video script explains the State Transition technique, essential for testing systems with dynamic states influenced by events. It's applicable in scenarios like screen dialogues, website transitions, and embedded systems. The script illustrates the technique using a car's gear stick as an example, detailing the process of creating a state diagram and table to identify valid and invalid test cases, ensuring comprehensive system testing.
Takeaways
- 🔄 The State Transition technique is used for systems with changing states influenced by events.
- 📍 Common applications include screen dialogues, website transitions, and embedded systems.
- 🚗 An example provided is the transmission/speed stick in cars, illustrating the technique's application.
- 📊 Start by drawing a diagram with states in squares and arrows indicating transitions based on events.
- 🏁 The initial state is labeled as the 'starting state', in the car transmission example, it's 'Neutral'.
- ⬇️ Moving the stick down from Neutral transitions to 'Reverse', and moving up returns to Neutral.
- ⬆️ From Neutral, moving the stick up progresses through gears 1st, 2nd, and 3rd.
- ❌ Direct transition from Neutral to 3rd gear is not possible, as indicated in the diagram.
- 📋 Move from the state diagram to a state table, detailing each state's response to actions.
- 🔍 In the state table, 'Null' is used to indicate no change when an action is applied.
- 📝 From the state table, derive the number of test cases needed, identifying valid and invalid cases.
- 📚 The State Transition technique involves creating a diagram of rectangles for states, with arrows showing transitions on events, leading to a state table for test case generation.
Q & A
What is the State Transition technique?
-The State Transition technique is a method used in testing to identify and cover all possible states and transitions in a system. It is particularly useful when the system has states that change based on events.
When should you use the State Transition technique?
-You should use the State Transition technique when working on a system that has changing states influenced by events. This is common in systems like screen dialogues, website transitions, and embedded systems.
What is an example of a system where the State Transition technique can be applied?
-An example is the transmission/speed stick in cars. The technique helps generate test cases that cover all possible states and transitions of the gear system.
How do you start applying the State Transition technique?
-You start by drawing a diagram with all the states in separate squares and connecting them with arrows that represent the events causing transitions between states.
What is the significance of the 'starting state' in the State Transition diagram?
-The 'starting state' is the initial state from which the system begins its operation. In the example of a car's transmission, the starting state is 'Neutral'.
How does the State Transition diagram help in understanding the system's behavior?
-The diagram shows all possible states and how they transition from one to another based on events. It helps in identifying all paths and ensuring that no direct transitions are missed, such as going from Neutral to 3rd gear.
What is the next step after creating the State Transition diagram?
-The next step is to move from the diagram to a state table, where you list all states and actions, and indicate the effects of each action on the state and the resulting transition.
What does 'Null' represent in the state table?
-'Null' in the state table indicates that an action does not have any effect on the current state, meaning the state will remain unchanged.
How many test cases are typically generated from the State Transition technique?
-The number of test cases generated depends on the complexity of the system, but in the example given, 10 test cases are made, including 2 invalid ones.
What are the two invalid test cases mentioned in the script?
-The two invalid test cases are changing down from Reverse and changing up from 3rd gear, as these transitions are not allowed in the system.
How does the State Transition technique help in identifying valid and invalid test cases?
-By visualizing the state transitions and creating a state table, testers can easily identify which transitions are valid and which are not, thus helping to generate comprehensive test cases.
Outlines
🚗 State Transition Technique Overview
This paragraph introduces the State Transition technique, a method used for systems with changing states influenced by events. It is applicable in various contexts such as screen dialogues, website transitions, and embedded systems. The paragraph provides an example of a car's transmission/speed stick to illustrate how the technique can be applied. It emphasizes the importance of creating a state diagram with all possible states and transitions, followed by a state table that details the effects of actions on each state and the resulting state changes. The example clarifies that some transitions are invalid, such as moving directly from Neutral to 3rd gear, and highlights the process of generating test cases to cover all valid states and transitions, excluding the invalid ones.
Mindmap
Keywords
💡State Transition
💡System States
💡Events
💡Starting State
💡End State
💡State Diagram
💡State Table
💡Test Cases
💡Invalid Test Cases
💡Screen Dialogues
💡Embedded Systems
Highlights
The State Transition technique is used when a system has states that change according to events affecting those states.
Systems with changing states are common in screen dialogues, website transitions, and embedded systems.
An example is provided to clarify the application of the State Transition technique using the transmission/speed stick in cars.
The technique helps generate test cases covering all states of a system.
The process begins with drawing a diagram and writing all states in separate squares.
Arrows in the diagram represent events that cause transitions between states.
The first state in the system is called the 'starting state', illustrated as 'Neutral' in the example.
Transitions are shown from 'Neutral' to 'Reverse' and back to 'Neutral' based on the movement of the stick.
The event of moving the stick up from 'Neutral' leads to transitions through 1st, 2nd, and 3rd gear states.
It is understood from the diagram that direct transitions from 'Neutral' to 3rd gear are not possible.
The state diagram is then converted into a state table, listing all states and actions.
The state table shows the effect of actions on each state and the resulting state transitions.
If an action has no effect, 'Null' is written in the state table.
From the 2nd gear, transitions are made to 3rd gear when changing up and to 1st gear when changing down.
The state table helps determine the number of test cases needed to cover all system states.
Two test cases are identified as invalid: changing down from reverse and changing up from 3rd.
The State Transition technique involves drawing a diagram with rectangles representing system states.
The starting and end states are indicated, with arrows showing transitions based on events.
From the diagram, a state table is created to determine valid and invalid test cases.
Transcripts
The State Transition
when will we use this technique?
we use it if the system you work on
has states that change according to
events which affect those states,
so you should use the
State Transition technique.
usually the systems with changing states
are often exists in:
Screen dialogues,
Web site transitions and embedded system.
As usual, let's have an example
to clarify how to apply
this technique. For example:
the system of the transmission / speed
stick in cars.
The State transition technique helps us
generate test cases that cover
all these states. Firstly, we will start with
drawing a diagram and write all
the states of the stick in
separate squares with arrows
that relate them to each other according to
the way we understood from the system.
It is shown on the arrows that all the events
which will happen to the states,
and let it moves to the next state.
the first state at the beginning of system
is called "starting state " and
this is the Neutral here. then it
transmit to Reverse with the event of
moving the stick down.
and it will get back to Neutral with
the event of moving the stick up.
as well, the event of moving the stick up
transmits it from the Neutral
to the 1st gear state
then the 2nd one then the 3rd.
From this diagram,
We understand that we can't transmit from Neutral
to the 3rd gear directly.
Secondly, we will move from
the state diagram to the state table,
in which we write all the states
and all actions mentioned in the diagram
in a form of table. In front of
each state, we write the effect of the action on it
and to which state it will be transmitted.
If it doesn't have any effect, so we
write "Null". For example, from Reverse
it will change up to Neutral.
But if it changed down
there will not be any change so it
will be "Null". At the 2nd gear,
if w changed up it will move to 3rd gear
and if we changed down it will move to
the 1st gear. From this table,
we know that we will make 10 test cases
to cover all the system states.
2 test cases of them are invalid
which are: change down from reverse
and change up from 3rd
Finally, we can
summarize the idea of applying the State
transition technique which starts with drawing
a diagram consists of rectangles, in which
all the system states are written.
The first state from which the system starts
is the Starting State.
and the state to which it transmits is the End State.
also an arrow between them
on which the events are written
and it means that system will transmit from
state A to state B when this
event happens.
from the data of this diagram,
we will write the state table.
From the table we can know the number of test cases
and which one of them will be valid or invalid.
関連動画をさらに表示
ISTQB FOUNDATION 4.0 | Tutorial 33 | State Transition Testing | Test Case Design Techniques | CTFL
123 - State transition
CH05.L04. BBT-3-decision table.
ISTQB FOUNDATION 4.0 | Tutorial 32 | Decision Table Testing | Test Case Design Techniques | CTFL
Software Testing Tutorial #34 - Equivalence Partitioning in Testing
Software Testing Tutorial #36 - Decision Table Testing in Software Testing
5.0 / 5 (0 votes)