Title: Testing with Filmstrips
1Testing with Filmstrips
- Tony Clark
- School of Computing
- Thames Valley University
- tony.clark_at_tvu.ac.uk
- http//itcentre.tvu.ac.uk/clark/
2Overview
- Model Driven Testing
- Testing with Filmstrips
- Two new features filmstrips and snapshots
- A Case Study
- Filmstrips as Extended Use Cases
- An Approach to Language Design
- Defining the Extension syntax and semantics
- Practical Experimentation demo
- Review and further work
3Model Driven Testing
- Model the system.
- Generate tests from models.
- Can
- Test the model.
- Test the implementation.
- Most existing work uses behaviour models
- State machines
- Collaboration diagrams
- Sequence diagrams
4Testing with Filmstrips
5Features Snapshots and Filmstrips
- Snapshots are system state descriptions.
- Snapshot patterns denote sets of state
descriptions. (Model Based Functional Testing
using Pattern Directed Filmstrips. Tony Clark.
AST 09, ICSE 09.) - Filmstrip patterns are sequences of snapshot
patterns. - This talk about filmstrips and filmstrip
patterns. - EOPPEs (http//www.ansa.co.uk/ANSATech/93/Primary/
10100002.pdf)
6A Case Study
7Basic Use Cases
8UML Meta Model for Use Cases
9Proposed Extension
10Extended Use Case Model
11An Approach to DSL Design
12Filmstrip Semantic Domain
context Filmstrip inv steps
children-gtiterate(c s Seq s
c.steps) context Filmstrip inv steps-gtasBag
merged-gtiterate(c s Seq s
c.steps)-gtasBag
13Basic Semantic Mapping
context BasicSatisfaction inv
spec.inv-gtforAll(c filmstrip.steps-gtforAll(s
c.satisfiedBy(s.before,env) and
c.satisfiedBy(s.after,env)))
context BasicSatisfaction inv
spec.pre-gtforAll(c c.satisfiedBy(filmstrip.
steps-gtfirst.before,env)) and
spec.post-gtforAll(c c.satisfiedBy(filmstrip
.steps-gtlast.before,env))
14Sequenced Behaviour
context SeqSatisfaction inv filmstrip.children
children.filmstrip and children.spec
spec.children
15Alternative Behaviour
context AltSatisfaction inv children-gtexists(r
r.filmstrip filmstrip)
16Parallel Behaviour
context ParSatisfaction inv children-gtfilmstrip
filmstrip.merged and par.children
children.spec
17Behaviour Repetition
context StarSatisfaction inv
filmstrip.children-gtforAll(c c
basicSatisfaction.filmstrip)
18Practical Issues
- Generating Sequences
- Language Design
- System Architecture
- Demo
19Generating Sequences
- F Filmstrip Specs
- F then F
- F or F
- F par F
- F
- epsilon
- O
- O Operation Specs
20Sequences
- f then g p q p in f , q in
g - f or g f union g
- f par g p q p q
- r in f ,
- s in g ,
- (p,p) in split(r),
- (q,q) in split(s)
-
- split(s) (take(s,i),drop(s,i)) i in
0..len(s) - f epsilon or (f then f)
- epsilon
- o o
21A Language for Testing Java
- _at_Filmstrip(hotel.BookingSystem,"C/project")
- name "hotel1","hotel2"
- address "Leeds"
- in seq
- op hotelId addHotel(name,address ,3,100.0)
- pre not self.getHotels()-gtexists(hotel
hotel.getName() hotelName) - post self.getHotels()-gtexists(hotel
- hotel.getName() hotelName and
- hotel.getAddress() hotelAddress
and - hotel.getRooms()-gtsize 3)
- end
- ... more filmstrip...
- do ... action ...
- end
22Connecting to Java
Use Case Model
Filmstrip Specification
Filmstrip Engine
Java Application
Report
23Demo
24Review
- Adding snapshot patterns.
- Controlling choices.
- Integration with OMG testing profile.
- Correspondence with UML behaviour.