SlideShare a Scribd company logo
1 of 45
Download to read offline
Università degli Studi dell’Aquila




L22. Model-based Testing (Principles)
                                    Henry Muccini
                  DISIM, University of L’Aquila
 www.henrymuccini.com, henry.muccini@univaq.it
Copyright Notice
The material in these slides may be freely reproduced
and distributed, partially or totally, as far as an explicit
reference or acknowledge to the material author is
preserved.



                           Henry Muccini
Agenda
Modeling


MBT:
 →Why?

 →Modelsfor MBT
 →UML-based Testing
    ─ Testing activities
AGENDA
Modeling
                               Model-based testing

           Why?
                                   Models for MBT

           UML-based Testing
Modeling: there is not just programming

What is a model:
 →A model is a simplification of the reality
 →The reality is abstracted, since it is too complex

Why modeling
 →Models  are built for a better understanding of the
  system under development
Everything is a model ?!?
Non-software Models …
Specification: What
Software Models
Other Software Models (Web models)
… other software models…
… and many others…




                         Pilot              Pilot         CoPilot           CoPilot
                     Multifunction      Multifunction   Multifunction     Multifunction
                      Display1           Display2        Display1          Display2




                      Display             Display           Display          Display
                     Processor           Processor         Processor        Processor


                                           High speed network
                                            High speed network


                            Mission             Mission          Mission
                           Processor           Processor        Processor


                                                1553 bus
                                                 1553 bus

                           Auto-Pilot          GPS            Nav Radio
Model Driven Development (MDD)
Models are becoming first core assets in
Software Engineering/Architecting:
 →models   are primary artifacts retained as first class
 entities that can be analyzed and manipulated by
 means of automated tools
 →the focus moves from writing and sharing
 documents to writing and sharing models.
From Document Driven to Model Driven
Models in MDD
Models in MDD can be used for:

 →Documenting    design decisions
 →Guiding the coding phase

 →For analyzing and validating design choices

    ─ by complementing traditional code-level
      analysis techniques
Why modeling? For Documenting and Analysis
What is MBT?
It consists in:
 →ExtractingTest Cases from the Model
 →Run the test case over the system implementation



Purpose:
 →Tovalidate the implementation conformance to the
  model
       ─ The model itself is the oracle, i.e., it represents the
        expected behavior
Model-based Testing
A model based testing approach

accepts two main inputs
 →a model of the software under test,
 →a set of test generation directives which guide the test cases
 selection
and outputs a test specification
 →which   includes a set of stimuli the tester should introduce in
  the system together with expected responses
Modeling for testing
Essentially, we need (at least) a behavioral model of
the software system:
 →Labelled  Transition System
 →StateCharts

 →UML State of Sequence Diagrams

 →IOLTS

 →Finite State Automata

 →…
The base-line technique for designing test cases
  →Timely
         ─ Often useful in refining specifications and assessing testability
            before code is written
  →Effective
         ─ finds some classes of fault (e.g., missing logic) that can elude
            other approaches
  →Widely      applicable
         ─ to any description of program behavior serving as spec
         ─ at any level of granularity from module to system testing.
  →Economical
         ─ typically less expensive to design and execute than structural
            (code-based) test cases


(C) 2007 MAURO PEZZÈ & MICHAL YOUNG
Program code is not necessary
  →Only a description of intended behavior is needed
  →Even incomplete and informal specifications can be used
         ─ Although precise, complete specifications lead to better test suites
Early functional test design has side benefits
  →Often reveals ambiguities and inconsistency in spec
  →Useful for assessing testability
         ─ And improving test schedule and budget by improving spec
  →Useful     explanation of specification
         ─ or in the extreme case (as in XP), test cases are the spec




(C) 2007 MAURO PEZZÈ & MICHAL YOUNG
Different testing strategies (functional, structural,
fault-based, model-based) are most effective for
different classes of faults
Functional testing is best for missing logic faults
  →A common problem: Some program logic was simply
  forgotten
  →Structural (code-based) testing will never focus on code that
  isn’t there!



(C) 2007 MAURO PEZZÈ & MICHAL YOUNG
Modeling for testing
Such a model can be produced:
 1. Through a formal specification language
    ─ Typically referred as formal testing


 2. Through a diagrammatic (visual) notation
    ─ Typically referred as UML-based Testing
