Delta-Oriented Testing for Finite State Machines Mahsa Varshosaz, Harsh Beohar Centre for Research on Embedded Systems (CERES) Halmstad University AVOCS 2014
Testing a family of software Motivation Testing a family of software
Motivation (cont)
Outline Model Based Testing W-Method Delta-oriented W-Method
Model Based Testing … LTS FSM System Model Test Case Generation Implementation Test Execution
Finite State Machine Inputs I={a,b} Outputs O={0,1} s0 s1 s2 b/0 b/0
Model Assumptions Fully specified ∀i∈I Deterministic Minimal ≢ s 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 s2 s1 b/0 b/1 a/1 a/0 s0 b a s0 s1 a b s0 s2 b a s0 s2
Characterizing Set (W) Goal: Checking existence of transfer faults W={a,b} s0 s2 s1 b/0 b/1 a/1 a/0 Input /state s0 s1 s2 a 1 b
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) s0 s3 t3 s1 s2 t1 t2 a,b/0 a/1 a,b/1 c/1 b/0 c/0 a,c/0 b,c/1 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 a,c/0 b,c/1 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
Correctness
Efficiency
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