Testing with Filmstrips Tony Clark School of Computing Thames Valley University [email_address] http://itcentre.tvu.ac.uk/...
Overview <ul><li>Model Driven Testing </li></ul><ul><li>Testing with Filmstrips </li></ul><ul><li>Two new features: filmst...
Model Driven Testing <ul><li>Model the system. </li></ul><ul><li>Generate tests from models. </li></ul><ul><li>Can: </li><...
Testing with Filmstrips
Features: Snapshots and Filmstrips <ul><li>Snapshots are system state descriptions. </li></ul><ul><li>Snapshot patterns de...
A Case Study
Basic Use Cases
UML Meta Model for Use Cases
Proposed Extension
Extended Use Case Model
An Approach to DSL Design
Filmstrip Semantic Domain context  Filmstrip  inv : steps =  children->iterate(c s = Seq{} |  s + c.steps) context  Filmst...
Basic Semantic Mapping context  BasicSatisfaction  inv : spec.inv->forAll(c | filmstrip.steps->forAll(s | c.satisfiedBy(s....
Sequenced Behaviour context  SeqSatisfaction  inv : filmstrip.children = children.filmstrip  and children.spec = spec.chil...
Alternative Behaviour context  AltSatisfaction  inv : children->exists(r | r.filmstrip = filmstrip)
Parallel Behaviour context  ParSatisfaction  inv : children->filmstrip = filmstrip.merged  and par.children = children.spec
Behaviour Repetition context  StarSatisfaction  inv : filmstrip.children->forAll(c |  c = basicSatisfaction.filmstrip)
Practical Issues <ul><li>Generating Sequences </li></ul><ul><li>Language Design </li></ul><ul><li>System Architecture </li...
Generating Sequences <ul><li>F ::=  Filmstrip Specs </li></ul><ul><li>F  then  F </li></ul><ul><li>|  F  or  F </li></ul><...
Sequences <ul><li>[| f  then  g |] = { p + q | p  in  [| f |], q  in  [| g |] } </li></ul><ul><li>[| f  or  g |] = [| f |]...
A Language for Testing Java <ul><li>@Filmstrip(hotel.BookingSystem,&quot;C:/project&quot;) </li></ul><ul><li>name = {&quot...
Connecting to Java Java Application Filmstrip Specification Filmstrip Engine Report Use Case Model
Demo
Review <ul><li>Adding snapshot patterns. </li></ul><ul><li>Controlling choices. </li></ul><ul><li>Integration with OMG tes...
Upcoming SlideShare
Loading in...5
×

Filmstrip testing

742
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
742
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Filmstrip testing

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

    Clipping is a handy way to collect important slides you want to go back to later.

×