1. MBT based on Formal Specifications
Since the 80’s, many specification-based testing
approaches have been proposed, based on formal
languages such as
 →Z,   VDM, CSP, CCS, LOTOS, SDL, and Petri Nets.
More recently:
 →Based    on dynamic behavior:
        ─ FSM-based (Bochmann&Petrenko, Lee&Yannakis, …)
        ─ LTS-based (Brinksma&Tretmans, Jard&Jeron …)

 →Focussing    on static aspects,
        ─ ADT theory (Bernot&Gaudel…)
        ─ Z-based (Hierons…)
Formal Specification-based Testing
TorX (Côte de Resyste)
   → on-the-fly test generation and execution
  → random

  → LOTOS and Promela

TGV (IRISA - Rennes)
   →derives tests in TTCN from LOTOS or SDL
  → uses test purposes

TVEDA (CNET - France Telecom)
   →   derives TTCN tests from SDL specification
2. MBT based on the UML
UML State-machine based testing:
  →which might require the translation of the UML
  diagrams into an intermediate formal description
Scenario-based testing:
  →based   on the use of opportunely annotated UML Sequence Diagram
State-based and Scenario-based:
combine the use of interaction diagrams and state diagram,
possibly annotated with further (formal) information (e.g. OCL)
Model-based Testing: the overall idea




                        From Leila Naslavsky Advancement report
AsmL
                                       L
                                   TESTO
                                       OR
                                   UMLAU
                                       UT
Model-based Testing Approaches




                                   UMLTe
                                       est
                                   AGEDI
                                       IS
                                   TOTEM
                                       M
                                   SOOT
                                      TF
                                 COW-SU
                                      UITE
                                  SCENTO
                                       OR
                                   SeDiTe
                                        eC
                                 UCSC-Sy
                                       ystem
Main Testing Activities
Test Selection/Generation:
 →it consists in selecting a suitable and finite set of test cases
  from the possibly infinite set;


Test Execution and Evaluation:
 →it consists in executing the code accordingly to the selected
  test cases and comparing real and expected results;
Test Selection
A test case, in MBT, is typically a possible
“scenario”
 →In   scenario-based testing:
       ─ A scenario itself is an abstract test case


 →In   state-based testing
       ─ Execution flows are extraced from the state machine
         and represent a test case
       ─ MB coverage criteria are applied on this model
Test Case Selection
Abstract Test case = path over the LTS/FSM,
corresponding to sequences of events
     ─ They are not “concrete” test cases, but abstract
      (depending on the specification)


 →Concrete Test cases = mapping asbtract test cases
 into execution statements to be launched
Test Case Selection
                                                               Model of the
                                                 Test            system
                                              directives
            inSD                                           1
    1
                 C1        C2

                      m9

                      m1



                                         Test
                                     specification
        outSD1

2          C1         C2        C3
                 m9
                           m3

                 m8
                           m1
Test Case Selection
Test Execution
It consists in running the test cases on the system
implementation
 →So   to compare the real execution with the expected behavior
MBT practical concerns
Traceability, i.e. relating the abstract values of the
  specification to the concrete values of the
  implementation.


Execution, i.e. forcing the Implementation Under Test
  (IUT) to execute the specific sequence of events that
  has been selected.
Testing and Industry
In order to be suitable for industrial needs a testing
approach has to emphasize the following qualities:
 →Usability
      ─ Not ad-hoc models
 →Timeliness
      ─ Soon and even incomplete
                                      Opposed to
 →Tool   support                      accuracy


Goal of a suitable testing approach should be
“to improve the test results accuracy without sensibly
raising the testing effort”
MBT Tools
There are some automated tools for MBT:
 →Telelogic Tau and Tau Tester
 →Leirios Test Designer

 →Conformiq Qtronic

 →Rhapsody Test Conductor and Automatic Test Generation

 →AGEDIS
MBT in industry: challenges and issues
As remarked by Alan Hartman in his 2006 speech at ISSTA:
 →“Only   1% of industry uses it”


Why?
Why?
The main reasons I foresee:
 →Model2Code    (and viceversa) traceability problems
 →modeling is not yet so widely recognized as part of
 the development process.
     ─ Legacy systems


 →because  of tool/service problems
 →cost/effectiveness is still under exploration
Conformiq: Two models are required in
Input


•SutModel.Java (in QML)
•SutModel.xmi (Graphical Notation)
QML
Just like Java, QML consists of variables and
expressions, all strictly typed and known before the
compilation.


