Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Software Engineering Research paper presentation Ali Ahmad <ul><li>Formal Approaches to Software Testing </li></ul><ul><li...
Formal Approaches to Software Testing P. Dasiewicz IEEE Canadian Conference on Electrical and Computer Engineering 2002
Introduction <ul><li>Software Testing: checking and validating the correctness of software </li></ul><ul><ul><li>Time cons...
Introduction  (cont’d) <ul><li>Current methods are not feasible </li></ul><ul><ul><li>Too much manual effort </li></ul></u...
Introduction  (cont’d) <ul><li>UML </li></ul><ul><ul><li>Simple, general purpose, visual modeling </li></ul></ul><ul><ul><...
Integration/Component Level Testing <ul><li>Offutt </li></ul><ul><ul><li>Changes in component states due to change events ...
Integration/Component Level Testing  (cont’d) <ul><li>Yoon </li></ul><ul><ul><li>Test case generation based on UML sequenc...
Integration/Component Level Testing  (cont’d) <ul><li>Kim </li></ul><ul><ul><li>Divide statecharts into extended finite st...
System/Integration Testing <ul><li>Hartmann </li></ul><ul><ul><li>Testing the interfaces among several components </li></u...
Source Code Based Testing <ul><li>Major problem: State space explosion problem </li></ul><ul><li>Reducing the state space ...
Translation of Statecharts <ul><li>Promela: input modeling language for SPIN </li></ul><ul><ul><li>C-like, extended with n...
Component Interaction Testing <ul><li>Major issue: Are the components developed separately work properly together </li></u...
Hierarchal GUI Test Case Generation Using Automated Planning Memon A., Pollack M., Lou Soffa M. IEEE Transactions on Softw...
Introduction <ul><li>GUI testing is difficult </li></ul><ul><ul><li>The interaction space is enormous </li></ul></ul><ul><...
Introduction  (cont’d) <ul><li>PATHS performs automated analysis of the hierarchal structure of the GUI to create hierarch...
Overview <ul><li>GUI consists of components like labels, buttons, menus, and pop-up lists </li></ul><ul><li>Example: Micro...
Overview  (cont’d) <ul><li>PATHS- Plan Generation </li></ul><ul><ul><li>Inputs </li></ul></ul><ul><ul><ul><li>Initial stat...
Overview  (cont’d) <ul><li>Role of Test Designer and PATHS during test generation </li></ul><ul><li>GUI Events and Plannin...
Overview  (cont’d) <ul><li>Operator Event Mapping </li></ul><ul><li>Example operator: Edit_Cut </li></ul>Abstract: Invokes...
Overview  (cont’d) <ul><li>High level plan </li></ul><ul><li>Expanded plan </li></ul>
Plan Generation <ul><li>GUI test case generation can be modeled by  </li></ul><ul><li>hierarchal plans that doesn’t requir...
Planning GUI Test Cases <ul><li>Developing a representation for the GUI and its operators </li></ul><ul><ul><li>Operator D...
Planning GUI Test Cases  (Cont’d)
Planning GUI Test Cases  (Cont’d)
Planning GUI Test Cases  (Cont’d)
Planning GUI Test Cases  (Cont’d)
Some Experimental Results <ul><li>Multiple Tasks </li></ul><ul><li>Hierarchal vs. Single Layer </li></ul>
Questions
Upcoming SlideShare
Loading in …5
×

.ppt

1,086 views

Published on

  • Be the first to comment

  • Be the first to like this

