Delta-Oriented Testing for Finite State Machines
-
Upload
emery-waller -
Category
Documents
-
view
53 -
download
0
description
Transcript of Delta-Oriented Testing for Finite State Machines
Delta-Oriented Testing for Finite State Machines
Mahsa Varshosaz, Harsh Beohar
AVOCS 2014
Centre for Research on Embedded Systems (CERES)
Halmstad University
Motivation
Testing a family of software
2
Motivation (cont)
3
Outline
• Model Based Testing– W-Method
• Delta-oriented W-Method
4
Model Based Testing
System Model
Implementation
LTSFSM…
Test Case Generation
Test Execution
5
Finite State Machine
Inputs I={a,b}Outputs O={0,1}
s0b/0
b/0
b/1
a/0
a/1
a/1
s2s1
6
Model Assumptions
• Fully specified ∀i∈I
• Deterministic
• Minimal ≢
si/o
si/o
i/o’
sS’
7
W-Method
• Basis: FSM test models
• Goal: Establish conformance between specification and implementation
8
Transition Cover Set (P)
• Goal: Checking existence of output faults– P={ ,a,b,a,aa,aaa,aabƹ }
s0
s2s1
b/0
b/0
b/1
a/1
a/1
a/0
s0
s0 s1
s0s2
s0 s2
a
b
ab
a
b
9
Characterizing Set (W)
• Goal: Checking existence of transfer faults
W={a,b}
s0
s2s1
b/0
b/0
b/1
a/1
a/1
a/0
Input /state s0 s1 s2
a 0 1 1
b 0 0 1
10
Test Cases
• The set of test cases to be executed R.P.W
– R : the reset sequence
11
Outline
• Model Based Testing– W-Method
• Delta-oriented W-Method
12
Delta-Oriented Modeling
CoreModelDelta
1
Deltai
Deltan
… …
Pi
P1 Pn
13
Delta Oriented Testing
Core Model(M)
∆(M)1 ……
Mi’
∆(M)i∆(M)n
Generating Test Cases
Generating DeltaTest
Cases
Executing Test
14
FSM Delta
• ∆(M)=(S∆,I∆,O∆, μ∆ ,λ∆ )
– S ∆ non-empty set of states
– I ∆ , O ∆ set of inputs and outputs
– μ ∆ : (S ⋃ S ∆) x I ∆ ⟶ (S ⋃ S ∆)
– λ ∆ : (S ⋃ S ∆) x I ∆ ⟶ O ∆ ⋃ τ15
FSM Delta (Example)
s0
b/0
a,b/0
b/0
a,b/1
a,c/0s2s1
s3
c/0 c/1 c/0
t1 t2
t3
a/1
a,b/1
c/1
b,c/1
a/1
b,c/1
a/0
b/0
16
Delta Application
• Apply(M, ∆(M))= (s0, S’, I’, O’, μ’, λ’)
– S’= S ⋃ S∆ I’=I∆ O’=O∆ μ∆ (s, a) if (s, a) ∈ Dom(μ∆ )
– μ’(s, a) = μ (s, a) if a ∈ I ∧ (s, a) ∉Dom(μ∆ )
s otherwise
λ∆(s, a) if (s, a) ∈ Dom(λ∆)
– λ’(s, a) = λ (s, a) if a ∈ I ∧ (s, a) ∉Dom(λ∆ )
τ otherwise
17
Delta Application (Example)
s0
b/0
a,b/0
b/0
a,b/1
a,c/0s2s1
s3
c/0 c/1 c/0
t1 t2
t3
a/1
a,b/1
c/1
b,c/1
a/1
b,c/1
a/0
b/0
b/1
18
Test Criteria
• Two criteria for solutions– Correctness– Efficiency
• Considering an SPL with n products
Core Model
(M)
∆(M)i
M’i
19
Correctness
20
Efficiency
21
Work in Progress
• Developing algorithms for computing:– Characterizing set– Transition cover set
• Extending the delta definition
• Implementing the delta oriented method
22
Thank you