The types are divided into the same three groups that
Java has: primitives, references and values
QML
QML extends Java with:
      Records
      Ports
      System block
      State machines
SutModel Graphical
SutModel Graphical
Coverage




           Figure 5 – The Coverage Editor window

More Related Content

What's hot

Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software TestingNishant Worah
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategiesKrishna Sujeer
 
Testing of Object-Oriented Software
Testing of Object-Oriented SoftwareTesting of Object-Oriented Software
Testing of Object-Oriented SoftwarePraveen Penumathsa
 
Testing Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedTesting Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedBob Binder
 
Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software TestingBeat Fluri
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testingravikhimani
 
Martin Gijsen - Effective Test Automation a la Carte
Martin Gijsen -  Effective Test Automation a la Carte Martin Gijsen -  Effective Test Automation a la Carte
Martin Gijsen - Effective Test Automation a la Carte TEST Huddle
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testingHaris Jamil
 
16103271 software-testing-ppt
16103271 software-testing-ppt16103271 software-testing-ppt
16103271 software-testing-pptatish90
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow TestingHirra Sultan
 
Testing documents
Testing documentsTesting documents
Testing documentssuhasreddy1
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notesguest208aa1
 

What's hot (20)

Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Testing of Object-Oriented Software
Testing of Object-Oriented SoftwareTesting of Object-Oriented Software
Testing of Object-Oriented Software
 
Software testing methods
Software testing methodsSoftware testing methods
Software testing methods
 
Testing Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons LearnedTesting Object-Oriented Systems: Lessons Learned
Testing Object-Oriented Systems: Lessons Learned
 
Seminar on Software Testing
Seminar on Software TestingSeminar on Software Testing
Seminar on Software Testing
 
Unit 3 Control Flow Testing
Unit 3   Control Flow TestingUnit 3   Control Flow Testing
Unit 3 Control Flow Testing
 
Test cases
Test casesTest cases
Test cases
 
Martin Gijsen - Effective Test Automation a la Carte
Martin Gijsen -  Effective Test Automation a la Carte Martin Gijsen -  Effective Test Automation a la Carte
Martin Gijsen - Effective Test Automation a la Carte
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Object oriented testing
Object oriented testingObject oriented testing
Object oriented testing
 
16103271 software-testing-ppt
16103271 software-testing-ppt16103271 software-testing-ppt
16103271 software-testing-ppt
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 
Software test life cycle
Software test life cycleSoftware test life cycle
Software test life cycle
 
Software testing
Software testing   Software testing
Software testing
 
Testing documents
Testing documentsTesting documents
Testing documents
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Manual Testing Notes
Manual Testing NotesManual Testing Notes
Manual Testing Notes
 
Software testing
Software testingSoftware testing
Software testing
 

Viewers also liked

Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowBob Binder
 
Model-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowModel-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowBob Binder
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testingBugRaptors
 
Approaches to Software Testing
Approaches to Software TestingApproaches to Software Testing
Approaches to Software TestingScott Barber
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyDharmalingam Ganesan
 
What Exactly are the Techniques of Software Verification & Validation
What Exactly are the Techniques of Software Verification & ValidationWhat Exactly are the Techniques of Software Verification & Validation
What Exactly are the Techniques of Software Verification & ValidationYogindernath Gupta
 
Iseb, ISTQB Static Testing
Iseb, ISTQB Static TestingIseb, ISTQB Static Testing
Iseb, ISTQB Static Testingonsoftwaretest
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelBob Binder
 
Chapter 8 software testing
Chapter 8 software testingChapter 8 software testing
Chapter 8 software testingdespicable me
 
software testing strategies
software testing strategiessoftware testing strategies
software testing strategiesHemanth Gajula
 

Viewers also liked (18)

Model-Based Testing: Why, What, How
Model-Based Testing: Why, What, HowModel-Based Testing: Why, What, How
Model-Based Testing: Why, What, How
 
Model based testing
Model based testingModel based testing
Model based testing
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Model-based Testing: Today And Tomorrow
Model-based Testing: Today And TomorrowModel-based Testing: Today And Tomorrow
Model-based Testing: Today And Tomorrow
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
Approaches to Software Testing
Approaches to Software TestingApproaches to Software Testing
Approaches to Software Testing
 
Black box software testing
Black box software testingBlack box software testing
Black box software testing
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
 
What Exactly are the Techniques of Software Verification & Validation
What Exactly are the Techniques of Software Verification & ValidationWhat Exactly are the Techniques of Software Verification & Validation
What Exactly are the Techniques of Software Verification & Validation
 
