SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Experiences Working with
MBT and Qtronic
Håkan Fredriksson
Ericsson AB
hakan.fredriksson@ericsson.com
© Ericsson AB 2009 2 (36)
Contents
1. MBT - Introduction
2. Modeling
3. Test Case Generation
4. Conclusions
© Ericsson AB 2009 3 (36)
1. MBT - Introduction
© Ericsson AB 2009 4 (36)
MBT – What It Is
Input:
Customer requirements,
Function Specifications,
Function Descriptions,
Interwork Descriptions,
etc.Model
design
(UML) Modeling
tool
MBT tool
(e.g. Qtronic)
Test Management
tool
Input
Generate
Test
cases
Import
Automated
test scripts
Test automation
tool/framework
Test results
Execute
Test documentation
Generate
Generate
© Ericsson AB 2009 5 (36)
MBT - Where We Were Before MBT
► A fairly stable test organization
► A fairly mature product to test
► Fairly stable test environment and tools (partly self
developed)
► Main part (90%) of the Test Cases automated
► A huge amount of Test Cases/scripts – which had
started to become expensive to maintain
The perfect background for trying out new tools
and methods!
© Ericsson AB 2009 6 (36)
MBT – Why We Introduced it
► “Operational Excellence”…
► Reduced costs and shortened lead-times, by
- generation of test documentation
- generation of Test Cases
- generation of automated test scripts
► Increase agility
► Improve test coverage
► Get “better” (more complex) Test Cases
► Improve Test Case and test script quality
► More inspirational challenges for the testers
► Highlight the tester’s role in the organization
► …and so on
© Ericsson AB 2009 8 (36)
MBT – Introduction of MBT
► Requires stability and maturity
- the actual product
- the organization
- methods used
- tools and test framework
► Suitable objects/functions to test
Recommendation: Use MBT for Function Test first (avoid
performance tests, characteristics, measurements, load,
stability, etc. in the beginning)
► The substantial gains will be received when:
- You have a need for (or benefit of) automated test suites –
for example: you run regression tests on a regular basis
- All testing can be fully automated – and no manual
intervention is needed to test your functionality
© Ericsson AB 2009 9 (36)
2. Modeling
© Ericsson AB 2009 10 (36)
Modeling – Modeling Tools
With Qtronic:
► The Conformiq Modeler
► Rational’s tool kit (RSA-RTE)
► (From Qtronic 2.1:) IBM/Telelogic Rhapsody
Action language with Qtronic: “QML”/extended Java
Other MBT tools offer other solutions, for example with
Smartesting, you can model with either Rational’s tools
or with Borland’s Together.
© Ericsson AB 2009 11 (36)
Modeling – Model Design
Recommendation: Do not use the same model to both generate code
and generate Test Cases!
Differ between the two different model types:
Development Model
► Main purpose: generate code
► Technical model
► Often contains implementation information
Test Model
► Main purpose: generate Test Cases
► Functional model – describing the system behavior of a certain
system function (or part of a system function)
► Contains no implementation information
► Black box model
© Ericsson AB 2009 12 (36)
Modeling – Model Design
When designing your MBT model you can have two
different approaches:
► Design your model from scratch – independently from
other existing models
► Reuse and adapt other existing development models:
- Customize the model to your needs
- Simplify the model
- Strip all irrelevant information from the model
- Make sure that it is black box, and describes the
system behavior in a proper way
© Ericsson AB 2009 13 (36)
Modeling – Model Design
Our approach:
High level system model
Black box
Responsible:
System department
Stripped model
Black box
Responsible:
Test department
Detailed model with
implementation information
“White box”
Responsible:
Design department
Model
adaptations
Further model
development
Test
Model
Development
Model
© Ericsson AB 2009 14 (36)
Modeling – Qtronic Requirements
A key concept – and a very useful concept to us.
A Qtronic Requirement is a requirement on Qtronic, that a certain ”event”
or “situation” must be covered in (at least) one Test Case. It does not
necessarily refer to the functionality provided by the SUT.
A requirement is introduced in the model as a text string, where the
event/situation has been covered.
Example: ” Synch ref type 1 is active / Register new type 2 synch ref /
with lower priority than the active synch ref”
The Qtronic requirements can also be used for traceability to the “real”
(customer) requirements, e.g. with simple tagging.
”Requirement coverage” was for us also the best indication of the quality
of the outcome from the Test Case generation.
We found it very beneficial to define all the requirements early on - before
you start designing the actual model.
© Ericsson AB 2009 15 (36)
Modeling – Selecting Suitable Functions
Technical criteria to consider:
► There is a need for/benefit of having automated test suites
► It is possible to fully automate the testing of the functionality covered
by the model (and to do so in a practical way)
► No manual interaction will be required during test execution
► A proper abstraction of the functionality should result in a fairly small
model
► The test scope should not be too small
► The individual Model Requirements should not take too long time to
verify (automatically)
Other criteria must be considered as well, e.g. strategic, project wise and
practical criteria.
© Ericsson AB 2009 16 (36)
Modeling – Competence Needed
► Compared to traditional test methods, MBT is a complete paradigm
shift
► New competences are required, and training must be taken care of
► New roles must be established within the test organization,
especially the model designer/”test architect”
► The testers must learn to not think as testers. When designing the
model, the tester shall not think in terms of Test Cases – the tester
should, ultimately, only consider the system behavior
► The tester must have a thorough understanding of the functionality,
and be involved in (and contribute to!) the development project
already in the early stages
Working with MBT has increased the motivation among the testers.
Most testers consider MBT as challenging, inspiring, and Fun!
© Ericsson AB 2009 17 (36)
Modeling – Way of Working
► MBT is well suited for pair modeling/programming
► It is recommended that the model is designed in small
increments
► Existing methods for reviews and inspections might not
be suited for MBT – new, and hopefully more efficient,
methods must then be invented
► Keep it simple
Modeling is all about abstraction!
© Ericsson AB 2009 18 (36)
3. Test Case Generation
© Ericsson AB 2009 19 (36)
Generation – MBT Tools
There are a couple of different (but similar) tools available
on the market:
► Qtronic from Conformiq (Finland/Sweden/USA)
► Smartesting (France)
► MaTeLo from All4Tec (France)
► …
At Ericsson we have been using Qtronic, and mainly for
Function Test, but it has also been used for
Component Test. It has not been used for performance
tests (characteristics, load tests, stability test, etc.)
© Ericsson AB 2009 20 (36)
Generation – MBT Tools
Main differences between Qtronic and Smartesting:
► Smartesting is marketed mainly towards business models, web
applications, etc.
Qtronic concentrates on Communication, Telecom etc.
► Qtronic action language: Java
Smartesting: OCL
► Qtronic handles the data inside the model
Smartesting: You have to handle the data yourself, in a separate excel
sheet
► Smartesting requires HP QC (or similar Test Management tool) to get
the connection between requirements and Test Cases
Qtronic provides a clear visual overview of this, but offers no plug-in to
any TM tool
► Generation times seem to be similar, but no detailed study has been
carried out (yet)
© Ericsson AB 2009 21 (36)
Generation – Qtronic
► Runs on either Linux or Windows (and we have tried
out both – no major differences in Qtronic’s
performance have been observed)
► From Qtronic 2.0: Integrated with Eclipse
► General perception: Qtronic is easy to use, and the
support from Conformiq has been very good
© Ericsson AB 2009 22 (36)
Generation – Qtronic
© Ericsson AB 2009 23 (36)
Generation – First Experiences
► The model must be good if the output shall be good!
► The Qtronic user documentation could be better,
especially considering Design Rules and Best Practices
► As an inexperienced modeler it is easy to introduce faults
in your model – and the debugging support available in
the Qtronic tool kit was not very extensive
► The generation times can be long, and sometimes
extremely long
► It is very difficult to predict how your model will affect the
generation times
► There are clear benefits by optimizing the model from a
generation time point of view
© Ericsson AB 2009 24 (36)
Generation – Modeling Considerations
Some hints on how to design your model to get the best
possible output, and shorter generation times:
► Design the model in small increments, and generate
often
► Learn how the tool works by working with it, and by
experimenting (e.g. with the settings) and share the
knowledge you gain
► Review your model often, and pay close attention to
logical faults as well as pure modeling faults, such as
“leakage” and “model holes”
► Also review the model by reviewing the generated Test
Cases
© Ericsson AB 2009 25 (36)
Generation – Modeling Considerations
Some hints on how to design your model (continued)
► Do the tool settings carefully, especially the coverage
criteria and the “look-ahead depth”
► Always start generating with the lowest possible look-
ahead depth, and do not increase it to anything higher
than absolutely necessary
► Avoid parameter combination explosion!
► Avoid extreme model depth!
© Ericsson AB 2009 26 (36)
Generation – Model Depth, Example
STATE 01
STATE 11 STATE 12
Port1_in:EventX
[paramA == true]
Port1_in:EventX
[paramA == false]
STATE 55
STATE 63
STATE 64
Port1_in:EventY
[paramA == false]
Port1_in:EventY
[paramA == true]
© Ericsson AB 2009 27 (36)
Generation – Improvements
Note! There are straight forward ways and methods to
decrease the model depth and to reduce the number of
parameter combinations, but these are not properly
documented.
During the time that we have been using Qtronic, the tool in
general, and the generation times in particular, have been
constantly improved.
Conformiq have given swift and professional support, and
listened to our feed-back.
With Qtronic 2.1 we get the possibility to distribute the
calculations over multiple CPUs and hosts, which will
reduce the generation times considerably.
The debugging support is also improved with Qtronic 2.1.
© Ericsson AB 2009 28 (36)
Generation – Output
► The generated test suite consists of a number of Test
Cases, which in turn contain a number of test steps
► The Test Cases are easy to read, follow and understand
► One Test Case can cover more than one Qtronic
requirement
► One Qtronic requirement can be covered in several
different Test Cases - This is sometimes a drawback,
since even “not so important” requirements, or
requirements that take long time to verify, can be included
many times in one test suite
A way to prioritize the Qtronic requirements would be very
useful
© Ericsson AB 2009 29 (36)
Generation – Output
► We get (slightly) more Test Cases than we would have
gotten if we verified the functionality with our traditional
methods
► Progress reporting regarding how many Test Cases that
have been passed, is no longer relevant - Instead we
have chosen progress reporting based on the number of
verified Qtronic requirements, which works at least as
well.
► We get “better” Test Cases, in terms of being longer and
more complex
► We have found several faults in the SUT that we would
not have found using our traditional methods
© Ericsson AB 2009 30 (36)
Generation – Rendering the Output
Conformiq provides plug-ins that can render the generated Test Cases
into, for example, html documents and automated test scripts.
The html document can be used as input to our test documentation.
(Parts of it anyway – it is a very large document.)
For script generation Conformiq currently provides plug-ins for TCL,
TTCN-3, and java (“jcat”). You can also design your own plug-ins if
you have other needs.
Qtronic 2.1 also provides scripting back-ends for Perl, and for
publishing
Qtronic generated Test Cases in HP Quality Center.
You also need to design your own “test harness” (or “glue”) to be able
to
execute the generated scripts in your own test framework. The size
of this task can vary and depends partly on the model and the test
framework. For our first models this library grew much bigger than
originally planned.
© Ericsson AB 2009 31 (36)
Generation – The Test Scripts
The generated test scripts get a good structure, and were
also easy to read, follow and understand. And they are
easy to edit, which is good for trouble-shooting purposes.
Furthermore you can easily build your own Test Cases
using the structure from the generated test suite.
© Ericsson AB 2009 32 (36)
4. Conclusions
© Ericsson AB 2009 33 (36)
Conclusions – Experiences
Hard experiences:
► Cost - First project: approximately same lead time and
same number of resources as in a project with
traditional way of working
Later projects: average gain at least 30%
Higher gains can be reached when we are able
to re-use model components – the re-usability
turned out to be much higher than originally
anticipated (for example when extending existing
functionality, or when implementing similar
functionality on different platforms)
© Ericsson AB 2009 34 (36)
Conclusions – Experiences
Hard experiences (continued)
► Coverage - Faults found that we would not have found
with traditional test design methods
► Quality - No decrease in the quality of the tested product
has been observed
But difficult to say whether the quality has
increased
© Ericsson AB 2009 35 (36)
Conclusions – Experiences
Soft experiences
► Most testers think of MBT as a very interesting way of
working, and are eager to learn
► High motivation among the testers that have been
working with it – and everyone think is Fun (most of the
time)
► Not all testers are suited for working with modeling
© Ericsson AB 2009 36 (36)
Conclusions – Recommendations
If you are a test organization,
and if you benefit from having automated test suites:
Try out the MBT way of working!
But
Don’t go for full deployment from the start.
Start with a smaller, well defined, well encapsulated,
area/functionality.
And
In the beginning: Stay away from functionality where you
suspect you cannot avoid models with parameter
explosion or great depth

