Delta-Oriented Testing for Finite State Machines

23
Delta-Oriented Testing for Finite State Machines Mahsa Varshosaz , Harsh Beohar AVOCS 2014 Centre for Research on Embedded Systems (CERES) Halmstad University

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 Presentation

Transcript of Delta-Oriented Testing for Finite State Machines

Page 1: 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

Page 2: Delta-Oriented Testing for  Finite State  Machines

Motivation

Testing a family of software

2

Page 3: Delta-Oriented Testing for  Finite State  Machines

Motivation (cont)

3

Page 4: Delta-Oriented Testing for  Finite State  Machines

Outline

• Model Based Testing– W-Method

• Delta-oriented W-Method

4

Page 5: Delta-Oriented Testing for  Finite State  Machines

Model Based Testing

System Model

Implementation

LTSFSM…

Test Case Generation

Test Execution

5

Page 6: Delta-Oriented Testing for  Finite State  Machines

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

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

W-Method

• Basis: FSM test models

• Goal: Establish conformance between specification and implementation

8

Page 9: Delta-Oriented Testing for  Finite State  Machines

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

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

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

Outline

• Model Based Testing– W-Method

• Delta-oriented W-Method

12

Page 13: Delta-Oriented Testing for  Finite State  Machines

Delta-Oriented Modeling

CoreModelDelta

1

Deltai

Deltan

… …

Pi

P1 Pn

13

Page 14: Delta-Oriented Testing for  Finite State  Machines

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

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

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

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

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

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

Correctness

20

Page 21: Delta-Oriented Testing for  Finite State  Machines

Efficiency

21

Page 22: Delta-Oriented Testing for  Finite State  Machines

Work in Progress

• Developing algorithms for computing:– Characterizing set– Transition cover set

• Extending the delta definition

• Implementing the delta oriented method

22

Page 23: Delta-Oriented Testing for  Finite State  Machines

Thank you

[email protected]