Iseb, ISTQB Static Testing
Iseb, ISTQB Static TestingIseb, ISTQB Static Testing
Iseb, ISTQB Static Testing
 
Testing strategies
Testing strategiesTesting strategies
Testing strategies
 
Model-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next LevelModel-based Testing: Taking BDD/ATDD to the Next Level
Model-based Testing: Taking BDD/ATDD to the Next Level
 
Chapter 8 software testing
Chapter 8 software testingChapter 8 software testing
Chapter 8 software testing
 
software testing strategies
software testing strategiessoftware testing strategies
software testing strategies
 
Analytical Risk-based and Specification-based Testing - Bui Duy Tam
Analytical Risk-based and Specification-based Testing - Bui Duy TamAnalytical Risk-based and Specification-based Testing - Bui Duy Tam
Analytical Risk-based and Specification-based Testing - Bui Duy Tam
 
Static Testing
Static TestingStatic Testing
Static Testing
 

Similar to Model-based Testing Principles

Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...REvERSE University of Naples Federico II
 
Queuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsQueuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsLeonid Grinshpan, Ph.D.
 
Close encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet CodeClose encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet Codelbergmans
 
Close Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codeClose Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codelbergmans
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.pptssuser2ef938
 
Hakan Fredriksson - Experiences With MBT and Qtronic
Hakan Fredriksson - Experiences With MBT and Qtronic Hakan Fredriksson - Experiences With MBT and Qtronic
Hakan Fredriksson - Experiences With MBT and Qtronic TEST Huddle
 
Serenity Project: Security in Software Enginering
Serenity Project: Security in Software EngineringSerenity Project: Security in Software Enginering
Serenity Project: Security in Software EngineringFrancisco Sanchez Cid
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Benoit Combemale
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009Pepe
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Lionel Briand
 
MBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaMBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaObeo
 
UVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxUVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxnikitha992646
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processesmanishthaper
 
Elvior Company Introduction T3UC Beijing 2010
Elvior Company Introduction T3UC Beijing 2010Elvior Company Introduction T3UC Beijing 2010
Elvior Company Introduction T3UC Beijing 2010ELVIOR
 
Agile Modelling Architecture
Agile Modelling ArchitectureAgile Modelling Architecture
Agile Modelling Architecturepierino23
 
Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for SpaceUlisses Costa
 
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...KIIT
 

Similar to Model-based Testing Principles (20)

Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...Comparing model coverage and code coverage in Model Driven testing: an explor...
Comparing model coverage and code coverage in Model Driven testing: an explor...
 
Queuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applicationsQueuing model based load testing of large enterprise applications
Queuing model based load testing of large enterprise applications
 
Close encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet CodeClose encounters in MDD: when Models meet Code
Close encounters in MDD: when Models meet Code
 
Close Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet codeClose Encounters in MDD: when models meet code
Close Encounters in MDD: when models meet code
 
Presentation Of Mbt Tools
Presentation Of Mbt ToolsPresentation Of Mbt Tools
Presentation Of Mbt Tools
 
xUMLFinalPresentation.ppt
xUMLFinalPresentation.pptxUMLFinalPresentation.ppt
xUMLFinalPresentation.ppt
 
Hakan Fredriksson - Experiences With MBT and Qtronic
Hakan Fredriksson - Experiences With MBT and Qtronic Hakan Fredriksson - Experiences With MBT and Qtronic
Hakan Fredriksson - Experiences With MBT and Qtronic
 
Serenity Project: Security in Software Enginering
Serenity Project: Security in Software EngineringSerenity Project: Security in Software Enginering
Serenity Project: Security in Software Enginering
 
Testing
TestingTesting
Testing
 
ECSA 2011 (Navarro)
ECSA 2011 (Navarro)ECSA 2011 (Navarro)
ECSA 2011 (Navarro)
 
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
Efficient and Advanced Omniscient Debugging for xDSMLs (SLE 2015)
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009
 
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...Making Model-Driven Verification Practical and Scalable: Experiences and Less...
Making Model-Driven Verification Practical and Scalable: Experiences and Less...
 
MBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with CapellaMBSE and Model-Based Testing with Capella
MBSE and Model-Based Testing with Capella
 
UVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxUVM_Full_Print_n.pptx
UVM_Full_Print_n.pptx
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
 