Weitere ähnliche Inhalte

Was ist angesagt?

'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
TEST Huddle
 
'Acceptance Testing' by Erik Boelen
'Acceptance Testing' by Erik Boelen'Acceptance Testing' by Erik Boelen
'Acceptance Testing' by Erik Boelen
TEST Huddle
 
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
TEST Huddle
 
'Model Based Test Design' by Mattias Armholt
'Model Based Test Design' by Mattias Armholt'Model Based Test Design' by Mattias Armholt
'Model Based Test Design' by Mattias Armholt
TEST Huddle
 

Was ist angesagt? (20)

Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success Michael Snyman - Software Test Automation Success
Michael Snyman - Software Test Automation Success
 
'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
'Architecture Testing: Wrongly Ignored!' by Peter Zimmerer
 
'Acceptance Testing' by Erik Boelen
'Acceptance Testing' by Erik Boelen'Acceptance Testing' by Erik Boelen
'Acceptance Testing' by Erik Boelen
 
Tim Koomen - Testing Package Solutions: Business as usual? - EuroSTAR 2010
Tim Koomen - Testing Package Solutions: Business as usual? - EuroSTAR 2010Tim Koomen - Testing Package Solutions: Business as usual? - EuroSTAR 2010
Tim Koomen - Testing Package Solutions: Business as usual? - EuroSTAR 2010
 