.ppt

  1. 1. Software Engineering Research paper presentation Ali Ahmad <ul><li>Formal Approaches to Software Testing </li></ul><ul><li>Hierarchal GUI Test Case Generation </li></ul><ul><li>Using Automated Planning </li></ul>
  2. 2. Formal Approaches to Software Testing P. Dasiewicz IEEE Canadian Conference on Electrical and Computer Engineering 2002
  3. 3. Introduction <ul><li>Software Testing: checking and validating the correctness of software </li></ul><ul><ul><li>Time consuming </li></ul></ul><ul><ul><li>Difficult </li></ul></ul><ul><ul><li>Error prune </li></ul></ul><ul><li>Formal methods </li></ul><ul><ul><li>Specifying and verifying software systems using mathematical and logical approaches </li></ul></ul><ul><ul><li>Target: proof of correctness </li></ul></ul><ul><li>Some verification techniques </li></ul><ul><ul><li>Model Checking </li></ul></ul><ul><ul><li>State space exploration </li></ul></ul>
  4. 4. Introduction (cont’d) <ul><li>Current methods are not feasible </li></ul><ul><ul><li>Too much manual effort </li></ul></ul><ul><ul><li>Models that are very complex for analysis </li></ul></ul><ul><li>It is needed to overcome the following </li></ul><ul><ul><li>The state explosion problem </li></ul></ul><ul><ul><li>Cost of creating models </li></ul></ul><ul><li>Applicability: Design level </li></ul><ul><ul><li>Less complexity </li></ul></ul><ul><ul><li>May reduce maintenance costs </li></ul></ul>
  5. 5. Introduction (cont’d) <ul><li>UML </li></ul><ul><ul><li>Simple, general purpose, visual modeling </li></ul></ul><ul><ul><li>Specify, visualize, construct and document </li></ul></ul><ul><ul><li>UML-statechart  basis for dynamic behavioral description </li></ul></ul><ul><li>Objectives: </li></ul><ul><ul><li>Overview model checking to the validation and test case generation (using UML statecharts and interaction diagrams) </li></ul></ul><ul><ul><li>Applicability of formal methods to component integration and interaction testing </li></ul></ul>
  6. 6. Integration/Component Level Testing <ul><li>Offutt </li></ul><ul><ul><li>Changes in component states due to change events </li></ul></ul><ul><ul><li>UMLTEST, integrated with Rational Rose  Highly effective test cases can be generated for system level specification </li></ul></ul><ul><ul><li>Test prefix: ensure that the system is @ a certain pre state before performing the test </li></ul></ul><ul><ul><li>Issues: </li></ul></ul><ul><ul><ul><li>Interaction is not considered </li></ul></ul></ul><ul><ul><ul><li>Some states may never been entered </li></ul></ul></ul><ul><ul><li>Incorporated UML collaboration diagrams </li></ul></ul>
  7. 7. Integration/Component Level Testing (cont’d) <ul><li>Yoon </li></ul><ul><ul><li>Test case generation based on UML sequence and collaboration diagrams </li></ul></ul><ul><ul><li>A node that represents both integration target and message flow </li></ul></ul><ul><ul><li>Testing technique </li></ul></ul><ul><ul><ul><li>Extract sequence diagram </li></ul></ul></ul><ul><ul><ul><li>If concurrency, extract collaboration diagram </li></ul></ul></ul><ul><ul><ul><li>Divide into ASF (Atomic System Function) </li></ul></ul></ul><ul><ul><ul><li>Extract nodes and message flows </li></ul></ul></ul><ul><ul><ul><li>Obtain test cases by applying test criteria (e.g. all-edge) </li></ul></ul></ul><ul><ul><li>Limitations </li></ul></ul><ul><ul><ul><li>May require a large number of sequence diagrams </li></ul></ul></ul><ul><ul><ul><li>Test case coverage (only normal or abnormal flow) </li></ul></ul></ul>
  8. 8. Integration/Component Level Testing (cont’d) <ul><li>Kim </li></ul><ul><ul><li>Divide statecharts into extended finite state machines </li></ul></ul><ul><ul><li>Control flows are represented as paths </li></ul></ul><ul><ul><li>Coverage criteria </li></ul></ul><ul><ul><ul><li>Path coverage </li></ul></ul></ul><ul><ul><ul><li>State coverage </li></ul></ul></ul><ul><ul><ul><li>Transition coverage </li></ul></ul></ul><ul><ul><li>Test cases </li></ul></ul><ul><ul><ul><li>breadth or depth first searches </li></ul></ul></ul><ul><ul><ul><li>can be generated using the data flow on the UML statechart </li></ul></ul></ul><ul><ul><ul><li>Determine whether class implements correct control and data flow </li></ul></ul></ul>
  9. 9. System/Integration Testing <ul><li>Hartmann </li></ul><ul><ul><li>Testing the interfaces among several components </li></ul></ul><ul><ul><li>UML statecharts  Mealy Finite State Machines with restricted point to point synchronous communication model </li></ul></ul><ul><ul><li>Incremental composition and reduction algorithm </li></ul></ul><ul><ul><li>Test cases: category partition method </li></ul></ul><ul><ul><li>Limitations </li></ul></ul><ul><ul><ul><li>Interaction are modeled as synchronous communications </li></ul></ul></ul><ul><ul><ul><li>Event exchanges contain no parameters </li></ul></ul></ul><ul><ul><ul><li>No support for nested machines </li></ul></ul></ul>
  10. 10. Source Code Based Testing <ul><li>Major problem: State space explosion problem </li></ul><ul><li>Reducing the state space entails eliminating irrelevant code segments </li></ul><ul><li>Hatcliff </li></ul><ul><ul><li>Program slicing techniques </li></ul></ul><ul><ul><li>Used by Bandera for translating Java code to Jimple, e.g. SPIN, SMV  Generates a finite state model for the reduced code </li></ul></ul><ul><li>Java Path Finder </li></ul><ul><ul><li>Integrates model checking, program analysis and Testing </li></ul></ul><ul><ul><li>Goal: Apply formal methods at source level </li></ul></ul><ul><ul><li>Initially, check for safety properties like deadlocks (LockTree) </li></ul></ul>
  11. 11. Translation of Statecharts <ul><li>Promela: input modeling language for SPIN </li></ul><ul><ul><li>C-like, extended with non-deterministic, and loop guarded constructs </li></ul></ul><ul><ul><li>Latella presents a translation from UML statecharts into Promela, where statecharts are first converted to hierarchal automata. A proof of correctness is also given </li></ul></ul>
  12. 12. Component Interaction Testing <ul><li>Major issue: Are the components developed separately work properly together </li></ul><ul><li>Formal methods of component interaction </li></ul><ul><ul><li>Define testing requirements </li></ul></ul><ul><ul><li>Automatically generate the test cases using model checking </li></ul></ul><ul><li>Focus of author’s research: </li></ul><ul><ul><li>Component interaction of software systems </li></ul></ul><ul><ul><li>Detect subtle interaction errors without duplicating the work @ unit level </li></ul></ul><ul><ul><li>Underlying model: Labeled transition system </li></ul></ul><ul><ul><li>ObjectState: modeling language to show the feasibility of creating formal models, it relies on hierarchal FSM. </li></ul></ul>
  13. 13. Hierarchal GUI Test Case Generation Using Automated Planning Memon A., Pollack M., Lou Soffa M. IEEE Transactions on Software Engineering 2000
  14. 14. Introduction <ul><li>GUI testing is difficult </li></ul><ul><ul><li>The interaction space is enormous </li></ul></ul><ul><ul><li>Determining the coverage of test cases </li></ul></ul><ul><ul><li>Regression testing is a major challenge </li></ul></ul><ul><li>Automation is necessary for generating GUI test cases </li></ul><ul><li>PATHS: Planning Assisted Tester for grapHical user interface Systems </li></ul><ul><ul><li>Input: Possible goals for GUI user </li></ul></ul><ul><ul><li>Generates sequences of events to satisfy the user goals, these become test cases </li></ul></ul>
  15. 15. Introduction (cont’d) <ul><li>PATHS performs automated analysis of the hierarchal structure of the GUI to create hierarchal operators that will be used during plan generation </li></ul><ul><li>Contribution to Research </li></ul><ul><ul><li>Make use of an AI technique (Automated Planning) </li></ul></ul><ul><ul><li>Exploits GUI structural features </li></ul></ul><ul><ul><li>Makes Regression testing easier </li></ul></ul><ul><ul><li>The test suite is portable </li></ul></ul><ul><ul><li>Allow the reuse of operator definitions that commonly appear across GUIs </li></ul></ul>
  16. 16. Overview <ul><li>GUI consists of components like labels, buttons, menus, and pop-up lists </li></ul><ul><li>Example: Microsoft WordPad </li></ul><ul><li>GUI has 2 types of windows </li></ul><ul><ul><li>GUI windows </li></ul></ul><ul><ul><li>Object windows, </li></ul></ul><ul><ul><ul><li>doesn’t contain any </li></ul></ul></ul><ul><ul><ul><li>window components </li></ul></ul></ul>
  17. 17. Overview (cont’d) <ul><li>PATHS- Plan Generation </li></ul><ul><ul><li>Inputs </li></ul></ul><ul><ul><ul><li>Initial state </li></ul></ul></ul><ul><ul><ul><li>Goal state </li></ul></ul></ul><ul><ul><ul><li>A set of operators applied to a set of objects </li></ul></ul></ul><ul><ul><ul><ul><li>Preconditions and effects </li></ul></ul></ul></ul><ul><ul><li>Solution to a Planning Problem: sequence of instantiated operators which result in the goal state when executed in the initial state </li></ul></ul><ul><ul><li>2 Phases </li></ul></ul><ul><ul><ul><li>Setup </li></ul></ul></ul><ul><ul><ul><ul><li>Create a hierarchal model of the GUI </li></ul></ul></ul></ul><ul><ul><ul><li>Plan Generation </li></ul></ul></ul><ul><ul><ul><ul><li>Specify scenarios (initial and goal states) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>PATHS generate a test suit for the scenarios </li></ul></ul></ul></ul>
  18. 18. Overview (cont’d) <ul><li>Role of Test Designer and PATHS during test generation </li></ul><ul><li>GUI Events and Planning Operators </li></ul>
  19. 19. Overview (cont’d) <ul><li>Operator Event Mapping </li></ul><ul><li>Example operator: Edit_Cut </li></ul>Abstract: Invokes a window that monopolizes the user interaction
  20. 20. Overview (cont’d) <ul><li>High level plan </li></ul><ul><li>Expanded plan </li></ul>
  21. 21. Plan Generation <ul><li>GUI test case generation can be modeled by </li></ul><ul><li>hierarchal plans that doesn’t require conflict resolution </li></ul>
  22. 22. Planning GUI Test Cases <ul><li>Developing a representation for the GUI and its operators </li></ul><ul><ul><li>Operator Derivation Process </li></ul></ul><ul><ul><ul><li>Traverse the GUI and press on its components, the label is read off the component label </li></ul></ul></ul><ul><ul><li>GUI events </li></ul></ul><ul><ul><ul><li>Menu open (File, Edit) </li></ul></ul></ul><ul><ul><ul><li>Unrestricted focus (Basic shapes in PowerPoint) </li></ul></ul></ul><ul><ul><ul><li>Restricted focus (Edit-Preferences in PowerPoint) </li></ul></ul></ul><ul><ul><ul><li>System-interaction (Cut and paste) </li></ul></ul></ul><ul><ul><li>Planning Operators </li></ul></ul><ul><ul><ul><li>System-Interaction </li></ul></ul></ul><ul><ul><ul><li>Abstract </li></ul></ul></ul><ul><li>Modeling Initial and Goal States and Generating Test Cases using algorithm </li></ul><ul><li>Generating multiple plans in PATHS </li></ul><ul><ul><li>Creating multiple linearizations of the partial plans </li></ul></ul><ul><ul><li>Repeating the planning process, thus generating a different test case </li></ul></ul>
  23. 23. Planning GUI Test Cases (Cont’d)
  24. 24. Planning GUI Test Cases (Cont’d)
  25. 25. Planning GUI Test Cases (Cont’d)
  26. 26. Planning GUI Test Cases (Cont’d)
  27. 27. Some Experimental Results <ul><li>Multiple Tasks </li></ul><ul><li>Hierarchal vs. Single Layer </li></ul>
  28. 28. Questions

×