SlideShare a Scribd company logo
GUI Testing
Approaches
   Will Shen
  2004/12/21
References
   Hierarchical GUI Test Case Generation
    Using Automated Planning
       Atif M. Memon, Student Member, IEEE, Martha E.
        Pollack, and Mary Lou Soffa, Member, IEEE
   Plan Generation for GUI Testing
       Atif M. Memon and Martha E. Pollack and Mary
        Lou Soffa Dept. of Computer Science University of
        Pittsburgh Pittsburgh, PA 15260 USA fatif, pollack,
        soffag@cs.pitt.edu
   Coverage Criteria for GUI Testing
     Atif M. Memon Dept. of Computer Science
      University of Pittsburgh Pittsburgh, PA 15260
      atif@cs.pitt.edu
     Mary Lou Soffa Dept. of Computer Science
      University of Pittsburgh Pittsburgh, PA 15260
      soffa@cs.pitt.edu
     Martha E. Pollack Dept. of Electrical Engineering
      and Computer Science, University of Michigan Ann
      Arbor, MI 48109pollackm@eecs.umich.edu
Outline
1.   Introduction
2.   Overview of PATHS
3.   Coverage Criteria for GUI Testing
4.   Conclusions
1. Introduction
   Testing GUI is difficult:
       The space of possible interactions with a GUI is
        enormous.
          In that each sequence of GUI commands can result in a
           different state
          A GUI command may need to be evaluatedion all of these
           states.
       Determining the coverage of a set of test cases.
            No only how much the code is tested, but in how many
             different possible states of the software each piece of code
             is tested.
   An important aspect of GUI testing is
    verification of its state at each step of test case
    execution.
       The execution of the test case must be terminated as
        soon as an error is detected.
   Regression testing presents special challenges for
    GUIs.
       The input-output mapping does not remain constant
        across successive versions of the software.
2. Overview of PATHS
   Planning Assited Tester for grapHical user
    interface Systems.
   A new approach to automatic testing of GUIs
    that builds on AI planning techniques.
   Given a specification of initial and goal states for
    a GUI, a planner is used to generate sequences
    of GUI actions that lead from the initial state to
    the goal state.
2.1 The Example GUI

               Microsoft WordPad
(a) the Initial States




(b) The Goal State
2.2 Test case generation process
   Two phases
       Setup phase
        1.   PATHS creates a hierarchical model of the GUI and
             returns a list of operators from the model to the test
             designer
        2.   By using knowledge of the GUI, the test designer then
             defines the preconditions and effects of the operators in
             a simple language provided by the planning system.
   Plan-generation
    1.   The test designer describes scenarios (tasks) by defining
         a set of initial and goal states for test case generation.
    2.   PATHS generates a test suite for the scenarios.
20041221 gui testing survey
2.3 Deriving GUI operators
   2.3.1 Events
   2.3.2 Operators
   2.3.3 Operator-Event mapping
   2.3.4 The Step1 of example GUI
   2.3.5 The Step2 of EDIT_CUT
   2.3.6 The Step3 initial state and goal state
   2.3.7 The Step4 generate test case
2.3.1 Events
   Three classes of GUI event
     Unrestricted-focus events open GUI windows that
      do not restrict the user’s focus
     Restricted-focus events open GUI windows that
      have the special property that once invoked, they
      monopolize the GUI interaction.
     System-interaction events interact with the
      underlying software to perform some action.
2.3.2 Operators
   The setup phase starts creating a list of a
    operators to be used during planning.
   Exploiting the GUI structure to derive
    hierarchical operators that are decomposed
    during planning.
     System-Interaction Operators
     Abstract Operators
System-Interaction Operators
   To represent sequences of GUI actions that a
    user might perform to eventually interact with
    the underlying software.
   A sequence of zero or more unrestricted-focus
    events, followed by a system-interaction event.
   Example:
     Edit_Cut = <Edit, Cut>
     Edit_Paste = <Edit, Paste>
Abstract Operators
   Created from the restricted-focus events, which
    contain two parts:
     The prefix of an abstract operator is the sequence of
      unrestricted-focus events that lead to restricted-
      focus event.
     The suffix of an abstract operator represents the
      restricted-focus user interaction.
2.3.3 Operator-Event mapping
   In order to keep a correspondence between the
    original GUI events and these high-level
    operators.
