230 likes | 394 Views
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
E N D
Delta-Oriented Testing for Finite State Machines MahsaVarshosaz, Harsh Beohar Centre for Research on Embedded Systems (CERES) Halmstad University AVOCS 2014
Motivation Testing a family of software
Outline • Model Based Testing • W-Method • Delta-oriented W-Method
Model Based Testing System Model LTS FSM … Test Case Generation Implementation Test Execution
Finite State Machine Inputs I={a,b} Outputs O={0,1} b/0 s0 b/0 a/0 a/1 s1 s2 a/1 b/1
Model Assumptions i/o • Fully specified ∀i∈I • Deterministic • Minimal ≢ s i/o s i/o’ s S’
W-Method • Basis: FSM test models • Goal: Establish conformance between specification and implementation
Transition Cover Set (P) • Goal: Checking existence of output faults • P={ƹ ,a,b,a,aa,aaa,aab} s0 b/0 b a s0 s1 s0 a b/0 b a/1 a/0 s0 s2 s1 a/1 s2 b a s2 s0 b/1
Characterizing Set (W) • Goal: Checking existence of transfer faults W={a,b} b/0 s0 b/0 a/0 a/1 s1 s2 a/1 b/1
Test Cases • The set of test cases to be executed R.P.W • R : the reset sequence
Outline • Model Based Testing • W-Method • Delta-oriented W-Method
Delta-Oriented Modeling Pi Deltai … … Core Model Deltan Delta1 P1 Pn
Delta Oriented Testing … Core Model (M) ∆(M)1 ∆(M)i ∆(M)n … Generating Test Cases Generating DeltaTest Cases Mi’ Executing Test
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 ∆ ⋃τ
FSM Delta (Example) a,b/0 a/1 s0 a,b/1 s3 c/1 t3 b/0 c/0 c/1 c/0 a/1 a,b/1 s1 s2 t1 t2 b,c/1 a,c/0 a/0 b/0 b,c/1 b/0
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
Delta Application (Example) a,b/0 a/1 s0 a,b/1 b/1 s3 c/1 t3 b/0 c/0 c/1 c/0 a/1 a,b/1 s1 s2 t1 t2 b,c/1 a,c/0 a/0 b/0 b,c/1 b/0
Test Criteria • Two criteria for solutions • Correctness • Efficiency • Considering an SPL with n products ∆(M)i Core Model (M) M’i
Work in Progress • Developing algorithms for computing: • Characterizing set • Transition cover set • Extending the delta definition • Implementing the delta oriented method
Thank you mahsa.varshosaz@hh.se