Bruno Legeard - Model-Based Testing of a Financial Application
Bruno Legeard -  Model-Based Testing of a Financial ApplicationBruno Legeard -  Model-Based Testing of a Financial Application
Bruno Legeard - Model-Based Testing of a Financial Application
 
Wim Demey - Regression Testing in a Migration Project
Wim Demey - Regression Testing in a Migration Project Wim Demey - Regression Testing in a Migration Project
Wim Demey - Regression Testing in a Migration Project
 
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
Frank Cohen - Are We Ready For Cloud Testing - EuroSTAR 2010
 
Otto Vinter - Analysing Your Defect Data for Improvement Potential
Otto Vinter - Analysing Your Defect Data for Improvement PotentialOtto Vinter - Analysing Your Defect Data for Improvement Potential
Otto Vinter - Analysing Your Defect Data for Improvement Potential
 
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
Christian Bk Hansen - Agile on Huge Banking Mainframe Legacy Systems - EuroST...
 
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
Anders Claesson - Test Strategies in Agile Projects - EuroSTAR 2010
 
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
'Continuous Quality Improvements – A Journey Through The Largest Scrum Projec...
 
Seretta Gamba - A Sneaky Way to Introduce More Automated Testing
Seretta Gamba - A Sneaky Way to Introduce More Automated TestingSeretta Gamba - A Sneaky Way to Introduce More Automated Testing
Seretta Gamba - A Sneaky Way to Introduce More Automated Testing
 
