delta-oriented testing for finite state machines
DESCRIPTION
Delta-Oriented Testing for Finite State Machines. Mahsa Varshosaz , Harsh Beohar. Centre for Research on Embedded Systems (CERES) Halmstad University. AVOCS 2014. Motivation. Testing a family of software. Motivation (cont). Outline. Model Based Testing W-Method - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/1.jpg)
Delta-Oriented Testing for Finite State Machines
Mahsa Varshosaz, Harsh Beohar
AVOCS 2014
Centre for Research on Embedded Systems (CERES)
Halmstad University
![Page 2: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/2.jpg)
Motivation
Testing a family of software
2
![Page 3: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/3.jpg)
Motivation (cont)
3
![Page 4: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/4.jpg)
Outline
• Model Based Testing– W-Method
• Delta-oriented W-Method
4
![Page 5: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/5.jpg)
Model Based Testing
System Model
Implementation
LTSFSM…
Test Case Generation
Test Execution
5
![Page 6: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/6.jpg)
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
![Page 7: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/7.jpg)
Model Assumptions
• Fully specified ∀i∈I
• Deterministic
• Minimal ≢
si/o
si/o
i/o’
sS’
7
![Page 8: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/8.jpg)
W-Method
• Basis: FSM test models
• Goal: Establish conformance between specification and implementation
8
![Page 9: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/9.jpg)
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
![Page 10: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/10.jpg)
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
![Page 11: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/11.jpg)
Test Cases
• The set of test cases to be executed R.P.W
– R : the reset sequence
11
![Page 12: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/12.jpg)
Outline
• Model Based Testing– W-Method
• Delta-oriented W-Method
12
![Page 13: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/13.jpg)
Delta-Oriented Modeling
CoreModelDelta
1
Deltai
Deltan
… …
Pi
P1 Pn
13
![Page 14: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/14.jpg)
Delta Oriented Testing
Core Model(M)
∆(M)1 ……
Mi’
∆(M)i∆(M)n
Generating Test Cases
Generating DeltaTest
Cases
Executing Test
14
![Page 15: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/15.jpg)
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
![Page 16: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/16.jpg)
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
![Page 17: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/17.jpg)
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
![Page 18: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/18.jpg)
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
![Page 19: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/19.jpg)
Test Criteria
• Two criteria for solutions– Correctness– Efficiency
• Considering an SPL with n products
Core Model
(M)
∆(M)i
M’i
19
![Page 20: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/20.jpg)
Correctness
20
![Page 21: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/21.jpg)
Efficiency
21
![Page 22: Delta-Oriented Testing for Finite State Machines](https://reader036.vdocuments.site/reader036/viewer/2022062321/56812b1f550346895d8f1990/html5/thumbnails/22.jpg)
Work in Progress
• Developing algorithms for computing:– Characterizing set– Transition cover set
• Extending the delta definition
• Implementing the delta oriented method
22