Testing with filmstrips
Download
1 / 24

Testing with Filmstrips - PowerPoint PPT Presentation


  • 132 Views
  • Uploaded on

Testing with Filmstrips. Tony Clark School of Computing Thames Valley University [email protected] http://itcentre.tvu.ac.uk/~clark/. Overview. Model Driven Testing Testing with Filmstrips Two new features: filmstrips and snapshots A Case Study Filmstrips as Extended Use Cases

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Testing with Filmstrips' - danielle-briggs


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Testing with filmstrips

Testing with Filmstrips

Tony Clark

School of Computing

Thames Valley University

[email protected]

http://itcentre.tvu.ac.uk/~clark/


Overview
Overview

  • 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


Model driven testing
Model 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



Features snapshots and filmstrips
Features: 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)








Filmstrip semantic domain
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


Basic semantic mapping
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))


Sequenced behaviour
Sequenced Behaviour

context SeqSatisfaction inv:

filmstrip.children = children.filmstrip and

children.spec = spec.children


Alternative behaviour
Alternative Behaviour

context AltSatisfaction inv:

children->exists(r | r.filmstrip = filmstrip)


Parallel behaviour
Parallel Behaviour

context ParSatisfaction inv:

children->filmstrip = filmstrip.merged and

par.children = children.spec


Behaviour repetition
Behaviour Repetition

context StarSatisfaction inv:

filmstrip.children->forAll(c |

c = basicSatisfaction.filmstrip)


Practical issues
Practical Issues

  • Generating Sequences

  • Language Design

  • System Architecture

  • Demo


Generating sequences
Generating Sequences

F ::= Filmstrip Specs

F then F

| F or F

| F par F

| F*

| epsilon

| O

O ::= Operation Specs


Sequences
Sequences

[| 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* |] = [| epsilonor (f then f*) |]

[| epsilon |] = { [] }

[| o |] = { [o] }


A language for testing java
A Language for Testing Java

@Filmstrip(hotel.BookingSystem,"C:/project")

name = {"hotel1","hotel2"}

address = {"Leeds"}

inseq

op hotelId = addHotel(name,address ,3,100.0)

pre not self.getHotels()->exists(hotel | hotel.getName() = hotelName)

post self.getHotels()->exists(hotel |

hotel.getName() = hotelName and

hotel.getAddress() = hotelAddress and

hotel.getRooms()->size = 3)

end

... more filmstrip...

do ... action ...

end


Connecting to java
Connecting to Java

Use Case

Model

Filmstrip

Specification

Filmstrip

Engine

Java Application

Report



Review
Review

  • Adding snapshot patterns.

  • Controlling choices.

  • Integration with OMG testing profile.

  • Correspondence with UML behaviour.


ad