際際滷

際際滷Share a Scribd company logo
Model-Based Testing to
              Help You Enhance Your
              Agile Testing Process!!
                                                                    February 6th


Frederic OEHL
Consultant
oehl@smartesting.com

                                                                                                                   1
 息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Agenda


                                                                                                                  QA?
                                                             Agility?




                                                                                    MBT?




                                                                                                                        2
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Game 1

      Customer                                                                                R&D
 Make groups of 4                                                                   Make groups of 6
 Write a specification                                                              Introduce yourself to
                                                                                      your group
 Introduce yourself to                                                              Do the job and
  your group                                                                          deliver



                                                                                                                  3
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Game 2

   Customer and R&D are side by side
   Customer presents their business needs
   R&D gives a cost for each
   Customer pass first order
   Customer pass second order



                                                                                                                  4
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
History

    In the 50s, NASA and IBM were doing
    iterative and incremental developments
    Search for methods adapted to software
    development (frequent business and
    technology changes)
    2001 Agile Manifesto



                                                                                                                  5
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Agile Manifesto: values!

    Individuals and interactions over
    processes and tools
    Working software over comprehensive
    documentation
    Customer collaboration over contract
    negotiation
    Responding to change over following a
    plan
                                                                                                                  6
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Most popular methods:
Scrum
    Early 90s by Jeff Sutherland, Ken Schwaber and
    Mike Beedle



                                                                                    2- 4
                                                                                   weeks




                                                                                                                  7
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Most popular methods: XP

    Late 90s by Kent Beck, Ward Cunningham & Ron
    Jeffries




                                                                                                                  8
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Smartesting: an agile
company!




                                                                                                                  9
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Pre-requisites for agile
testing

    Communication
    Test Driven Development
       Customer provides acceptance tests
       Developers write unit tests first
    Continuous integration
       Building tool: ant, maven, etc.
       Build manager: Hudson, Cruisecontrol, etc.


                                                                                                                  10
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Lisa Crispin & Janet
Gregorys Quadrant

                                                                Business-Facing


                        Functional tests                                                  Exploratory testing
                        Examples                                                          Scenarios
 Supporting the team




                        Story tests                                                       Usability testing
                        SimulationsAutomated &                                            User Acceptance testing




                                                                                                                         Critique product
                        Prototypes Manual                                                 Manual
                                                                                          Alpha/Beta



                       Unit tests Automated                                                  Tools
                                                                                            Performance & load testing
                       Component tests                                                      Security testing
                                                                                            束 ility 損 testing

                                                              Technology-Facing

                                                                                                                                            11
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Smartesting

                                                                Business-Facing


                        Functional test with                                              Exploratory testing on Friday
                        Fitnesse & QC/QTP                                                  Usability testing by PS
 Supporting the team




                                                                                           Alpha/Beta




                                                                                                                            Critique product
                       JUnit tests                                                         Performance




                                                              Technology-Facing

                                                                                                                                               12
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Mike Cohns Test Pyramid




                                GUI
                               tests                                                               Behaving like expected


                       Acceptance
                          tests

                   Unit/Component                                                                  Increasing trust
                         tests


                                                                                                                            13
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Challenges

    During one iteration :
       Functional changes
       Technical changes
       Automating tests for the iteration
       Exploratory testing
      




                                                                                                                  14
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Game 3

        Iteration 1, you have 4 types of bricks:

Draw 6 columns of 8 bricks each using at
least one type of each brick

        Iteration 2, there is a change
         update your tests

                                                                                                                  15
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Model-Based Testing

    Generation of test cases with oracles from
    a behavioural model (e.g. state machine)
    of the system under test.
                       BEFORE                                                                                     NOW




                                                                                                                        16
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
FOREX-SPOT

 FOREX-SPOT is a web application to buy/sell currencies and to know if we
make money or not.




                                                                                                                    17
  息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
FOREX-SPOT

    Transaction:



    Actions (Depending of the transaction
    status and the user, actions are available
    of not):



                                                                                                                  18
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Transaction lifecycle




                                                                                                                  19
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Requirements covered by
previous iterations
                                   Id                                                                        Description
APPLYNEW_TRANSACTION                                                              Only the front office can do Apply on
APPLYREPOENED_TRANSACTION                                                         an OPEN transaction
CANCELFO_USER                                                                     The back office and front office can
CANCELBO_USER                                                                     cancel a transaction
COMMITCRLY_ERROR                                                                  Only the front office can do Commit.
COMMITCRLY_SUCCESS                                                                     Commit fails when:
COMMITERROR_CURRENCY                                                                  the portfolio does not own the
                                                                                        currency sold
COMMITOTHER
                                                                                             CRLY try to sell/buy HKD
COMMITSOGEPAR_ERROR
                                                                                             SOGEPAR try to buy HKD with
COMMITSOGEPAR_SUCCESS                                                                        AUX
                                                                                                       

                                                                                                                             20
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Modeling for Testing

 Business entities




                                                                                                                  21
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Modeling for Testing

    Expected behaviour




                                                                                                                  22
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Iteration STEP-IN




    New user introduced: BOSS
    New action: Approve
                                                                                                                  23
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
TODO list

     Manage new requirements:
                                   Id                                                                        Description