Mieke Gevers - Performance Testing in 5 Steps - A Guideline to a Successful L...
Mieke Gevers - Performance Testing in 5 Steps - A Guideline to a Successful L...Mieke Gevers - Performance Testing in 5 Steps - A Guideline to a Successful L...
Mieke Gevers - Performance Testing in 5 Steps - A Guideline to a Successful L...
 
Graham Bath - SOA: Whats in it for Testers?
Graham Bath - SOA: Whats in it for Testers?Graham Bath - SOA: Whats in it for Testers?
Graham Bath - SOA: Whats in it for Testers?
 
Mickiel Vroon - Test Environment, The Future Achilles’ Heel
Mickiel Vroon - Test Environment, The Future Achilles’ HeelMickiel Vroon - Test Environment, The Future Achilles’ Heel
Mickiel Vroon - Test Environment, The Future Achilles’ Heel
 
Dominic Maes - Testing "slow flows" Fast, Automated End-2-End Testing using i...
Dominic Maes - Testing "slow flows" Fast, Automated End-2-End Testing using i...Dominic Maes - Testing "slow flows" Fast, Automated End-2-End Testing using i...
Dominic Maes - Testing "slow flows" Fast, Automated End-2-End Testing using i...
 
Gitte Ottosen - Agility and Process Maturity, Of Course They Mix!
Gitte Ottosen - Agility and Process Maturity, Of Course They Mix!Gitte Ottosen - Agility and Process Maturity, Of Course They Mix!
Gitte Ottosen - Agility and Process Maturity, Of Course They Mix!
 
'Model Based Test Design' by Mattias Armholt
'Model Based Test Design' by Mattias Armholt'Model Based Test Design' by Mattias Armholt
'Model Based Test Design' by Mattias Armholt
 
C.V, Narayanan - Open Source Tools for Test Management - EuroSTAR 2010
C.V, Narayanan - Open Source Tools for Test Management - EuroSTAR 2010C.V, Narayanan - Open Source Tools for Test Management - EuroSTAR 2010
C.V, Narayanan - Open Source Tools for Test Management - EuroSTAR 2010
 
Darius Silingas - From Model Driven Testing to Test Driven Modelling
Darius Silingas - From Model Driven Testing to Test Driven ModellingDarius Silingas - From Model Driven Testing to Test Driven Modelling
Darius Silingas - From Model Driven Testing to Test Driven Modelling
 

Ähnlich wie Hakan Fredriksson - Experiences With MBT and Qtronic

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
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
Sabrina Souto
 

Ähnlich wie Hakan Fredriksson - Experiences With MBT and Qtronic (20)

chapter 2 (1).ppt
chapter 2 (1).pptchapter 2 (1).ppt
chapter 2 (1).ppt
 
Waterfall models.ppt
Waterfall models.pptWaterfall models.ppt
Waterfall models.ppt
 
