UML and Petri Nets for Test Case Generation - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

UML and Petri Nets for Test Case Generation

Description:

Fondue (cont. ... The Fondue process can be outlined by a UML class diagram showing usage ... Transform Fondue pre and post-conditions using OCL ... – PowerPoint PPT presentation

Number of Views:129
Avg rating:3.0/5.0
Slides: 21
Provided by: luisp9
Category:
Tags: uml | case | fondue | generation | nets | petri | test

less

Transcript and Presenter's Notes

Title: UML and Petri Nets for Test Case Generation


1
UML and Petri Nets for Test Case Generation
  • From Fondue to CO-OPN
  • (my) first iteration

2
Outline
  • Users viewpoint the 4 steps for test generation
  • The Model - Fondue approach
  • Deriving test cases and applying criteria
  • Implementation testing
  • Test results
  • Developers viewpoint - OO Petri Nets to enable
    state space exploration
  • The Intermediate format
  • Steps to Transformation
  • .
  • Current work
  • Next chapters

3
Users viewpoint the 4 steps in the test
generation
  • Step 1 The Model

4
Step 1 The model
  • UML (Fondue specification)
  • Software development process for reactive systems
  • Purpose is to produce description of
  • the problem domain
  • The functional requirements of the system
  • What it provides
  • Concept Model Defines the static structure of
    the information in the system
  • Behavior Model Defines the Input and Output
    communication of the system
  • Uses UML for notation (parts of different UML
    diagrams)
  • e.g Specification (models)
  • Concept Model ? Class Diagram
  • Environment Model ? Collaboration Diagram
  • Protocol Model ? State Diagram
  • Operation Model ?(OCL)

5
Step 1 The Model (cont.)
  • Fondue (cont.)
  • Describes operations by operation schemas which
    specify operations by pre- and post conditions
    using OCL
  • Effect of the operation on an abstract state
    representation of the system and by events sent
    to the outside world
  • The change of state resulting from an operation's
    execution is described in terms of objects,
    attributes and association links, which conform
    to the constraints imposed by the analysis class
    model of the respective system. Restricted form
    of state diagrams is used to describe sequencing
    of system operations.
  • The Fondue process can be outlined by a UML class
    diagram showing usage dependencies between the
    models

6
Step 1 The Model (cont.)
  • Fondue - ebanking example
  • Environment Model (messages from the user)

ltltsystemgtgt eBanking
loginUserName loginPasswd loginChallenge createPay
ment giveDetailsBeneficiary modifyPaiment deletePa
yment
User
7
Step 1 The Model (cont.)
  • Fondue - ebanking example
  • Environment Model (messages from the system)

ltltsystemgtgt eBanking
sendChallengeNumber errorUserName errorPasswd erro
rChallenge errorUserBlocked errorPaymentCreation e
rrorPaymentModification
User
8
Step 1 The Model (cont.)
  • Fondue - ebanking example
  • Concept Model

ltltsystemgtgt eBanking
1
position
table
0.. 1
1
ltltIdgtgt
0..
0.. 1
HasSessionId
User
9
The full picture
Model
ltTgt
Tests
Driver Mapping
Application
Mapping rules
Criteria
Implementation Interface
Production
Oracle Assumptions
Observation
Test Results
10
Developers viewpoint - OO Petri Nets to enable
state space exploration
  • Steps to transformation and the Internal format

11
Steps to Transformation
  • Goal from Fondue to CO-OPN
  • OCL translation
  • Fondue Operational Model
  • Transformation (represents OO formalisms)
  • Object states and attributes
  • Management of object creation and destruction
  • Typing references polymorphism
  • DataTypes generators and operators

12
Step 1 Read/Load Fondue Model
  • Export Fondue Model to XMI
  • Using Together Fondue export tool
  • Generates XMI Fondue Model
  • Load Fondue Model
  • Fondue Metal Model described in terms of MOF
  • MOF M3 level -gt Meta-MetaModel
  • Use of MDR
  • Implementation of MOF
  • Can be managed programmatically using JMI
  • Parse it with JMI
  • Java Metadata Interface
  • Rules for generating metamodel-specific Java API
  • Defines a set of reflective interfaces that can
    be used similarly to the metamodel-specific Java
    API without prior knowledge of the metamodel

13
Step 1 Read/Load Fondue Model
Fondue Model
Export, Load and Parse
XMI FondueMM
Load by MDR
Parse Using JMI
?
FondueMM MOF desc
Intermediate Format
14
Step 2 The Environment model
  • Environment model ? 1 CO-OPN Context
  • Operations ? methods of the context
  • Output messages ? Gates

input
output
15
Step 3 Concept model
  • 1 Class ? 1 CO-OPN Class
  • Name ? Name
  • Attributes ? Places
  • Access methods put, get, read
  • Method put_a(x) a y -gt a x
  • Gate get_a(x) a x -gt a x
  • Gate read_a(x)a x -gt a x
  • Associations as classes
  • With source and target values
  • Instatioation of AADT Bag
  • For each class

put
put
get
16
Step 3 Concept model
  • 1 Class ? 1 CO-OPN Class
  • Name ? Name
  • Attributes ? Places
  • Access methods put, get, read
  • Method put_a(x) a y -gt a x
  • Gate get_a(x) a x -gt a x
  • Gate read_a(x)a x -gt a x

!
Questions regarding this diagram
  • Why dont we have a Method get?
  • Only Gates with get/read functions
  • How can we see the difference between
  • Gates and Methods

17
Step 4 Operation model
  • Transform Fondue pre and post-conditions using
    OCL
  • Operation Schemas ? (synchronization rules,
    algebraic equations)

Not fully understood -( Further investigation
needed
18
Current work
  • Whats done
  • Fondue exportation
  • XMI FondueMM
  • Read/Load Fondue Module
  • Using a particular MDR implementation and
  • Fondue MOF description
  • Parse
  • Using JMI
  • Environment model
  • Concept model

19
Next chapters
  • Finish the application simulated eBanking
    application
  • Understand OCL and in particular Fondue Operation
    Schemas
  • Prepare a first iteration for the translation
    process
  • To understand the full picture regarding relation
    between Fondue internal structure and CO-OPN

20
The end
Questions... Comments
Write a Comment
User Comments (0)
About PowerShow.com