SlideShare a Scribd company logo
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real Production - EuroSTAR 2012
Olli-Pekka Puolitaival 
• Lead quality engineer test 
automation 
• 5 yrs test automation 
• 4 yrs research 
Protecting the irreplaceable | f-secure.com
Index 
• Idea of model-based testing 
• Story of OSMO tester 
• How we test 
• Experiences & tips
MBT is new way to think 
• Traditional way to think 
• People do testing 
• Regression automation reduce peoples work time 
• New way to think 
• Smart people want to do testing in smart way 
• Computers are fast and hard worker, let them also try 
“stupid” things
5
6
7
8
9
10
11
12
13
Why we made osmo? 
Traditional MBT tools 
• Hard to take in use 
• Closed 
• Limited extending 
• Advanced algorithms 
• Expensive 
Osmo tester 
• Easy start 
• Flexible 
• Easy to extend 
• Simple algorithms 
• Free (open source) 
14
Osmo tester idea 
public class ExampleModel{ 
int i = 0; 
@Guard(“increase") 
public guardfunction() { 
return true; //Return true if this transition is allowed to execute 
} 
@Transition(“example") 
public void transitionfunction() { 
System.out.println(i++); //This code is executed when transition is selected 
} 
… 
public static void main(String[] args) { 
OSMOTester tester = new OSMOTester(new ExampleModel()); 
tester.generate(); 
} 
} 
15 
“Model is pure java code, 
Which makes possible to use 
Any java library”
Many additional features 
• Support online and offline MBT 
• Requirements tagging 
• Coverage calculations 
• Many test design algorithms, also manual drive 
• Coverage, time and length based stopping criteria 
• Self written adapters to the SUT 
• Custom test output formats 
• Easy to integrate with Jenkins 
• Model reuse and combining 
• Probability numbers support 
• Available: http://code.google.com/p/osmo/ 
16 
Easy to start and 
custom for your needs
Tips 
• Modelling 
• Good model is high level, modular and cover core functionality 
• Start from small and continue iteratively 
• Adaptation 
• Reuse code from test automation or development if possible 
• Running 
• Run tests always automatically 
• Fixed run length for verifying and ”unlimited” for finding some new 
• Reports 
• Report what you need to know, visual is mostly better 
• OSMO is not good if you need very sophisticated algorithms, but most people 
don’t need those 
17
The domain is content cloud
Client smoke 
Our continuous integration 
Backend 
components 
Backend 
components 
Building 
Clients 
19 
Backend 
components 
Clients 
Client 
Integration 
test 
environment 
Unittest 
Clients 
Smoke test 
Regression test 
Backend 
integration 
Test 
Environment 
Performance 
test 
Performance 
Test 
Environment 
Client regression 
Chain of Jenkins jobs runs everything
Jenkins 
Android phone 
Android client 
CAN 
Solution 
Backend 
Current test setup 
“run once per hour” 
Selenium webdriver 
Firefox 
Web adapter 
Test status 
radiator 
Nativedriver client 
Nativedriver 
server 
Model 
OSMO 
Android adapter
What kind of model? 
• Idea of this testing 
• Do actions and verify that other clients data is same 
• Model includes actions which can be seen in other client like 
• Upload a file 
• Remove a file 
• Rename a file 
• Check quota 
• Check that file exist 
• Check that all files exist as supposed 
21
Example test run 
22 
Osmo test engine Web page Android Client 
Login 
Upload file1.jpg 
Login 
Check file1.jpg 
Upload file2.jpg 
Remove file1.jpg 
Check that only 
file2.jpg exist 
Logout 
Logout
What are changing in test runs 
• New file set each time 
• New test accounts each time 
• Random amount of uploaded files 
• Randomly removed files 
• Randomly renamed files 
• Random checks 
23
Experiences 
• Useful testing because 
• Tells well the status of core functionality 
• Is very close the new user use case 
• Test generation is easy to do with OSMO 
• Modeling is easy and support well iterative development 
• Test parameterization is easy 
• The challenges 
• Adapters are not easy to do and maintain 
• I keep my testing enough simple, then I don’t need too much maintenance 
• Automating test run was challenging in first time 
• Developers was helping me 
24
Next steps 
• Look for new adapter for android 
• Extend testing on other platforms 
• Extend the power 
• Cover many environments 
• Many machines for testing 
• Run continuously several kind of test sets: 
• Short run for radiator 
• “infinite run” for finding weakest point 
25
My MBT cooking receipt 
1. Find out the core functionality 
2. Make a simple model of that 
3. Make adaptation for test running 
4. Automate test runs 
5. Run model continuously against 
SUT 
6. Put the results visible in your room 
for seeing the “temperature” 
7. Keep the radiator GREEN 
26
Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real Production - EuroSTAR 2012

More Related Content

PPTX
Unit Testing talk
Sergei Kukharev
 
PPTX
Just start coding
Jane Prusakova
 
PPTX
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Codecamp Romania
 
PPT
Extending Continuous Integration
Johannes Brodwall
 
PPT
Walking Skeleton
hepphep
 
PPTX
Level Up Your Salesforce Unit Testing
Gordon Bockus
 
PDF
Becoming a better programmer - unit testing
Duy Tan Geek
 
PPTX
Avoiding test hell
Yun Ki Lee
 
Unit Testing talk
Sergei Kukharev
 
Just start coding
Jane Prusakova
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Codecamp Romania
 
Extending Continuous Integration
Johannes Brodwall
 
Walking Skeleton
hepphep
 
Level Up Your Salesforce Unit Testing
Gordon Bockus
 
Becoming a better programmer - unit testing
Duy Tan Geek
 
Avoiding test hell
Yun Ki Lee
 

What's hot (19)

PDF
Unit testing
Brian Hu
 
PPTX
Build Tests to Build Websites
Dmitry Vinnik
 
PDF
Introduction to jest
pksjce
 
POTX
Functional Tests. PHP Unconf 2016
Vladislav Fedorischev
 
PPTX
The Bumpy Road Towards Continuous Delivery
Benjamin Bischoff
 
PDF
Agile Testing
Sargis Sargsyan
 
PPTX
Increase selenium tests stability via java script
Igor Khrol
 
PPTX
Why test automation projects are failing
Igor Khrol
 
PPTX
The Key Components of Adopting CI The OpenStack Way
iWeb (group INAP)
 
PPTX
QAorHighway2016
Bhupesh Dahal
 
PDF
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Alex Balhatchet
 
PPTX
Automating Perl deployments with Hudson
nachbaur
 
PDF
КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...
QADay
 
PPTX
Benefits from AATs
Wyn B. Van Devanter
 
PPTX
5 Considerations When Adopting Automated Testing
Bhupesh Dahal
 
PDF
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Sargis Sargsyan
 
PPTX
Leandro Melendez - Switching Performance Left & Right
Neotys_Partner
 
PPTX
QA Automation testing online training
Divya Shree
 
PPT
Next generation frontend tooling
pksjce
 
Unit testing
Brian Hu
 
Build Tests to Build Websites
Dmitry Vinnik
 
Introduction to jest
pksjce
 
Functional Tests. PHP Unconf 2016
Vladislav Fedorischev
 
The Bumpy Road Towards Continuous Delivery
Benjamin Bischoff
 
Agile Testing
Sargis Sargsyan
 
Increase selenium tests stability via java script
Igor Khrol
 
Why test automation projects are failing
Igor Khrol
 
The Key Components of Adopting CI The OpenStack Way
iWeb (group INAP)
 
QAorHighway2016
Bhupesh Dahal
 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Alex Balhatchet
 
Automating Perl deployments with Hudson
nachbaur
 
КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...
QADay
 
Benefits from AATs
Wyn B. Van Devanter
 
5 Considerations When Adopting Automated Testing
Bhupesh Dahal
 
Better Page Object Handling with Loadable Component Pattern - SQA Days 20, Be...
Sargis Sargsyan
 
Leandro Melendez - Switching Performance Left & Right
Neotys_Partner
 
QA Automation testing online training
Divya Shree
 
Next generation frontend tooling
pksjce
 
Ad

Similar to Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real Production - EuroSTAR 2012 (20)

PPTX
Generalization in Auto-Testing. How we put what we had into new Technological...
SQALab
 
PDF
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
TEST Huddle
 
PDF
John Fodeh Adventures in Test Automation - EuroSTAR 2013
TEST Huddle
 
PDF
Introduction to Unit Tests and TDD
Betclic Everest Group Tech Team
 
PPTX
Test parallelization using Jenkins
Rogue Wave Software
 
PDF
5 Steps to Jump Start Your Test Automation
Sauce Labs
 
PPTX
Tools for Software Testing
Mohammed Moishin
 
PDF
Testing Angular
Lilia Sfaxi
 
PDF
Lecture #6. automation testing (andrey oleynik)
Andrey Oleynik
 
PDF
Wso2con test-automation
krishantha_samaraweera
 
PDF
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
Anna Royzman
 
PDF
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2
 
PPTX
When is a project ready for Software Automation_NEW
Mike Christesen
 
PPTX
Implementing Continuous Integration in .NET for Cheapskates
mhenroid
 
PDF
Software Testing
Andrew Wang
 
PPTX
Test Driven Development
Sergey Aganezov
 
PPT
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
PDF
Tests immutable when refactoring - SegFault Unconference Cracow 2019
Grzegorz Miejski
 
PPTX
Performance testing with 100,000 concurrent users in AWS
Matthias Matook
 
PDF
Agile testing - Principles and best practices
Dr Ganesh Iyer
 
Generalization in Auto-Testing. How we put what we had into new Technological...
SQALab
 
John Fodeh - Adventures in Test Automation-Breaking the Boundaries of Regress...
TEST Huddle
 
John Fodeh Adventures in Test Automation - EuroSTAR 2013
TEST Huddle
 
Introduction to Unit Tests and TDD
Betclic Everest Group Tech Team
 
Test parallelization using Jenkins
Rogue Wave Software
 
5 Steps to Jump Start Your Test Automation
Sauce Labs
 
Tools for Software Testing
Mohammed Moishin
 
Testing Angular
Lilia Sfaxi
 
Lecture #6. automation testing (andrey oleynik)
Andrey Oleynik
 
Wso2con test-automation
krishantha_samaraweera
 
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
Anna Royzman
 
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2
 
When is a project ready for Software Automation_NEW
Mike Christesen
 
Implementing Continuous Integration in .NET for Cheapskates
mhenroid
 
Software Testing
Andrew Wang
 
Test Driven Development
Sergey Aganezov
 
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 
Tests immutable when refactoring - SegFault Unconference Cracow 2019
Grzegorz Miejski
 
Performance testing with 100,000 concurrent users in AWS
Matthias Matook
 
Agile testing - Principles and best practices
Dr Ganesh Iyer
 
Ad

More from TEST Huddle (20)

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

Olli-Pekka Puolitaival - Model-Based Testing for Integration Testing in Real Production - EuroSTAR 2012

  • 2. Olli-Pekka Puolitaival • Lead quality engineer test automation • 5 yrs test automation • 4 yrs research Protecting the irreplaceable | f-secure.com
  • 3. Index • Idea of model-based testing • Story of OSMO tester • How we test • Experiences & tips
  • 4. MBT is new way to think • Traditional way to think • People do testing • Regression automation reduce peoples work time • New way to think • Smart people want to do testing in smart way • Computers are fast and hard worker, let them also try “stupid” things
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. Why we made osmo? Traditional MBT tools • Hard to take in use • Closed • Limited extending • Advanced algorithms • Expensive Osmo tester • Easy start • Flexible • Easy to extend • Simple algorithms • Free (open source) 14
  • 15. Osmo tester idea public class ExampleModel{ int i = 0; @Guard(“increase") public guardfunction() { return true; //Return true if this transition is allowed to execute } @Transition(“example") public void transitionfunction() { System.out.println(i++); //This code is executed when transition is selected } … public static void main(String[] args) { OSMOTester tester = new OSMOTester(new ExampleModel()); tester.generate(); } } 15 “Model is pure java code, Which makes possible to use Any java library”
  • 16. Many additional features • Support online and offline MBT • Requirements tagging • Coverage calculations • Many test design algorithms, also manual drive • Coverage, time and length based stopping criteria • Self written adapters to the SUT • Custom test output formats • Easy to integrate with Jenkins • Model reuse and combining • Probability numbers support • Available: http://code.google.com/p/osmo/ 16 Easy to start and custom for your needs
  • 17. Tips • Modelling • Good model is high level, modular and cover core functionality • Start from small and continue iteratively • Adaptation • Reuse code from test automation or development if possible • Running • Run tests always automatically • Fixed run length for verifying and ”unlimited” for finding some new • Reports • Report what you need to know, visual is mostly better • OSMO is not good if you need very sophisticated algorithms, but most people don’t need those 17
  • 18. The domain is content cloud
  • 19. Client smoke Our continuous integration Backend components Backend components Building Clients 19 Backend components Clients Client Integration test environment Unittest Clients Smoke test Regression test Backend integration Test Environment Performance test Performance Test Environment Client regression Chain of Jenkins jobs runs everything
  • 20. Jenkins Android phone Android client CAN Solution Backend Current test setup “run once per hour” Selenium webdriver Firefox Web adapter Test status radiator Nativedriver client Nativedriver server Model OSMO Android adapter
  • 21. What kind of model? • Idea of this testing • Do actions and verify that other clients data is same • Model includes actions which can be seen in other client like • Upload a file • Remove a file • Rename a file • Check quota • Check that file exist • Check that all files exist as supposed 21
  • 22. Example test run 22 Osmo test engine Web page Android Client Login Upload file1.jpg Login Check file1.jpg Upload file2.jpg Remove file1.jpg Check that only file2.jpg exist Logout Logout
  • 23. What are changing in test runs • New file set each time • New test accounts each time • Random amount of uploaded files • Randomly removed files • Randomly renamed files • Random checks 23
  • 24. Experiences • Useful testing because • Tells well the status of core functionality • Is very close the new user use case • Test generation is easy to do with OSMO • Modeling is easy and support well iterative development • Test parameterization is easy • The challenges • Adapters are not easy to do and maintain • I keep my testing enough simple, then I don’t need too much maintenance • Automating test run was challenging in first time • Developers was helping me 24
  • 25. Next steps • Look for new adapter for android • Extend testing on other platforms • Extend the power • Cover many environments • Many machines for testing • Run continuously several kind of test sets: • Short run for radiator • “infinite run” for finding weakest point 25
  • 26. My MBT cooking receipt 1. Find out the core functionality 2. Make a simple model of that 3. Make adaptation for test running 4. Automate test runs 5. Run model continuously against SUT 6. Put the results visible in your room for seeing the “temperature” 7. Keep the radiator GREEN 26