Model.ppt
Model.pptModel.ppt
Model.ppt
 
COCOMO 1 Model ppt AR-1.pdf
COCOMO 1 Model  ppt AR-1.pdfCOCOMO 1 Model  ppt AR-1.pdf
COCOMO 1 Model ppt AR-1.pdf
 
In Depth Constructive Cost Modeling related slides
In Depth Constructive Cost Modeling related slidesIn Depth Constructive Cost Modeling related slides
In Depth Constructive Cost Modeling related slides
 
2.SDLC Models.ppt
2.SDLC Models.ppt2.SDLC Models.ppt
2.SDLC Models.ppt
 
Next level of test automation with Model-based Testing (MBT): Experience and ...
Next level of test automation with Model-based Testing (MBT): Experience and ...Next level of test automation with Model-based Testing (MBT): Experience and ...
Next level of test automation with Model-based Testing (MBT): Experience and ...
 
Oose unit 5 ppt
Oose unit 5 pptOose unit 5 ppt
Oose unit 5 ppt
 
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...
 
OOSE Unit 5 PPT.ppt
OOSE Unit 5 PPT.pptOOSE Unit 5 PPT.ppt
OOSE Unit 5 PPT.ppt
 
Using task models in model-based testing
Using task models in model-based testingUsing task models in model-based testing
Using task models in model-based testing
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Automock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code GenerationAutomock: Interaction-Based Mock Code Generation
Automock: Interaction-Based Mock Code Generation
 
Presentation Of Mbt Tools
Presentation Of Mbt ToolsPresentation Of Mbt Tools
Presentation Of Mbt Tools
 
U-1.pptx
U-1.pptxU-1.pptx
U-1.pptx
 
Advanced Testing with TTCN-3 and UML Testing Profile
Advanced Testing with TTCN-3 and UML Testing ProfileAdvanced Testing with TTCN-3 and UML Testing Profile
Advanced Testing with TTCN-3 and UML Testing Profile
 
presentationpresentationpresentationpresentationpresentation
presentationpresentationpresentationpresentationpresentationpresentationpresentationpresentationpresentationpresentation
presentationpresentationpresentationpresentationpresentation
 
2 (1).ppt
2 (1).ppt2 (1).ppt
2 (1).ppt
 
20220914-MBT-Experiences-SB1-final.pptx
20220914-MBT-Experiences-SB1-final.pptx20220914-MBT-Experiences-SB1-final.pptx
20220914-MBT-Experiences-SB1-final.pptx
 
Metrics
MetricsMetrics
Metrics
 

Mehr von TEST Huddle

Mehr von TEST Huddle (20)

Why We Need Diversity in Testing- Accenture
Why We Need Diversity in Testing- AccentureWhy We Need Diversity in Testing- Accenture
Why We Need Diversity in Testing- Accenture
 
Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar
 
Why you Shouldnt Automated But You Will Anyway
Why you Shouldnt Automated But You Will Anyway Why you Shouldnt Automated But You Will Anyway
Why you Shouldnt Automated But You Will Anyway
 
Being a Tester in Scrum
Being a Tester in ScrumBeing a Tester in Scrum
Being a Tester in Scrum
 
Leveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional TestsLeveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional Tests
 
Using Test Trees to get an Overview of Test Work
Using Test Trees to get an Overview of Test WorkUsing Test Trees to get an Overview of Test Work
Using Test Trees to get an Overview of Test Work
 
Big Data: The Magic to Attain New Heights
Big Data:  The Magic to Attain New HeightsBig Data:  The Magic to Attain New Heights
Big Data: The Magic to Attain New Heights
 
Will Robots Replace Testers?
Will Robots Replace Testers?Will Robots Replace Testers?
Will Robots Replace Testers?
 
TDD For The Rest Of Us
TDD For The Rest Of UsTDD For The Rest Of Us
TDD For The Rest Of Us
 
Scaling Agile with LeSS (Large Scale Scrum)
Scaling Agile with LeSS (Large Scale Scrum)Scaling Agile with LeSS (Large Scale Scrum)
Scaling Agile with LeSS (Large Scale Scrum)
 
Creating Agile Test Strategies for Larger Enterprises
Creating Agile Test Strategies for Larger EnterprisesCreating Agile Test Strategies for Larger Enterprises
Creating Agile Test Strategies for Larger Enterprises
 
Is There A Risk?
Is There A Risk?Is There A Risk?
Is There A Risk?
 
Are Your Tests Well-Travelled? Thoughts About Test Coverage
Are Your Tests Well-Travelled? Thoughts About Test CoverageAre Your Tests Well-Travelled? Thoughts About Test Coverage
Are Your Tests Well-Travelled? Thoughts About Test Coverage
 