Elvior Company Introduction T3UC Beijing 2010
Elvior Company Introduction T3UC Beijing 2010Elvior Company Introduction T3UC Beijing 2010
Elvior Company Introduction T3UC Beijing 2010
 
Agile Modelling Architecture
Agile Modelling ArchitectureAgile Modelling Architecture
Agile Modelling Architecture
 
Automatic Test Generation for Space
Automatic Test Generation for SpaceAutomatic Test Generation for Space
Automatic Test Generation for Space
 
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
Generation of Testcases from UML Sequence Diagram and Detecting Deadlocks usi...
 

More from Henry Muccini

Human Behaviour Centred Design
Human Behaviour Centred Design Human Behaviour Centred Design
Human Behaviour Centred Design Henry Muccini
 
How cultural heritage, cyber-physical spaces, and software engineering can wo...
How cultural heritage, cyber-physical spaces, and software engineering can wo...How cultural heritage, cyber-physical spaces, and software engineering can wo...
How cultural heritage, cyber-physical spaces, and software engineering can wo...Henry Muccini
 
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle Segreterie
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle SegreterieLa gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle Segreterie
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle SegreterieHenry Muccini
 
Turismo 4.0: l'ICT a supporto del turismo sostenibile
Turismo 4.0: l'ICT a supporto del turismo sostenibileTurismo 4.0: l'ICT a supporto del turismo sostenibile
Turismo 4.0: l'ICT a supporto del turismo sostenibileHenry Muccini
 
Sustainable Tourism - IoT and crowd management
Sustainable Tourism - IoT and crowd managementSustainable Tourism - IoT and crowd management
Sustainable Tourism - IoT and crowd managementHenry Muccini
 
Software Engineering at the age of the Internet of Things
Software Engineering at the age of the Internet of ThingsSoftware Engineering at the age of the Internet of Things
Software Engineering at the age of the Internet of ThingsHenry Muccini
 
The influence of Group Decision Making on Architecture Design Decisions
The influence of Group Decision Making on Architecture Design DecisionsThe influence of Group Decision Making on Architecture Design Decisions
The influence of Group Decision Making on Architecture Design DecisionsHenry Muccini
 
An IoT Software Architecture for an Evacuable Building Architecture
An IoT Software Architecture for an Evacuable Building ArchitectureAn IoT Software Architecture for an Evacuable Building Architecture
An IoT Software Architecture for an Evacuable Building ArchitectureHenry Muccini
 
Web Engineering L8: User-centered Design (8/8)
Web Engineering L8: User-centered Design (8/8)Web Engineering L8: User-centered Design (8/8)
Web Engineering L8: User-centered Design (8/8)Henry Muccini
 
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)Henry Muccini
 
Web Engineering L6: Software Architecture for the Web (6/8)
Web Engineering L6: Software Architecture for the Web (6/8)Web Engineering L6: Software Architecture for the Web (6/8)
Web Engineering L6: Software Architecture for the Web (6/8)Henry Muccini
 
Web Engineering L5: Content Model (5/8)
Web Engineering L5: Content Model (5/8)Web Engineering L5: Content Model (5/8)
Web Engineering L5: Content Model (5/8)Henry Muccini
 
Web Engineering L3: Project Planning (3/8)
Web Engineering L3: Project Planning (3/8)Web Engineering L3: Project Planning (3/8)
Web Engineering L3: Project Planning (3/8)Henry Muccini
 
Web Engineering L2: Requirements Elicitation for the Web (2/8)
Web Engineering L2: Requirements Elicitation for the Web (2/8)Web Engineering L2: Requirements Elicitation for the Web (2/8)
Web Engineering L2: Requirements Elicitation for the Web (2/8)Henry Muccini
 
Web Engineering L1: introduction to Web Engineering (1/8)
Web Engineering L1: introduction to Web Engineering (1/8)Web Engineering L1: introduction to Web Engineering (1/8)
Web Engineering L1: introduction to Web Engineering (1/8)Henry Muccini
 
Web Engineering L4: Requirements and Planning in concrete (4/8)
Web Engineering L4: Requirements and Planning in concrete (4/8)Web Engineering L4: Requirements and Planning in concrete (4/8)
Web Engineering L4: Requirements and Planning in concrete (4/8)Henry Muccini
 
Collaborative aspects of Decision Making and its impact on Sustainability
Collaborative aspects of Decision Making and its impact on SustainabilityCollaborative aspects of Decision Making and its impact on Sustainability
Collaborative aspects of Decision Making and its impact on SustainabilityHenry Muccini
 