APPROVE                                                                            Only the boss can set the Approve
                                                                                   status on a BOSS review transaction
CANCELBOSS_USER                                                                   The boss can cancel a transaction

     Updating the model
     Updating the application
     Updating the keywords
     Running the tests!
                                                                                                                           24
 息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
DEMO

                                                                                                                  25
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
How does MBT fit into Aglity?

    Individuals & interactions
       Testers & developers are working together
    Working software
       Increased test coverage, executable model
    Customer collaboration
       Test models are unambiguous communication
        tools
    Responding to change
       Test models are easier to update than large
        test suites
                                                                                                                  26
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Questions?


                                                                                                                  27
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part
Fore more




                                                                                                                  28
息 SMARTESTING 2009  This document is the property of Smartesting. It may not be reproduced in whole or in part

More Related Content

Model-Based Testing to Help You Enhance Your Agile Testing Process

  • 1. Model-Based Testing to Help You Enhance Your Agile Testing Process!! February 6th Frederic OEHL Consultant oehl@smartesting.com 1 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 2. Agenda QA? Agility? MBT? 2 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 3. Game 1 Customer R&D Make groups of 4 Make groups of 6 Write a specification Introduce yourself to your group Introduce yourself to Do the job and your group deliver 3 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 4. Game 2 Customer and R&D are side by side Customer presents their business needs R&D gives a cost for each Customer pass first order Customer pass second order 4 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 5. History In the 50s, NASA and IBM were doing iterative and incremental developments Search for methods adapted to software development (frequent business and technology changes) 2001 Agile Manifesto 5 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 6. Agile Manifesto: values! Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan 6 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 7. Most popular methods: Scrum Early 90s by Jeff Sutherland, Ken Schwaber and Mike Beedle 2- 4 weeks 7 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 8. Most popular methods: XP Late 90s by Kent Beck, Ward Cunningham & Ron Jeffries 8 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 9. Smartesting: an agile company! 9 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 10. Pre-requisites for agile testing Communication Test Driven Development Customer provides acceptance tests Developers write unit tests first Continuous integration Building tool: ant, maven, etc. Build manager: Hudson, Cruisecontrol, etc. 10 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 11. Lisa Crispin & Janet Gregorys Quadrant Business-Facing Functional tests Exploratory testing Examples Scenarios Supporting the team Story tests Usability testing SimulationsAutomated & User Acceptance testing Critique product Prototypes Manual Manual Alpha/Beta Unit tests Automated Tools Performance & load testing Component tests Security testing 束 ility 損 testing Technology-Facing 11 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 12. Smartesting Business-Facing Functional test with Exploratory testing on Friday Fitnesse & QC/QTP Usability testing by PS Supporting the team Alpha/Beta Critique product JUnit tests Performance Technology-Facing 12 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 13. Mike Cohns Test Pyramid GUI tests Behaving like expected Acceptance tests Unit/Component Increasing trust tests 13 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 14. Challenges During one iteration : Functional changes Technical changes Automating tests for the iteration Exploratory testing 14 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 15. Game 3 Iteration 1, you have 4 types of bricks: Draw 6 columns of 8 bricks each using at least one type of each brick Iteration 2, there is a change update your tests 15 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 16. Model-Based Testing Generation of test cases with oracles from a behavioural model (e.g. state machine) of the system under test. BEFORE NOW 16 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 17. FOREX-SPOT FOREX-SPOT is a web application to buy/sell currencies and to know if we make money or not. 17 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 18. FOREX-SPOT Transaction: Actions (Depending of the transaction status and the user, actions are available of not): 18 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 19. Transaction lifecycle 19 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 20. Requirements covered by previous iterations Id Description APPLYNEW_TRANSACTION Only the front office can do Apply on APPLYREPOENED_TRANSACTION an OPEN transaction CANCELFO_USER The back office and front office can CANCELBO_USER cancel a transaction COMMITCRLY_ERROR Only the front office can do Commit. COMMITCRLY_SUCCESS Commit fails when: COMMITERROR_CURRENCY the portfolio does not own the currency sold COMMITOTHER CRLY try to sell/buy HKD COMMITSOGEPAR_ERROR SOGEPAR try to buy HKD with COMMITSOGEPAR_SUCCESS AUX 20 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 21. Modeling for Testing Business entities 21 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 22. Modeling for Testing Expected behaviour 22 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 23. Iteration STEP-IN New user introduced: BOSS New action: Approve 23 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 24. TODO list Manage new requirements: Id Description APPROVE Only the boss can set the Approve status on a BOSS review transaction CANCELBOSS_USER The boss can cancel a transaction Updating the model Updating the application Updating the keywords Running the tests! 24 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 25. DEMO 25 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 26. How does MBT fit into Aglity? Individuals & interactions Testers & developers are working together Working software Increased test coverage, executable model Customer collaboration Test models are unambiguous communication tools Responding to change Test models are easier to update than large test suites 26 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 27. Questions? 27 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part
  • 28. Fore more 28 息 SMARTESTING 2009 This document is the property of Smartesting. It may not be reproduced in whole or in part