2.3.4 The Step1 of example GUI




          (a) Original GUI Events




    (b) Planning operators derived by PATHS
2.3.5 The Step2 of EDIT_CUT
2.3.6 The Step3 initial state and goal
                state
2.3.7 The Step4 generate test case
          High level plan that must be decomposition




  decomposition                               decomposition
20041221 gui testing survey
20041221 gui testing survey
An alternative decomposition
A new test case
3. Coverage Criteria for GUI Testing
   3.1 What is Coverage Criteria
   3.2 Event-flow Graphs
   3.3 Integration Tree
   3.4 Intra-component Coverage Criteria
   3.5 Inter-component Coverage Criteria
3.1 What is Coverage Criteria
   Coverage criteria are sets of rules to help
    determine whether a test suite has adequately
    tested a program and to guide the testing
    process.
   Important rules that provide an objective
    measure of test quality.
   This paper define a new class of coverage
    criteria called event-based coverage criteria to
    determine the adequacy of tested event
    sequences, focus on GUIs.
   The key idea is to define the coverage of a test
    suite in terms of GUI events and their
    interactions.
   A GUI component is represented by a new
    structure called an event-flow graph that
    identifier events within a component.
   The interactions among GUI components are
    captured by a representation called the
    integration tree.
   Intra-component coverage criteria for events
    within a component
       event, event-interaction and length-n event-sequence
        coverage.
   Inter-component coverage criteria for events
    among components.
       invocation, invocation-termination and length-n
        event-sequence coverage
3.2 Event-flow Graphs
A part of the Main* component of MS
B                     WordPad




I                                                                 I           I




*
    We assume that all GUIs have a Main component, that is presented to the
                      user when the GUI is first invoked.
3.3 Integration Tree
An integration tree for a part of MS WordPad
3.4 Intra-component Coverage
                  Criteria
   3.4.1 Event Coverage
   3.4.2 Event-interaction Coverage
   3.4.3 Length-n Event-sequence Coverage
3.4.1 Event Coverage
Event-sequence:
3.4.2 Event-interaction Coverage
3.4.3 Length-n Event-sequence
           Coverage
3.5 Inter-component Coverage
                  Criteria
   3.5.1 Invocation Coverage
   3.5.2 Invocation-termination Coverage
   3.5.3 Inter-component Length-n Event-
    sequence Coverage
3.5.1 Invocation Coverage
3.5.2 Invocation-termination
          Coverage
3.5.3 Inter-component Length-n
   Event-sequence Coverage
4. Conclusion
   Automatic testing of GUIs that builds on AI
    planning technique
   Coverage criteria for GUI testing
   We also plan to explore the possibility of using
    the event-based coverage criteria for software
    other than GUIs.
     Object-oriented software
     Networking software
     The broader class of reactive software

                 Any questions?

More Related Content

PDF
Analysis of Software Complexity Measures for Regression Testing
PDF
SE2018_Lec 15_ Software Design
PDF
Ijarcet vol-2-issue-4-1291-1297
PDF
International Journal of Engineering Research and Development (IJERD)
PDF
Survey paper
PDF
Ijsea04021003
PDF
Measuring effort for modifying software package as reusable package using pac...
Analysis of Software Complexity Measures for Regression Testing
SE2018_Lec 15_ Software Design
Ijarcet vol-2-issue-4-1291-1297
International Journal of Engineering Research and Development (IJERD)
Survey paper
Ijsea04021003
Measuring effort for modifying software package as reusable package using pac...

What's hot (19)