Engineering Cyber Physical Spaces
Engineering Cyber Physical SpacesEngineering Cyber Physical Spaces
Engineering Cyber Physical SpacesHenry Muccini
 
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPIS
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPISI progetti UnivAq-UFFIZI, INCIPICT, e  CUSPIS
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPISHenry Muccini
 
Exploring the Temporal Aspects of Software Architecture
Exploring the Temporal Aspects of Software ArchitectureExploring the Temporal Aspects of Software Architecture
Exploring the Temporal Aspects of Software ArchitectureHenry Muccini
 

More from Henry Muccini (20)

Human Behaviour Centred Design
Human Behaviour Centred Design Human Behaviour Centred Design
Human Behaviour Centred Design
 
How cultural heritage, cyber-physical spaces, and software engineering can wo...
How cultural heritage, cyber-physical spaces, and software engineering can wo...How cultural heritage, cyber-physical spaces, and software engineering can wo...
How cultural heritage, cyber-physical spaces, and software engineering can wo...
 
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle Segreterie
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle SegreterieLa gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle Segreterie
La gestione dell’utenza numerosa - dalle Segreterie, ai Musei, alle Segreterie
 
Turismo 4.0: l'ICT a supporto del turismo sostenibile
Turismo 4.0: l'ICT a supporto del turismo sostenibileTurismo 4.0: l'ICT a supporto del turismo sostenibile
Turismo 4.0: l'ICT a supporto del turismo sostenibile
 
Sustainable Tourism - IoT and crowd management
Sustainable Tourism - IoT and crowd managementSustainable Tourism - IoT and crowd management
Sustainable Tourism - IoT and crowd management
 
Software Engineering at the age of the Internet of Things
Software Engineering at the age of the Internet of ThingsSoftware Engineering at the age of the Internet of Things
Software Engineering at the age of the Internet of Things
 
The influence of Group Decision Making on Architecture Design Decisions
The influence of Group Decision Making on Architecture Design DecisionsThe influence of Group Decision Making on Architecture Design Decisions
The influence of Group Decision Making on Architecture Design Decisions
 
An IoT Software Architecture for an Evacuable Building Architecture
An IoT Software Architecture for an Evacuable Building ArchitectureAn IoT Software Architecture for an Evacuable Building Architecture
An IoT Software Architecture for an Evacuable Building Architecture
 
Web Engineering L8: User-centered Design (8/8)
Web Engineering L8: User-centered Design (8/8)Web Engineering L8: User-centered Design (8/8)
Web Engineering L8: User-centered Design (8/8)
 
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)
Web Engineering L7: Sequence Diagrams and Design Decisions (7/8)
 
Web Engineering L6: Software Architecture for the Web (6/8)
Web Engineering L6: Software Architecture for the Web (6/8)Web Engineering L6: Software Architecture for the Web (6/8)
Web Engineering L6: Software Architecture for the Web (6/8)
 
Web Engineering L5: Content Model (5/8)
Web Engineering L5: Content Model (5/8)Web Engineering L5: Content Model (5/8)
Web Engineering L5: Content Model (5/8)
 
Web Engineering L3: Project Planning (3/8)
Web Engineering L3: Project Planning (3/8)Web Engineering L3: Project Planning (3/8)
Web Engineering L3: Project Planning (3/8)
 
Web Engineering L2: Requirements Elicitation for the Web (2/8)
Web Engineering L2: Requirements Elicitation for the Web (2/8)Web Engineering L2: Requirements Elicitation for the Web (2/8)
Web Engineering L2: Requirements Elicitation for the Web (2/8)
 
Web Engineering L1: introduction to Web Engineering (1/8)
Web Engineering L1: introduction to Web Engineering (1/8)Web Engineering L1: introduction to Web Engineering (1/8)
Web Engineering L1: introduction to Web Engineering (1/8)
 
Web Engineering L4: Requirements and Planning in concrete (4/8)
Web Engineering L4: Requirements and Planning in concrete (4/8)Web Engineering L4: Requirements and Planning in concrete (4/8)
Web Engineering L4: Requirements and Planning in concrete (4/8)
 
Collaborative aspects of Decision Making and its impact on Sustainability
Collaborative aspects of Decision Making and its impact on SustainabilityCollaborative aspects of Decision Making and its impact on Sustainability
Collaborative aspects of Decision Making and its impact on Sustainability
 
