Title: Using%20query%20checking%20to%20generate%20test%20sequences
1Using query checking to generate test sequences
- Maryam Rashidian
- January, 2004
2Why use query checking to generate test sequences?
- Testing is our tool to uncover errors
- Test sets
- Coverage criteria
- Statement coverage
- Branch coverage
- Logical Expression coverage
-
- Test requirements
- Manual construction vs. automatic generation
3Using model checking to generate test sequences
- Counterexamples
- Trap properties
- Another alternative
4Temporal logic queries
- What is a query?
- A query is an expression obtained by replacing a
single atomic proposition in a temporal logic
formula by the symbol ?x, which is referred to as
the placeholder of the query. - Examples AG(?x), EF(?x ? p)
- What is the solution to the query?
- A propositional formula ? is a solution to a
query ?, relative to state s of Kripke structure
K, if K,s ? ??. - Restricting atomic propositions
- Example AG(?xp,q)
- Using queries with multiple placeholders
- Example EF(?xcc ? EX?ycc)
- What is a witness?
- A path through the model that explains why the
solution is as computed.
5TLQSolver
6SCR requirements model
7SCR Constructs
- Mode class
- Mode
- Term
- Condition
- Event
- Input event _at_T or _at_F
- Conditioned event _at_T(c) WHEN d
8SCR tables
- Condition table
- Event table
- Mode transition table
9Case study Cruise Control System
- SCR requirements model for CCS
- Modeling CCS with SMV
- Finding queries for Logical Expression coverage
criteria
10SCR requirements model for CCS
- SCR constructs
- Monitored variables
- Ignition
- Brake
- Accel
- Button
- Speed
- Mode class
- CC
- Off, Inactive, Cruise, Override
- Controlled variable
- Throttle
11SCR requirements
- SCR tables
- Mode transition table for CC
12SCR requirements
- SCR tables
- Event table for controlled variable Throttle
13Modeling CCS with SMV
- Variable definition
- Implementing mode class
- Implementing controlled variable Throttle
- Environmental assumptions
47 next(CC) case 48 CCOff (!(Ignition)
(next(Ignition))) Inactive 49 CCInactive
((Ignition) !(next(Ignition))) Off 50
CCInactive Ignition Running !(Toofast)
!(Brake) !(Accel) (!(Button b_Cruise)
(next(Button) b_Cruise)) Cruise 51
CCCruise ((Ignition) !(next(Ignition)))
Off 52 CCCruise (!(Toofast)
(next(Toofast))) Inactive 53 CCCruise
((Running) !(next(Running))) Inactive 54
CCCruise (!(Brake) (next(Brake)))
Override 55 CCCruise (!(Accel)
(next(Accel))) Override 56 CCCruise
(!(Button b_Off) (next(Button) b_Off))
Override 57 CCOverride ((Ignition)
!(next(Ignition))) Off 58 CCOverride
Ignition ((Running) !(next(Running)))
Inactive 59 CCOverride Ignition Running
!(Brake) !(Accel) !(Toofast) (!(Button
b_Resume) (next(Button) b_Resume)) Cruise
60 CCOverride Ignition Running !(Brake)
!(Accel) !(Toofast) (!(Button b_Cruise)
(next(Button) b_Cruise)) Cruise 61 1
CC 62 esac
14Finding queries for Logical Expression coverage
criteria
- Logical Expression coverage building
- Find predicates and clauses
- Find test sequences for
- Predicate Coverage (PC)
- Clause Coverage (CC)
- General Active Clause Coverage (GACC)
- Correlated Active Clause Coverage (CACC)
- Restricted Active Clause Coverage (RACC)
15Find predicates and clauses
16Predicate Coverage (PC)
- Two requirements
- Predicate should evaluate to TRUE
- Predicate should evaluate to FALSE
17Predicate Coverage (PC)
18Predicate Coverage (PC)
19Predicate Coverage (PC)
20Query checker limitations
- Do not accept Integer variables.
- Do not accept more than 4 or 5 placeholders,
based on the type of the variable.
21Thank you