Download presentation
Presentation is loading. Please wait.
1
SATEL Semi Automatic TEsting Language University of Geneva Levi Lúcio VALID Meeting - Besançon 10/3/06
2
VALID Meeting - Besançon 2 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
3
VALID Meeting - Besançon 3 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
4
VALID Meeting - Besançon 4 CO-OPN Specification Language Algebraic Data Type (ADT) Petri Net (extended) Method Gate CO-OPN Class Account
5
VALID Meeting - Besançon 5 Transactional Semantics and Concurrency Concurrency is automatically managed by Petri Nets… A transaction is either possible or the state of the system is not changed! Synchronization operators: Sim (//), Seq (..), Alt (+)
6
VALID Meeting - Besançon 6 Testing CO-OPN Specs as Reactive Systems CO-OPN specs may be seen as reactive systems: Stimulations: method events Observations: gate events (may be absent…) We can extend this notion to: Stimulations: simple or synchronized method events Observations: simple or synchronized gate events
7
VALID Meeting - Besançon 7 Black Box and Integration Testing Black Box Integration Testing Stimulations - method events or method synchronizations Observations - gate events or gate synchronizations
8
VALID Meeting - Besançon 8 Tests for CO-OPN Specs A Test is a graphof Stimulation / Observation pairs with a truth value; The graphs are expressed in Hennessy- Milner (HML) temporal logic: Sequence Negation Conjunction
9
VALID Meeting - Besançon 9 Why HML? HML is expressive enough to distinguish all possible executions of a CO-OPN Spec. Simple traces are not! Hidden transition uncovering
10
VALID Meeting - Besançon 10 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
11
VALID Meeting - Besançon 11 Why is our Test Selection Semi-Automatic? The test engineer employs her semantic knowledge of the SUT to: Select execution paths to test (HML formulas) Constrain parameters of stimulation/observation pairs She can also impose the automatic decomposition of a method’s behavior
12
VALID Meeting - Besançon 12 Test Selection Process “Manual” selection “Automatic” selection
13
VALID Meeting - Besançon 13 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
14
VALID Meeting - Besançon 14 What are Test Intentions? Test Intention 1 Test Intention 2 Test Intention 3 A test intention selects a part of the model’s transition system and abstracts it…
15
VALID Meeting - Besançon 15 Writing Test Intentions A SATEL test intention is defined by axioms with constrained variables: Parameters of methods or gates ADT types or Class types Stimulations Observations HML formulas A test intention “produces” a test set!
16
VALID Meeting - Besançon 16 Axiom Structure hmlFormula in intention cond 1 & cond 2 & … cond n => hmlFormula in intention HML( T> in login ; Axioms Variables obs : observation usr : username (ADT) Non constrained variables assume all their possible values ( usr into jean::luc::[]) = true => HML( T) in login; Algebraic condition constraining the usr variable
17
VALID Meeting - Besançon 17 Recursive Axioms and Test Intention Reuse Several axioms may exist for one test intention and they may be recursive: Variables f : HML [] in nWrongPins; f in nWrongPins => f. HML(<login(newUser(mario),newPin(1 1 1 1)) with errorLogin> T) in nWrongPins; Base case for the recursion (empty test intention) Recursive call Axioms may be reused in other test intentions: f in nWrongPins & nbEvents( f ) f in 4LessWrongPins Condition over HML formulaTest intention reuse
18
VALID Meeting - Besançon 18 All constraints over variables int and bool are primitive types of the test language (not ADT!) “Automatic” constraining predicate
19
VALID Meeting - Besançon 19 “Automatic” constraints for ADT variables subUniformity( usr ) => HML( in login; During the transition induced by the “login” method select one value for “usr” per behavior of the login operation; This depends on the axioms defining the method!
20
VALID Meeting - Besançon 20 Managing Non-Determinism We want to be able to include in our tests output events not predictable by the model; These events are dependent on internal random procedures of the SUT or reactions of the SUT to the environment!
21
VALID Meeting - Besançon 21 Dealing with Uncertainty Lazy Variables: temp : observation External: react : temperature manager ADT operation HML( T) in SecureTempAction; Variable instantiation posponed to testing time ADT operation to be passed to the test driver Problem: Validation of semi-instantiated tests!
22
VALID Meeting - Besançon 22 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
23
VALID Meeting - Besançon 23 Denotational Semantics For each test intention: 1. For each axiom find the set of variable substitutions that makes the condition true Except variables marked with subuniformity 2. Generate per axiom a set of partially instantiated HML formulas
24
VALID Meeting - Besançon 24 Denotational Semantics (2) 3. “Run” the partially instantiated tests through the Spec’s transition system to find values for the remaining variables and validate… withdraw(m):(b >= m) => balance b -> balance b- m Algebraic condition allowing the method to fire Petri net pre-condition Petri net post-condition Appying a subuniformity predicate on m implies at each fire of the withdraw calculating one m for equation equations: (b >= m) = true (b >= m) = false
25
VALID Meeting - Besançon 25 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
26
VALID Meeting - Besançon 26 Implementation of Test Intention modules
27
VALID Meeting - Besançon 27 Presentation Plan CO-OPN and testing; Semi-automatic test selection; Syntax of SATEL; Semantics of SATEL; Preliminary results; Future.
28
VALID Meeting - Besançon 28 Future Solidify syntax; Finish denotational semantics; Implement SATEL’s semantics in Prolog; Some work on coverage of the state space?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.