Engineering Cyber Physical Spaces
Engineering Cyber Physical SpacesEngineering Cyber Physical Spaces
Engineering Cyber Physical Spaces
 
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPIS
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPISI progetti UnivAq-UFFIZI, INCIPICT, e  CUSPIS
I progetti UnivAq-UFFIZI, INCIPICT, e  CUSPIS
 
Exploring the Temporal Aspects of Software Architecture
Exploring the Temporal Aspects of Software ArchitectureExploring the Temporal Aspects of Software Architecture
Exploring the Temporal Aspects of Software Architecture
 

Recently uploaded

4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...MerlizValdezGeronimo
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Recently uploaded (20)

4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...
IPCRF/RPMS 2024 Classroom Observation tool is your access to the new performa...
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

Model-based Testing Principles

  • 1. Università degli Studi dell’Aquila L22. Model-based Testing (Principles) Henry Muccini DISIM, University of L’Aquila www.henrymuccini.com, henry.muccini@univaq.it
  • 2. Copyright Notice The material in these slides may be freely reproduced and distributed, partially or totally, as far as an explicit reference or acknowledge to the material author is preserved. Henry Muccini
  • 3.
  • 4. Agenda Modeling MBT: →Why? →Modelsfor MBT →UML-based Testing ─ Testing activities
  • 5. AGENDA Modeling Model-based testing Why? Models for MBT UML-based Testing
  • 6. Modeling: there is not just programming What is a model: →A model is a simplification of the reality →The reality is abstracted, since it is too complex Why modeling →Models are built for a better understanding of the system under development Everything is a model ?!?
  • 10. Other Software Models (Web models)
  • 11. … other software models…
  • 12. … and many others… Pilot Pilot CoPilot CoPilot Multifunction Multifunction Multifunction Multifunction Display1 Display2 Display1 Display2 Display Display Display Display Processor Processor Processor Processor High speed network High speed network Mission Mission Mission Processor Processor Processor 1553 bus 1553 bus Auto-Pilot GPS Nav Radio
  • 13. Model Driven Development (MDD) Models are becoming first core assets in Software Engineering/Architecting: →models are primary artifacts retained as first class entities that can be analyzed and manipulated by means of automated tools →the focus moves from writing and sharing documents to writing and sharing models.
  • 14. From Document Driven to Model Driven
  • 15. Models in MDD Models in MDD can be used for: →Documenting design decisions →Guiding the coding phase →For analyzing and validating design choices ─ by complementing traditional code-level analysis techniques
  • 16. Why modeling? For Documenting and Analysis
  • 17. What is MBT? It consists in: →ExtractingTest Cases from the Model →Run the test case over the system implementation Purpose: →Tovalidate the implementation conformance to the model ─ The model itself is the oracle, i.e., it represents the expected behavior
  • 18. Model-based Testing A model based testing approach accepts two main inputs →a model of the software under test, →a set of test generation directives which guide the test cases selection and outputs a test specification →which includes a set of stimuli the tester should introduce in the system together with expected responses
  • 19. Modeling for testing Essentially, we need (at least) a behavioral model of the software system: →Labelled Transition System →StateCharts →UML State of Sequence Diagrams →IOLTS →Finite State Automata →…
  • 20. The base-line technique for designing test cases →Timely ─ Often useful in refining specifications and assessing testability before code is written →Effective ─ finds some classes of fault (e.g., missing logic) that can elude other approaches →Widely applicable ─ to any description of program behavior serving as spec ─ at any level of granularity from module to system testing. →Economical ─ typically less expensive to design and execute than structural (code-based) test cases (C) 2007 MAURO PEZZÈ & MICHAL YOUNG
  • 21. Program code is not necessary →Only a description of intended behavior is needed →Even incomplete and informal specifications can be used ─ Although precise, complete specifications lead to better test suites Early functional test design has side benefits →Often reveals ambiguities and inconsistency in spec →Useful for assessing testability ─ And improving test schedule and budget by improving spec →Useful explanation of specification ─ or in the extreme case (as in XP), test cases are the spec (C) 2007 MAURO PEZZÈ & MICHAL YOUNG
  • 22. Different testing strategies (functional, structural, fault-based, model-based) are most effective for different classes of faults Functional testing is best for missing logic faults →A common problem: Some program logic was simply forgotten →Structural (code-based) testing will never focus on code that isn’t there! (C) 2007 MAURO PEZZÈ & MICHAL YOUNG
  • 23. Modeling for testing Such a model can be produced: 1. Through a formal specification language ─ Typically referred as formal testing 2. Through a diagrammatic (visual) notation ─ Typically referred as UML-based Testing
  • 24. 1. MBT based on Formal Specifications Since the 80’s, many specification-based testing approaches have been proposed, based on formal languages such as →Z, VDM, CSP, CCS, LOTOS, SDL, and Petri Nets. More recently: →Based on dynamic behavior: ─ FSM-based (Bochmann&Petrenko, Lee&Yannakis, …) ─ LTS-based (Brinksma&Tretmans, Jard&Jeron …) →Focussing on static aspects, ─ ADT theory (Bernot&Gaudel…) ─ Z-based (Hierons…)
  • 25. Formal Specification-based Testing TorX (Côte de Resyste) → on-the-fly test generation and execution → random → LOTOS and Promela TGV (IRISA - Rennes) →derives tests in TTCN from LOTOS or SDL → uses test purposes TVEDA (CNET - France Telecom) → derives TTCN tests from SDL specification
  • 26. 2. MBT based on the UML UML State-machine based testing: →which might require the translation of the UML diagrams into an intermediate formal description Scenario-based testing: →based on the use of opportunely annotated UML Sequence Diagram State-based and Scenario-based: combine the use of interaction diagrams and state diagram, possibly annotated with further (formal) information (e.g. OCL)
  • 27. Model-based Testing: the overall idea From Leila Naslavsky Advancement report
  • 28. AsmL L TESTO OR UMLAU UT Model-based Testing Approaches UMLTe est AGEDI IS TOTEM M SOOT TF COW-SU UITE SCENTO OR SeDiTe eC UCSC-Sy ystem
  • 29. Main Testing Activities Test Selection/Generation: →it consists in selecting a suitable and finite set of test cases from the possibly infinite set; Test Execution and Evaluation: →it consists in executing the code accordingly to the selected test cases and comparing real and expected results;
  • 30. Test Selection A test case, in MBT, is typically a possible “scenario” →In scenario-based testing: ─ A scenario itself is an abstract test case →In state-based testing ─ Execution flows are extraced from the state machine and represent a test case ─ MB coverage criteria are applied on this model
  • 31. Test Case Selection Abstract Test case = path over the LTS/FSM, corresponding to sequences of events ─ They are not “concrete” test cases, but abstract (depending on the specification) →Concrete Test cases = mapping asbtract test cases into execution statements to be launched
  • 32. Test Case Selection Model of the Test system directives inSD 1 1 C1 C2 m9 m1 Test specification outSD1 2 C1 C2 C3 m9 m3 m8 m1
  • 34. Test Execution It consists in running the test cases on the system implementation →So to compare the real execution with the expected behavior
  • 35. MBT practical concerns Traceability, i.e. relating the abstract values of the specification to the concrete values of the implementation. Execution, i.e. forcing the Implementation Under Test (IUT) to execute the specific sequence of events that has been selected.
  • 36. Testing and Industry In order to be suitable for industrial needs a testing approach has to emphasize the following qualities: →Usability ─ Not ad-hoc models →Timeliness ─ Soon and even incomplete Opposed to →Tool support accuracy Goal of a suitable testing approach should be “to improve the test results accuracy without sensibly raising the testing effort”
  • 37. MBT Tools There are some automated tools for MBT: →Telelogic Tau and Tau Tester →Leirios Test Designer →Conformiq Qtronic →Rhapsody Test Conductor and Automatic Test Generation →AGEDIS
  • 38. MBT in industry: challenges and issues As remarked by Alan Hartman in his 2006 speech at ISSTA: →“Only 1% of industry uses it” Why?
  • 39. Why? The main reasons I foresee: →Model2Code (and viceversa) traceability problems →modeling is not yet so widely recognized as part of the development process. ─ Legacy systems →because of tool/service problems →cost/effectiveness is still under exploration
  • 40. Conformiq: Two models are required in Input •SutModel.Java (in QML) •SutModel.xmi (Graphical Notation)
  • 41. QML Just like Java, QML consists of variables and expressions, all strictly typed and known before the compilation. The types are divided into the same three groups that Java has: primitives, references and values
  • 42. QML QML extends Java with: Records Ports System block State machines
  • 45. Coverage Figure 5 – The Coverage Editor window