Participants
description
Transcript of Participants
© 2000
DE
MO
DA
Y 2
000
Page 1
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Leïla Charfi, Luigi Logrippo & group
(with RL Probert & group)
School of Information Technology and Engineering
University of Ottawa
Participants
“Fast Spec-to-Test” Project
University of Ottawa
Mitel Corporation
© 2000
DE
MO
DA
Y 2
000
Page 2
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Objectives The Problem:
Obtaining tests that cover the requirements Automatic functional test generation
– by developing automatic test purpose generation from requirementsUse Case Maps (UCM) LOTOS
Proposition of a design methodology with automatic test suite generation:
UCM at requirements stage LOTOS at design & prototyping stage Automatic LOTOS test purpose generation from UCM Automatic test suite generation from LOTOS
© 2000
DE
MO
DA
Y 2
000
Page 3
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Design Methodology for Telecommunication Systems
Use Case MapsRequirements stage
LOTOS specificationDesign stage LOTOS scenarios
verification, validationand test suite generation
Test suites
Mapping UCM toLOTOS statements
(1)
(2)
(3)
(4)
Implementation stageTest suite execution on Implementation
MSCs
lotos2msc
msc2lotos
Input for possibleSDL specification, ...
© 2000
DE
MO
DA
Y 2
000
Page 4
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Use Case Maps (UCM) Semi-formal notation, used at requirement stage Visual representation of system’s behavior Derived from informal requirements or use cases
start pointresponsibility
end point
Example of map: simple call establishment
component
stub
offHook dial
onHook
phoneA phoneBswitch
checkIfIdle
offHook
[Idle]
[busy]
or_fork
disconnection
checkCalleesStatus
© 2000
DE
MO
DA
Y 2
000
Page 5
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
LOTOS
– Formal Description Technique– Design of telecommunication systems– Validation tools: interactive simulation (step-by-step
execution), validation using test conformance on the specification LOLA XELUDO CEASAR
– Test generation tools UCM2LotosTests: LOTOS scenario generation from UCM TGV: test suite generation from LOTOS scenarios TorX: test generation and execution of test suites
Language Of Temporal Ordering Specification
© 2000
DE
MO
DA
Y 2
000
Page 6
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
UCM to LOTOS mapping (1)
UCM elements LOTOS elementsmap, component processstub
start-pointresponsibility actionend-point
or-fork choice operator []
and-fork parallel composition
© 2000
DE
MO
DA
Y 2
000
Page 7
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
UCM2LOTOSTests (1) (2)
Process Calle_Busy[ user_to_phone, phone_to_user] :exit
Test generation algorithm generates 2 scenarios
UCM to LOTOS scenario transformation
offHook
offHook
offHook
dial
onHook
onHook
dial checkIfIdle checkIfIdleoffHook
dial
offHook
[busy][Idle]
disconnection
disconnection
user_to_phone !A !phoneA !offHook;phone_to_user !phoneA !A !dialTone;user_to_phone !A !phoneA !dial !B;phone_to_user !phoneA !A! busyTone;user_to_phone !A !phoneA !onHook;
endProc
user_to_phone !A !phoneA !offHook;phone_to_user !phoneA !A !dialTone;user_to_phone !A !phoneA !dial !B;phone_to_user !phoneB !B ! ringTone;user_to_phone !B !phoneB ! offHook;( user_to_phone !A !phoneA !onHook; phone_to_user !phoneB !B !disconnectTone; user_to_phone !B !phoneB !onHook;[] user_to_phone !A !phoneA !onHook; phone_to_user !phoneB !B !disconnectTone; user_to_phone !B !phoneB !onHook)
endProc
Process Calle_Idle [ user_to_phone, phone_to_user]: exit
checkCalleesStatus
checkIfIdle [Idle]
[busy]
checkCalleesStatusphoneA
phoneA phoneBswitch
switchphoneA phoneBswitch
Aim: covering the UCM with test cases
© 2000
DE
MO
DA
Y 2
000
Page 8
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Test Purpose (MSC format)Message Sequence Chart
offHook
dialTone
dial[B]
ring
userA debA
Test purpose:
- Abstract description of a subset of the specification
- Tests the functional behavior of the specification against its expected behavior
debB userB
ringTone
offHook
answer
onHook
disconnection
onHook
© 2000
DE
MO
DA
Y 2
000
Page 9
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Test suite generation with TGV (3) (4)
Test purpose Test suite generated from LOTOS using TGV
0
1
user_to_phone !A !offHook
phone_to_user !A !dialTone
2user_to_phone !A !dial !B
3phone_to_user !B !ringingOn
4phone_to_user !B !ringBackTone
5user_to_phone !B !offHook
6phone_to_user !A !ringBackToneOff
7user_to_phone !B !onHook
8phone_to_user !A !disconnectTone
9user_to_phone !A !onHook
10
TGV
0
1
user_to_phone !A !offHook; INPUT
phone_to_user !A !dialTone; OUTPUT
3user_to_phone !A !dial !B; INPUT
5phone_to_user !B !ringingOn; OUTPUT
7phone_to_user !B !ringBackTone; OUTPUT
8user_to_phone !B !offHook; INPUT
9phone_to_user !A !ringBackToneOff; OUTPUT
11
user_to_phone !A !onHook11
phone_to_user !B !disconnectTone
12
user_to_phone !B !onHook
user_to_phone !B !offHook (INCONCLUSIVE)
user_to_phone !B !offHook (INCONCLUSIVE)
user_to_phone !B !offHook (INCONCLUSIVE)
2
4
6
user_to_phone !B !onHook; INPUT
13phone_to_user !A !disconnectTone; OUTPUT
15user_to_phone !A !onHook; INPUT(PASS)
17
user_to_phone !A !onHook; INPUT
14
phone_to_user !B !disconnectTone; OUTPUT
16
user_to_phone !B !onHook; INPUT(PASS)
user_to_phone !B !onHook (INCONCLUSIVE)12
user_to_phone !A !offHook (INCONCLUSIVE)10
18
© 2000
DE
MO
DA
Y 2
000
Page 10
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Conformance relation used by TGV
The Implementation can have more inputs The Specification can have more outputs
I: implementation, S: specification
I ioconf S traces(S), O(I after ) O(S after )
I1 I2
I2 not ioconf S
switch? checkIfIdle
phone2! idlephone2! busy
switch? checkForward
I1 ioconf S
switch? checkIfIdle
phone2! idle
phone2! busy switch !indefinedUsr
switch? checkIfIdle
phone2! idlephone2! busy
S
© 2000
DE
MO
DA
Y 2
000
Page 11
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Success to date and Lessons Learned
Use of UCM to formalize requirements:
Automatic test generation with full coverage of the UCM
(implying full coverage of the requirements)
Easy derivation of a prototype using the UCM to
LOTOS mapping
© 2000
DE
MO
DA
Y 2
000
Page 12
Automatic Generation of Conformance Test Cases from Use Case MapsStrategic Technology
Key Issues
How to design UCMs so as to facilitate requirement documentation and obtention of meaningful test case
Automating as much as possible UCM to LOTOS translation
More experience is needed...