You are on page 1of 15

TMAP template © Sogeti 2021

Test case design for State Transition Testing The result of creating tes
They will need to be wor
execution. This means de
Test situations and test cases 0-switch coverage data to use and (very imp
Start state Transition End state case.
You could use the Test Ca
TS1
TS2
TS3
Test cases 0-switch cove
(note: the test cases are in the columns to the right)
TC1
TS1
To show or hide the test situations for each test case "extend" the TS2
grouped lines by clicking the - or + sign in the left margin of the sheet) TS3
TC2
TS1
TS2
TS3
TC3
TS1
TS2
TS3

(insert extra lines when more test situations exist, calculate the number of test situation on the calculation she

Test situations and test cases 1-switch coverage


Start state Transition Middle state Transition End state
TS1
TS2
TS3
Test cases 1-switch cove
(note: the test cases are in the columns to the right)
TC1
TS1
TS2
TS3
TC2
TS1
TS2
TS3
TC3
TS1
TS2
TS3

(copy extra lines when more test situations exist, calculate the number of test situations on the calculation she
The result of creating test cases with this sheet are "Logical Test Cases".
They will need to be worked out into "Physical Test Cases" for the test
execution. This means determining the exact actions to take, the exact
data to use and (very important) the expected outcomes for every test
case.
You could use the Test Case & Test Log Template of TMAP for this.

Test cases 0-switch coverage - a test case consists of one or more test situations
State Transition State Transition State Transition State Transition State Transition State Transition State Transition State

on on the calculation sheet)

Test cases 1-switch coverage - a test case consists of one or more test situations
State Transition State Transition State Transition State Transition State Transition State Transition State Transition State

ns on the calculation sheet)


Transition State (add more columns when needed)

Transition State (add more columns when needed)


TMAP template © Sogeti 2022

Test case design for State Transition Testing - Electric door EXAMPLE

Test situations and test cases 0-switch coverage


Start state Transition End state
TS1 S1 T1 S2
TS2 S2 T2 S2
TS3 S2 T3 S1
Test cases 0-switch cove
(note: the test cases are in the columns to the right)
solution with one "long" test case: TC1
solution with multiple "short" test cases: TC1
TC2
TC3

(insert extra lines when more test situations exist, calculate the number of test situation on the calculation she

Test situations and test cases 1-switch coverage


Start state Transition Middle state Transition End state
TS1 S1 T1 S2 T2 S2
TS2 S1 T2 S2 T3 S1
TS3 S2 T2 S2 T2 S2
TS4 S2 T2 S2 T3 S1
TS5 S2 T3 S1 T1 S2
Test cases 1-switch cove
(note: the test cases are in the columns to the right)
solution with one "long" test case: TC1
TS1
TS2
TS3
TS4
TS5

(Note: for this example we did not work out the shortest examples, these are just the test situations. It is also possible to h

(copy extra lines when more test situations exist, calculate the number of test situations on the calculation she
Test cases 0-switch coverage - a test case consists of one or more test situations
State Transition State Transition State Transition State Transition State Transition State Transition State Transition State

S1 T1 S2 T2 S2 T3 S1
S1 T1 S2
S2 T2 S2 To show the test situations for each test case "extend" the grouped lines by clicking the + sign in th
S2 T3 S1

on on the calculation sheet)

Test cases 1-switch coverage - a test case consists of one or more test situations
State Transition State Transition State Transition State Transition State Transition State Transition State Transition State

S1 T1 S2 T2 S2 T2 S2 T3 S1 T1 S2 T3 S1
S1 T1 S2 T2 S2
S1 T1 S2 T3 S1
S2 T2 S2 T2 S2
S2 T2 S2 T3 S1
S2 T3 S1 T1 S2

ons. It is also possible to have several "medium length" test cases that combine a few test situations)

ns on the calculation sheet)


The result of creating test cases with this sheet are "Logical Test
Cases". They will need to be worked out into "Physical Test Cases" for
the test execution. This means determining the exact actions to take,
the exact data to use and (very important) the expected outcomes for
every test case.
You could use the Test Case & Test Log Template of TMAP for this.

Transition State (add more columns when needed)

s by clicking the + sign in the left margin of the sheet)

Transition State (add more columns when needed)


TMAP - calculator for determining the number of Test Situations with State Transition Testing - 1-switch coverage

States (names/ID's):
Incoming transitions:
Outgoing transitions:
Multiplied per state (calculated): 0 0 0 0 0 0
Number of test situations: 0 (this is calculated by multiplying the number of incoming and outgoing transition
(for 1-switch coverage)

Number of test situations: 0 (this is equal to the number of transitions, here calculated as the number of outg
(for 0-switch coverage)
- 1-switch coverage © Sogeti 2021

0 0 0 0
ming and outgoing transitions per state, and adding the totals)

lated as the number of outgoing transitions)


TMAP - calculator for determining the number of Test Situations with State Transition Testing - 1-switch coverage
Example calculating test situations for electric door.

States (names/ID's): Door open Door closed


Incoming transitions: 1 2
Outgoing transitions: 1 2
Multiplied per state (calculated): 1 4
Number of test situations: 5 (this is calculated by multiplying the number of incoming and outgoing transitions pe
(for 1-switch coverage)

Number of test situations: 3 (this is equal to the number of transitions, here calculated as the number of outgoing
(for 0-switch coverage) (this only is the number of valid transitions, see the page on state tables for the inval
1-switch coverage © Sogeti 2022

ng and outgoing transitions per state, and adding the totals)

ated as the number of outgoing transitions)


ge on state tables for the invalid transitions)
TMAP - state transition testing - State table (valid & invalid transitions) © Sogeti 2021

Events
States

Note: See the State Table Example for guidance on how to use this table.
© Sogeti 2021
TMAP - state transition testing - State table (valid & invalid transitions)
Example State Transition Table for electric door.

Events
Push open-button Sensor detects person
States

S1: Door closed T1 -> S2: Door open -

S2: Door open - T2 -> S2: Door open


© Sogeti 2021

Sensor detects no person


Based on the State Table test cases are created with 0-s
Invalid transition coverage.
- For both Valid and Invalid transitions test cases are crea
for Invalid transitions the expected outcome is that ther
transition to another state and some sort of error messa
T3 -> S1: Door closed Valid transition the user or the initiating system.
t cases are created with 0-switch

ansitions test cases are created. Of course


pected outcome is that there will not be a
nd some sort of error message is given to
tem.

You might also like