PDF
Measuring effort for modifying software package as
DOCX
Software engg unit 4
PDF
50120140502011
PDF
Unit Test using Test Driven Development Approach to Support Reusability
PDF
PPTX
Developing Tools for “What if…” Testing of Large-scale Software Systems
PPTX
Chapter 2 - White Box Test Techniques
PDF
Iv2515741577
PPTX
Software maintenance
PDF
Cyclomatic complexity
PDF
Determination of Software Release Instant of Three-Tier Client Server Softwar...
PDF
QUALITY METRICS OF TEST SUITES IN TESTDRIVEN DESIGNED APPLICATIONS
PDF
SE2018_Lec 21_ Software Configuration Management (SCM)
PPTX
Software Design 1: Coupling & cohesion
PDF
Verification of the protection services in antivirus systems by using nusmv m...
PDF
Reengineering framework for open source software using decision tree approach
PDF
Successive Software Reliability Growth Model: A Modular Approach
DOC
ISTQB Advanced Study Guide - 6
PDF
20050314 specification based regression test selection with risk analysis
Measuring effort for modifying software package as
Software engg unit 4
50120140502011
Unit Test using Test Driven Development Approach to Support Reusability
Developing Tools for “What if…” Testing of Large-scale Software Systems
Chapter 2 - White Box Test Techniques
Iv2515741577
Software maintenance
Cyclomatic complexity
Determination of Software Release Instant of Three-Tier Client Server Softwar...
QUALITY METRICS OF TEST SUITES IN TESTDRIVEN DESIGNED APPLICATIONS
SE2018_Lec 21_ Software Configuration Management (SCM)
Software Design 1: Coupling & cohesion
Verification of the protection services in antivirus systems by using nusmv m...
Reengineering framework for open source software using decision tree approach
Successive Software Reliability Growth Model: A Modular Approach
ISTQB Advanced Study Guide - 6
20050314 specification based regression test selection with risk analysis
Ad

Viewers also liked (20)

PPTX
GUI Testing
PPT
GUI Design by Roni Sue Player
PPT
Functionality testing techniqu
PDF
Webinar - 'Test Case Immunity’- Optimize testing
PPTX
Top trump project 2012
PPTX
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
PDF
GROOT VOLKOOMEN MOLENBOEK
PPT
Innovative Test Automation Solution
PPT
testing
PDF
Gremlin: A Graph-Based Programming Language
PDF
The Packaging issue | Caffeine | ITA
PPTX
Testing project (basic)
PDF
Automation Abstraction Layers: Page Objects and Beyond
PDF
Nieuwsbrief mosterdmolen de Vlijt Meppel deel 6
PDF
Why Test Automation Fails
PDF
Solving Problems with Graphs
PDF
Automated Test Case Generation and Execution from Models
PDF
Best practices for test case creation & maintenance
PDF
The Packaging issue | Caffeine | ENG
PPTX
Matrix Representation Of Graph
GUI Testing
GUI Design by Roni Sue Player
Functionality testing techniqu
Webinar - 'Test Case Immunity’- Optimize testing
Top trump project 2012
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
GROOT VOLKOOMEN MOLENBOEK
Innovative Test Automation Solution
testing
Gremlin: A Graph-Based Programming Language
The Packaging issue | Caffeine | ITA
Testing project (basic)
Automation Abstraction Layers: Page Objects and Beyond
Nieuwsbrief mosterdmolen de Vlijt Meppel deel 6
Why Test Automation Fails
Solving Problems with Graphs
Automated Test Case Generation and Execution from Models
Best practices for test case creation & maintenance
The Packaging issue | Caffeine | ENG
Matrix Representation Of Graph
Ad

Similar to 20041221 gui testing survey (20)

PPT
20051019 automating regression testing for evolving gui software
PPT
2.5 gui
PDF
Gui path oriented test generation algorithms paper
PPT
GUI Test Patterns
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PPTX
User interface testing By Priyanka Chauhan
PDF
20050713 critical paths for gui regression testing
PDF
Geoff & Emily Bache - Specification By Example With GUI Tests-How Could That ...
PPT
6months industrial training in software testing, ludhiana
PPT
6 weeks summer training in software testing,ludhiana
PPT
6 weeks summer training in software testing,jalandhar
PPT
6months industrial training in software testing, jalandhar
PPTX
Testing strategies -2
PPT
20060712 automated model based testing of community-driven open-source gui ap...
PPT
Introduction to software testing
PDF
Functional tests with the FEST framework
PPT
Software testing mtech project in jalandhar
PPT
Software testing mtech project in ludhiana
PPT
Using GUI Ripping for Automated Testing of Android Apps
PDF
Hartmann im00
20051019 automating regression testing for evolving gui software
2.5 gui
Gui path oriented test generation algorithms paper
GUI Test Patterns
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
User interface testing By Priyanka Chauhan
20050713 critical paths for gui regression testing
Geoff & Emily Bache - Specification By Example With GUI Tests-How Could That ...
6months industrial training in software testing, ludhiana
6 weeks summer training in software testing,ludhiana
6 weeks summer training in software testing,jalandhar
6months industrial training in software testing, jalandhar
Testing strategies -2
20060712 automated model based testing of community-driven open-source gui ap...
Introduction to software testing
Functional tests with the FEST framework
Software testing mtech project in jalandhar
Software testing mtech project in ludhiana
Using GUI Ripping for Automated Testing of Android Apps
Hartmann im00