Growing a Company Test Community: Roles and Paths for Testers
Growing a Company Test Community: Roles and Paths for TestersGrowing a Company Test Community: Roles and Paths for Testers
Growing a Company Test Community: Roles and Paths for Testers
 
Do we need testers on agile teams?
Do we need testers on agile teams?Do we need testers on agile teams?
Do we need testers on agile teams?
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Testers & Teams on the Agile Fluency™ Journey
Testers & Teams on the Agile Fluency™ Journey Testers & Teams on the Agile Fluency™ Journey
Testers & Teams on the Agile Fluency™ Journey
 
Practical Test Strategy Using Heuristics
Practical Test Strategy Using HeuristicsPractical Test Strategy Using Heuristics
Practical Test Strategy Using Heuristics
 
Thinking Through Your Role
Thinking Through Your RoleThinking Through Your Role
Thinking Through Your Role
 
Using Selenium 3 0
Using Selenium 3 0Using Selenium 3 0
Using Selenium 3 0
 

Kürzlich hochgeladen

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Hakan Fredriksson - Experiences With MBT and Qtronic

  • 1. Experiences Working with MBT and Qtronic Håkan Fredriksson Ericsson AB hakan.fredriksson@ericsson.com
  • 2. © Ericsson AB 2009 2 (36) Contents 1. MBT - Introduction 2. Modeling 3. Test Case Generation 4. Conclusions
  • 3. © Ericsson AB 2009 3 (36) 1. MBT - Introduction
  • 4. © Ericsson AB 2009 4 (36) MBT – What It Is Input: Customer requirements, Function Specifications, Function Descriptions, Interwork Descriptions, etc.Model design (UML) Modeling tool MBT tool (e.g. Qtronic) Test Management tool Input Generate Test cases Import Automated test scripts Test automation tool/framework Test results Execute Test documentation Generate Generate
  • 5. © Ericsson AB 2009 5 (36) MBT - Where We Were Before MBT ► A fairly stable test organization ► A fairly mature product to test ► Fairly stable test environment and tools (partly self developed) ► Main part (90%) of the Test Cases automated ► A huge amount of Test Cases/scripts – which had started to become expensive to maintain The perfect background for trying out new tools and methods!
  • 6. © Ericsson AB 2009 6 (36) MBT – Why We Introduced it ► “Operational Excellence”… ► Reduced costs and shortened lead-times, by - generation of test documentation - generation of Test Cases - generation of automated test scripts ► Increase agility ► Improve test coverage ► Get “better” (more complex) Test Cases ► Improve Test Case and test script quality ► More inspirational challenges for the testers ► Highlight the tester’s role in the organization ► …and so on
  • 7. © Ericsson AB 2009 8 (36) MBT – Introduction of MBT ► Requires stability and maturity - the actual product - the organization - methods used - tools and test framework ► Suitable objects/functions to test Recommendation: Use MBT for Function Test first (avoid performance tests, characteristics, measurements, load, stability, etc. in the beginning) ► The substantial gains will be received when: - You have a need for (or benefit of) automated test suites – for example: you run regression tests on a regular basis - All testing can be fully automated – and no manual intervention is needed to test your functionality
  • 8. © Ericsson AB 2009 9 (36) 2. Modeling
  • 9. © Ericsson AB 2009 10 (36) Modeling – Modeling Tools With Qtronic: ► The Conformiq Modeler ► Rational’s tool kit (RSA-RTE) ► (From Qtronic 2.1:) IBM/Telelogic Rhapsody Action language with Qtronic: “QML”/extended Java Other MBT tools offer other solutions, for example with Smartesting, you can model with either Rational’s tools or with Borland’s Together.
  • 10. © Ericsson AB 2009 11 (36) Modeling – Model Design Recommendation: Do not use the same model to both generate code and generate Test Cases! Differ between the two different model types: Development Model ► Main purpose: generate code ► Technical model ► Often contains implementation information Test Model ► Main purpose: generate Test Cases ► Functional model – describing the system behavior of a certain system function (or part of a system function) ► Contains no implementation information ► Black box model
  • 11. © Ericsson AB 2009 12 (36) Modeling – Model Design When designing your MBT model you can have two different approaches: ► Design your model from scratch – independently from other existing models ► Reuse and adapt other existing development models: - Customize the model to your needs - Simplify the model - Strip all irrelevant information from the model - Make sure that it is black box, and describes the system behavior in a proper way
  • 12. © Ericsson AB 2009 13 (36) Modeling – Model Design Our approach: High level system model Black box Responsible: System department Stripped model Black box Responsible: Test department Detailed model with implementation information “White box” Responsible: Design department Model adaptations Further model development Test Model Development Model
  • 13. © Ericsson AB 2009 14 (36) Modeling – Qtronic Requirements A key concept – and a very useful concept to us. A Qtronic Requirement is a requirement on Qtronic, that a certain ”event” or “situation” must be covered in (at least) one Test Case. It does not necessarily refer to the functionality provided by the SUT. A requirement is introduced in the model as a text string, where the event/situation has been covered. Example: ” Synch ref type 1 is active / Register new type 2 synch ref / with lower priority than the active synch ref” The Qtronic requirements can also be used for traceability to the “real” (customer) requirements, e.g. with simple tagging. ”Requirement coverage” was for us also the best indication of the quality of the outcome from the Test Case generation. We found it very beneficial to define all the requirements early on - before you start designing the actual model.
  • 14. © Ericsson AB 2009 15 (36) Modeling – Selecting Suitable Functions Technical criteria to consider: ► There is a need for/benefit of having automated test suites ► It is possible to fully automate the testing of the functionality covered by the model (and to do so in a practical way) ► No manual interaction will be required during test execution ► A proper abstraction of the functionality should result in a fairly small model ► The test scope should not be too small ► The individual Model Requirements should not take too long time to verify (automatically) Other criteria must be considered as well, e.g. strategic, project wise and practical criteria.
  • 15. © Ericsson AB 2009 16 (36) Modeling – Competence Needed ► Compared to traditional test methods, MBT is a complete paradigm shift ► New competences are required, and training must be taken care of ► New roles must be established within the test organization, especially the model designer/”test architect” ► The testers must learn to not think as testers. When designing the model, the tester shall not think in terms of Test Cases – the tester should, ultimately, only consider the system behavior ► The tester must have a thorough understanding of the functionality, and be involved in (and contribute to!) the development project already in the early stages Working with MBT has increased the motivation among the testers. Most testers consider MBT as challenging, inspiring, and Fun!
  • 16. © Ericsson AB 2009 17 (36) Modeling – Way of Working ► MBT is well suited for pair modeling/programming ► It is recommended that the model is designed in small increments ► Existing methods for reviews and inspections might not be suited for MBT – new, and hopefully more efficient, methods must then be invented ► Keep it simple Modeling is all about abstraction!
  • 17. © Ericsson AB 2009 18 (36) 3. Test Case Generation
  • 18. © Ericsson AB 2009 19 (36) Generation – MBT Tools There are a couple of different (but similar) tools available on the market: ► Qtronic from Conformiq (Finland/Sweden/USA) ► Smartesting (France) ► MaTeLo from All4Tec (France) ► … At Ericsson we have been using Qtronic, and mainly for Function Test, but it has also been used for Component Test. It has not been used for performance tests (characteristics, load tests, stability test, etc.)
  • 19. © Ericsson AB 2009 20 (36) Generation – MBT Tools Main differences between Qtronic and Smartesting: ► Smartesting is marketed mainly towards business models, web applications, etc. Qtronic concentrates on Communication, Telecom etc. ► Qtronic action language: Java Smartesting: OCL ► Qtronic handles the data inside the model Smartesting: You have to handle the data yourself, in a separate excel sheet ► Smartesting requires HP QC (or similar Test Management tool) to get the connection between requirements and Test Cases Qtronic provides a clear visual overview of this, but offers no plug-in to any TM tool ► Generation times seem to be similar, but no detailed study has been carried out (yet)
  • 20. © Ericsson AB 2009 21 (36) Generation – Qtronic ► Runs on either Linux or Windows (and we have tried out both – no major differences in Qtronic’s performance have been observed) ► From Qtronic 2.0: Integrated with Eclipse ► General perception: Qtronic is easy to use, and the support from Conformiq has been very good
  • 21. © Ericsson AB 2009 22 (36) Generation – Qtronic
  • 22. © Ericsson AB 2009 23 (36) Generation – First Experiences ► The model must be good if the output shall be good! ► The Qtronic user documentation could be better, especially considering Design Rules and Best Practices ► As an inexperienced modeler it is easy to introduce faults in your model – and the debugging support available in the Qtronic tool kit was not very extensive ► The generation times can be long, and sometimes extremely long ► It is very difficult to predict how your model will affect the generation times ► There are clear benefits by optimizing the model from a generation time point of view
  • 23. © Ericsson AB 2009 24 (36) Generation – Modeling Considerations Some hints on how to design your model to get the best possible output, and shorter generation times: ► Design the model in small increments, and generate often ► Learn how the tool works by working with it, and by experimenting (e.g. with the settings) and share the knowledge you gain ► Review your model often, and pay close attention to logical faults as well as pure modeling faults, such as “leakage” and “model holes” ► Also review the model by reviewing the generated Test Cases
  • 24. © Ericsson AB 2009 25 (36) Generation – Modeling Considerations Some hints on how to design your model (continued) ► Do the tool settings carefully, especially the coverage criteria and the “look-ahead depth” ► Always start generating with the lowest possible look- ahead depth, and do not increase it to anything higher than absolutely necessary ► Avoid parameter combination explosion! ► Avoid extreme model depth!
  • 25. © Ericsson AB 2009 26 (36) Generation – Model Depth, Example STATE 01 STATE 11 STATE 12 Port1_in:EventX [paramA == true] Port1_in:EventX [paramA == false] STATE 55 STATE 63 STATE 64 Port1_in:EventY [paramA == false] Port1_in:EventY [paramA == true]
  • 26. © Ericsson AB 2009 27 (36) Generation – Improvements Note! There are straight forward ways and methods to decrease the model depth and to reduce the number of parameter combinations, but these are not properly documented. During the time that we have been using Qtronic, the tool in general, and the generation times in particular, have been constantly improved. Conformiq have given swift and professional support, and listened to our feed-back. With Qtronic 2.1 we get the possibility to distribute the calculations over multiple CPUs and hosts, which will reduce the generation times considerably. The debugging support is also improved with Qtronic 2.1.
  • 27. © Ericsson AB 2009 28 (36) Generation – Output ► The generated test suite consists of a number of Test Cases, which in turn contain a number of test steps ► The Test Cases are easy to read, follow and understand ► One Test Case can cover more than one Qtronic requirement ► One Qtronic requirement can be covered in several different Test Cases - This is sometimes a drawback, since even “not so important” requirements, or requirements that take long time to verify, can be included many times in one test suite A way to prioritize the Qtronic requirements would be very useful
  • 28. © Ericsson AB 2009 29 (36) Generation – Output ► We get (slightly) more Test Cases than we would have gotten if we verified the functionality with our traditional methods ► Progress reporting regarding how many Test Cases that have been passed, is no longer relevant - Instead we have chosen progress reporting based on the number of verified Qtronic requirements, which works at least as well. ► We get “better” Test Cases, in terms of being longer and more complex ► We have found several faults in the SUT that we would not have found using our traditional methods
  • 29. © Ericsson AB 2009 30 (36) Generation – Rendering the Output Conformiq provides plug-ins that can render the generated Test Cases into, for example, html documents and automated test scripts. The html document can be used as input to our test documentation. (Parts of it anyway – it is a very large document.) For script generation Conformiq currently provides plug-ins for TCL, TTCN-3, and java (“jcat”). You can also design your own plug-ins if you have other needs. Qtronic 2.1 also provides scripting back-ends for Perl, and for publishing Qtronic generated Test Cases in HP Quality Center. You also need to design your own “test harness” (or “glue”) to be able to execute the generated scripts in your own test framework. The size of this task can vary and depends partly on the model and the test framework. For our first models this library grew much bigger than originally planned.
  • 30. © Ericsson AB 2009 31 (36) Generation – The Test Scripts The generated test scripts get a good structure, and were also easy to read, follow and understand. And they are easy to edit, which is good for trouble-shooting purposes. Furthermore you can easily build your own Test Cases using the structure from the generated test suite.
  • 31. © Ericsson AB 2009 32 (36) 4. Conclusions
  • 32. © Ericsson AB 2009 33 (36) Conclusions – Experiences Hard experiences: ► Cost - First project: approximately same lead time and same number of resources as in a project with traditional way of working Later projects: average gain at least 30% Higher gains can be reached when we are able to re-use model components – the re-usability turned out to be much higher than originally anticipated (for example when extending existing functionality, or when implementing similar functionality on different platforms)
  • 33. © Ericsson AB 2009 34 (36) Conclusions – Experiences Hard experiences (continued) ► Coverage - Faults found that we would not have found with traditional test design methods ► Quality - No decrease in the quality of the tested product has been observed But difficult to say whether the quality has increased
  • 34. © Ericsson AB 2009 35 (36) Conclusions – Experiences Soft experiences ► Most testers think of MBT as a very interesting way of working, and are eager to learn ► High motivation among the testers that have been working with it – and everyone think is Fun (most of the time) ► Not all testers are suited for working with modeling
  • 35. © Ericsson AB 2009 36 (36) Conclusions – Recommendations If you are a test organization, and if you benefit from having automated test suites: Try out the MBT way of working! But Don’t go for full deployment from the start. Start with a smaller, well defined, well encapsulated, area/functionality. And In the beginning: Stay away from functionality where you suspect you cannot avoid models with parameter explosion or great depth