More from Will Shen (14)

PDF
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
PPTX
16格筆記讀書法
PDF
Bade Smells in Code
PDF
Intro To BOOST.Spirit
PDF
20070514 introduction to test ng and its application for test driven gui deve...
PDF
20060411 face recognition using face arg matching
PDF
20060411 Analytic Hierarchy Process (AHP)
PDF
20041113 A Test Generation Tool for Specifications in the Form of State Machine
PDF
Junit Recipes - Elementary tests (2/2)
PDF
Junit Recipes - Elementary tests (1/2)
PDF
Junit Recipes - Intro
PPT
20060927 application facades
PPT
20111018 boost and gtest
PPTX
Data collection for field studies
20180717 Introduction of Seamless BLE Connection Migration System (SeamBlue)
16格筆記讀書法
Bade Smells in Code
Intro To BOOST.Spirit
20070514 introduction to test ng and its application for test driven gui deve...
20060411 face recognition using face arg matching
20060411 Analytic Hierarchy Process (AHP)
20041113 A Test Generation Tool for Specifications in the Form of State Machine
Junit Recipes - Elementary tests (2/2)
Junit Recipes - Elementary tests (1/2)
Junit Recipes - Intro
20060927 application facades
20111018 boost and gtest
Data collection for field studies

20041221 gui testing survey

  • 1. GUI Testing Approaches Will Shen 2004/12/21
  • 2. References  Hierarchical GUI Test Case Generation Using Automated Planning  Atif M. Memon, Student Member, IEEE, Martha E. Pollack, and Mary Lou Soffa, Member, IEEE  Plan Generation for GUI Testing  Atif M. Memon and Martha E. Pollack and Mary Lou Soffa Dept. of Computer Science University of Pittsburgh Pittsburgh, PA 15260 USA fatif, pollack, soffag@cs.pitt.edu
  • 3. Coverage Criteria for GUI Testing  Atif M. Memon Dept. of Computer Science University of Pittsburgh Pittsburgh, PA 15260 atif@cs.pitt.edu  Mary Lou Soffa Dept. of Computer Science University of Pittsburgh Pittsburgh, PA 15260 soffa@cs.pitt.edu  Martha E. Pollack Dept. of Electrical Engineering and Computer Science, University of Michigan Ann Arbor, MI 48109pollackm@eecs.umich.edu
  • 4. Outline 1. Introduction 2. Overview of PATHS 3. Coverage Criteria for GUI Testing 4. Conclusions
  • 5. 1. Introduction  Testing GUI is difficult:  The space of possible interactions with a GUI is enormous.  In that each sequence of GUI commands can result in a different state  A GUI command may need to be evaluatedion all of these states.  Determining the coverage of a set of test cases.  No only how much the code is tested, but in how many different possible states of the software each piece of code is tested.
  • 6. An important aspect of GUI testing is verification of its state at each step of test case execution.  The execution of the test case must be terminated as soon as an error is detected.  Regression testing presents special challenges for GUIs.  The input-output mapping does not remain constant across successive versions of the software.
  • 7. 2. Overview of PATHS  Planning Assited Tester for grapHical user interface Systems.  A new approach to automatic testing of GUIs that builds on AI planning techniques.  Given a specification of initial and goal states for a GUI, a planner is used to generate sequences of GUI actions that lead from the initial state to the goal state.
  • 8. 2.1 The Example GUI Microsoft WordPad
  • 9. (a) the Initial States (b) The Goal State
  • 10. 2.2 Test case generation process  Two phases  Setup phase 1. PATHS creates a hierarchical model of the GUI and returns a list of operators from the model to the test designer 2. By using knowledge of the GUI, the test designer then defines the preconditions and effects of the operators in a simple language provided by the planning system.
  • 11. Plan-generation 1. The test designer describes scenarios (tasks) by defining a set of initial and goal states for test case generation. 2. PATHS generates a test suite for the scenarios.
  • 13. 2.3 Deriving GUI operators  2.3.1 Events  2.3.2 Operators  2.3.3 Operator-Event mapping  2.3.4 The Step1 of example GUI  2.3.5 The Step2 of EDIT_CUT  2.3.6 The Step3 initial state and goal state  2.3.7 The Step4 generate test case
  • 14. 2.3.1 Events  Three classes of GUI event  Unrestricted-focus events open GUI windows that do not restrict the user’s focus  Restricted-focus events open GUI windows that have the special property that once invoked, they monopolize the GUI interaction.  System-interaction events interact with the underlying software to perform some action.
  • 15. 2.3.2 Operators  The setup phase starts creating a list of a operators to be used during planning.  Exploiting the GUI structure to derive hierarchical operators that are decomposed during planning.  System-Interaction Operators  Abstract Operators
  • 16. System-Interaction Operators  To represent sequences of GUI actions that a user might perform to eventually interact with the underlying software.  A sequence of zero or more unrestricted-focus events, followed by a system-interaction event.  Example:  Edit_Cut = <Edit, Cut>  Edit_Paste = <Edit, Paste>
  • 17. Abstract Operators  Created from the restricted-focus events, which contain two parts:  The prefix of an abstract operator is the sequence of unrestricted-focus events that lead to restricted- focus event.  The suffix of an abstract operator represents the restricted-focus user interaction.
  • 18. 2.3.3 Operator-Event mapping  In order to keep a correspondence between the original GUI events and these high-level operators.
  • 19. 2.3.4 The Step1 of example GUI (a) Original GUI Events (b) Planning operators derived by PATHS
  • 20. 2.3.5 The Step2 of EDIT_CUT
  • 21. 2.3.6 The Step3 initial state and goal state
  • 22. 2.3.7 The Step4 generate test case High level plan that must be decomposition decomposition decomposition
  • 26. A new test case
  • 27. 3. Coverage Criteria for GUI Testing  3.1 What is Coverage Criteria  3.2 Event-flow Graphs  3.3 Integration Tree  3.4 Intra-component Coverage Criteria  3.5 Inter-component Coverage Criteria
  • 28. 3.1 What is Coverage Criteria  Coverage criteria are sets of rules to help determine whether a test suite has adequately tested a program and to guide the testing process.  Important rules that provide an objective measure of test quality.
  • 29. This paper define a new class of coverage criteria called event-based coverage criteria to determine the adequacy of tested event sequences, focus on GUIs.  The key idea is to define the coverage of a test suite in terms of GUI events and their interactions.
  • 30. A GUI component is represented by a new structure called an event-flow graph that identifier events within a component.  The interactions among GUI components are captured by a representation called the integration tree.
  • 31. Intra-component coverage criteria for events within a component  event, event-interaction and length-n event-sequence coverage.  Inter-component coverage criteria for events among components.  invocation, invocation-termination and length-n event-sequence coverage
  • 33. A part of the Main* component of MS B WordPad I I I * We assume that all GUIs have a Main component, that is presented to the user when the GUI is first invoked.
  • 35. An integration tree for a part of MS WordPad
  • 36. 3.4 Intra-component Coverage Criteria  3.4.1 Event Coverage  3.4.2 Event-interaction Coverage  3.4.3 Length-n Event-sequence Coverage
  • 40. 3.5 Inter-component Coverage Criteria  3.5.1 Invocation Coverage  3.5.2 Invocation-termination Coverage  3.5.3 Inter-component Length-n Event- sequence Coverage
  • 43. 3.5.3 Inter-component Length-n Event-sequence Coverage
  • 44. 4. Conclusion  Automatic testing of GUIs that builds on AI planning technique  Coverage criteria for GUI testing  We also plan to explore the possibility of using the event-based coverage criteria for software other than GUIs.  Object-oriented software  Networking software  The broader class of reactive software Any questions?

Editor's Notes

  • #10: 要由 a 得到 b 的 goal ,有數種法子: 1. 由 Document.doc 轉成 new.doc ,只要刪掉一些字。 2. 由 doc2.doc 轉成 new.doc ,要增加一些字 3. 或是開一空白文件檔輸入文字。