KEMBAR78
Gui path oriented test generation algorithms paper | PDF
GUI Path Oriented Test Generation Algorithms

                                        Izzat Alsmadi
                               Department of computer science
                                North Dakota state university
                                  izzat.alsmadi@ndsu.edu


                                                 (performance testing), how does the
ABSTRACT                                         system react if its environment does not
Testing software manually is a labor             behave as expected (robustness testing),
intensive process. Efficient automated           and how long can we rely on the correct
testing can significantly reduce the             functioning of the system (reliability
overall cost of software development             testing).
and maintenance. Graphical User                          User interfaces have steadily
Interfaces (GUI’s) code has some                 grown more rich, more user interactive
characteristics that distinguish it from         and more sophisticated over time. In
the rest of the project code. Generating         many applications one of the major
test cases from the GUI code requires            improvements that are suggested with
different algorithms from those usually          the new releases is to improve the user
applied in test case generation. We              interface.
developed several GUI test generation                    Generating test cases can happen
automated algorithms that do not need            from requirements, design or the actual
any user involvement and that ensure             GUI implementation. Although it is
test adequacy in the generated test cases.       expected that those three should be
The test cases are generated from an             consistent and related, yet they have
XML GUI model or tree that represents            different    levels     of    abstraction.
the GUI structure. This work contributed         Requirements and design are usually of a
to the goal of developing fully GUI test         high level of abstraction to generate
automated framework.                             from them the test cases. On the other
                                                 hand the task of generating the test cases
General Terms                                    from the GUI implementation model
User interface,    Automatic     test   case     will be delayed until we implement the
generation.                                      GUI, which is usually occurred in the
Keywords                                         late implementation. We should not have
                                                 any problems in delaying GUI testing
Test Automation, GUI Testing, Test Case
Generation.                                      giving the fact that a tool will automate
                                                 the generation and executing process.
1. INTRODUCTION                                  We designed a tool in C# that uses
        Testing tries to answer the              reflection to serialize the GUI control
following questions(3): Does the system          components or widgets. Certain control
do what it should do, or does its                properties are selected to be serialized.
behavior comply with its functional              These properties are relevant to the user
specification (conformance testing), how         interface. The application then uses the
fast can the system perform its tasks            XML file that is produced to build the
                                                 GUI tree or the event flow graph and
generate the test cases. Generating the           appropriate test cases for these paths.
test cases takes into consideration the           These techniques can further be
tree structure. Test cases are selected           classified as static and dynamic. Static
with     the   consideration      of     the      techniques are often based on symbolic
effectiveness of the selected test suit. We       execution, whereas dynamic techniques
will    study the        fault    detection       obtain the necessary data by executing
effectiveness of our test case selections.        the program under test. Goal-oriented
        The algorithms developed to               techniques identify test cases covering a
generate test cases from the GUI are              selected goal such as a statement or
novels. The two factors that affect the           branch, irrespective of the path taken.
suggested     algorithms       were     first     Intelligent techniques of automated test
generating a valid test scenario in which         case generation rely on complex
each edge is a legal edge in the actual GUI       computations to identify test cases. The
model. The second factor is ensuring a            real challenge to test generation is in the
certain level of effectiveness on the             generation of test cases that are capable
generated test scenarios.                         of detecting faults in the IUT. We will
        The next section introduces the           list some of the works related to this
related work. Section 3 lists the goals of this
research and describes the work done toward
                                                  paper. Goga(2) introduce an algorithm
those goals. Section 4 introduces in              bases on probabilistic approach. It
summary the developed GUI Auto tool.              suggests combining the test generation
Section 5 presents the conclusion and future      and the test execution in one phase.
work.                                             Tretmans(3) studied test case generation
                                                  algorithms for implementations that
2. RELATED WORK                                   communicate via inputs and outputs,
         Software testing is about                based on specifications using Labelled
checking the correctness of the system            Transition Systems (LTS). In MulSaw
and confirming that the implementation            project (4), the team use 2
conforms to the specifications.                   complementary frameworks, TestEra
Conformance testing checks whether a              and Korat for specification based test
black box Implementation Under Test               automation. To test a method, TestEra
(IUT) behaves correctly with respect to           and Korat automatically generate all
its specification. The work in this paper         non-isomorphic test cases from the
is related to test case generation                method's pre-condition and check its
algorithms, automatic test case                   correctness using its post-condition as a
generation and GUI test case generation           test oracle. There are several papers
in software testing. Several approaches           related to this project. We have a similar
have been proposed for test case                  approach that focus on GUI testing. As
generation, mainly random, path-                  explained earlier, one of the goals of our
oriented, goal-oriented and intelligent           automatic generation of test scenarios is
approaches (5) and domain testing                 to produce non-isomorphic test
(which includes equivalence                       scenarios. We also check the results of
partitioning, boundary-value testing, and         the tests through comparing the output
the category-partition method) (7). Path-         results with event tables generated from
oriented techniques generally use control         the specification. Those event tables are
flow information to identify a set of             similar to the pre post condition event
paths to be covered and generate the              tables. Clay (6) presented an overview
for model based software testing using       for another tool that is capable of
UML. Prior to test case generation, we       producing small adequate test-sets that
develop an XML model tree that               can successfully verify that an
represents the actual GUI that is            implementation of the specification
serialized from the implementation. Test     produced is correct.
cases are then generated from the XML
model. Turner and Robson [8] have            In the specific area of GUI test case
suggested a new technique for the            generation, Memon (14) has several
validation of OOPS which emphasizes          papers about automatically generating
the interaction between the features and     test cases from the GUI using an AI
the object’s state. Each feature is          planner, the process is not totally
considered as a mapping from its starting    automatic and requires the user decision
or input states to its resultant or output   to set current and goal states. The AI
states affected by any stimuli. Tse, Chan,   planner will find the best way to reach
and Chen (9) and (11) introduce normal       the goal states giving the current state.
forms for an axiom based test case           Another issue with respect to this
selection strategy for Object oriented       research is that it does not address the
programs and equivalent sequences of         problem of the huge number of states
operations as an integration approach for    that a GUI in even small application can
object oriented test case generation. Orso   have and hence may generate too many
and Silva (10) introduce some of the         test cases. The idea of defining the GUI
challenges that Object Oriented              state as the collection state of each
technologies added to the process of         control and that the change of a single
software testing. Rajanna (12) studies       property in one control will lead to a
the impact and usefulness of automated       new state is valid but is the reason for
software testing tools during the            producing the huge amount of possible
maintenance phase of a software product      GUI states. We considered in our
by citing the pragmatic experiences          research another alternative definition of
gained from the maintenance of a             a GUI state. By generate an XML tree
critical, active, and very large             that represent the GUI structure, we can
commercial software product as a case        define the GUI state as embedded in this
study. It demonstrated that most of the      tree. This means that if the tree structure
error patterns reported during the           is changed, which is something that can
maintenance are due to the inadequate        be automatically checked, then we
test coverage, which is often the            consider this as a GUI state change.
outcome of manual testing, by relating       Although we generate this tree
the error patterns and the capability of     dynamically at run time and then any
various test data generators at detecting    change in the GUI will be reflected in
them. Stanford paper (13) is an example      the current tree, yet this definition can be
of using formal methods in defining the      helpful in certain cases where we want
specifications through object                to trigger some events ( like regression
specification tool that check for some       testing ) if the GUI state is changed.
properties like correctness. It is hoped     Mikkolainen (15) discusses some issues
that the application produced by this        related to GUI test automation
project should form the groundwork           challenges. Alexander (16) and Haward
                                             present the concept of critical path
testing for GUI test case generation.               7. Beizer, Boris. Software Testing Techniques.
They define the critical paths as those             Second Edition. New York, Van Nostrand
                                                    Reinhold, 1990.
paths that have “repeated” edges or                 8. Turner, C.D. and D.J. Robson. The State-
event in many test cases. The approach              based Testing of Object-Oriented Programs.
utilizes earlier manually created test              Proceedings of the 1993 IEEE Conference on
cases through a captureplay back tool.             Software Maintenance (CSM- 93), Montreal,
Although this is expected to be an                  Quebec, Canada, Sep. 1993.
                                                    9. T.H. Tse, F.T. Chan, H.Y. Chen. An Axiom-
effective way of defining critical paths,           Based Test Case Selection Strategy for Object-
yet it is not automatically calculated. As          Oriented Programs. University of Hong Kong,
an alternative to the need of defining              Hong Kong. 94.
critical paths from run time, we define in          10. Orso, Alessandro, and Sergio Silva. Open
one algorithm static critical paths                 issues and research directions in Object Oriented
                                                    testing. Italy. AQUIS98.
through the use of metric weights. The              11. T.H. Tse, F.T. Chan, H.Y. Chen. In Black
metric weight is calculated by counting             and White: An Integrated Approach to Object-
all the children- or grand children for a           Oriented Program Testing. University of Hong
control. Other ways of defining critical            Kong, Hong Kong. 96.
paths is by measuring delay time during             12. Rajanna V. Automated Software Testing
                                                    Tools and Their Impact on Software
execution, or by manually locating                  Maintenance- An Experience. Tata Consultancy
critical paths from specification. From             Services.
the specification a critical path can be a          13. Stanford, Matthew. Object specification tool
path that is calling an external API,               using VTL. Master dissertation. University of
saving to or calling an external file.              Sheffield. 2002.
                                                    14. Memon, Atef. Hierarchical GUI Test Case
                                                    Generation Using Automated Planning. IEEE
3. GOALS AND APPROACHES                             transactions on software engineering. 2001. vol
                                                    27.
                                                    15. Mikkolainen, Markus. Automated
4.CONCLUSION AND FUTURE WORK                        Graphical User Interface Testing. 2006.
                                                    www.cs.helsinki.fi/u/paakki/mikkolainen.pdf.
                                                    16. Alexander K, Ames and Haward Jie.
5. REFERENCES                                       Critical Paths for GUI Regression Testing.
1. Pettichord, Bret. Homebrew test automation.
                                                    www.cse.ucsc.edu/~sasha/proj/gui_testing.
ThoughtWorks. Sep. 2004.
                                                    pdf
www.io.com/~wazmo/ papers/
homebrew_test_automation_200409.pdf.
2. Goga, N. A probabilistic coverage for on-the-y
test generation algorithms. Jan. 2003.
fmt.cs.utwente.nl/publications/files/
398_covprob.ps.gz.
3. Jan Tretmans: Test Generation with Inputs,
Outputs, and Quiescence. TACAS 1996: 127-
146.
4. Software Design Group. MIT. Computer
Science and Artificial Intelligence Laboratory.
2006. http://sdg.csail.mit.edu/index.html.
5. Prasanna, M, S.N. Sivanandam R.Venkatesan.
and R.Sundarrajan. A survey on automatic test
case generation. Academic Open Internet
Journal. Vol. 15. 2005.
6. Williams, Clay. Software testing and the
UML. ISSRE99. 99. http://www.chillarege.com
/fastabstracts/issre99/.

Gui path oriented test generation algorithms paper

  • 1.
    GUI Path OrientedTest Generation Algorithms Izzat Alsmadi Department of computer science North Dakota state university izzat.alsmadi@ndsu.edu (performance testing), how does the ABSTRACT system react if its environment does not Testing software manually is a labor behave as expected (robustness testing), intensive process. Efficient automated and how long can we rely on the correct testing can significantly reduce the functioning of the system (reliability overall cost of software development testing). and maintenance. Graphical User User interfaces have steadily Interfaces (GUI’s) code has some grown more rich, more user interactive characteristics that distinguish it from and more sophisticated over time. In the rest of the project code. Generating many applications one of the major test cases from the GUI code requires improvements that are suggested with different algorithms from those usually the new releases is to improve the user applied in test case generation. We interface. developed several GUI test generation Generating test cases can happen automated algorithms that do not need from requirements, design or the actual any user involvement and that ensure GUI implementation. Although it is test adequacy in the generated test cases. expected that those three should be The test cases are generated from an consistent and related, yet they have XML GUI model or tree that represents different levels of abstraction. the GUI structure. This work contributed Requirements and design are usually of a to the goal of developing fully GUI test high level of abstraction to generate automated framework. from them the test cases. On the other hand the task of generating the test cases General Terms from the GUI implementation model User interface, Automatic test case will be delayed until we implement the generation. GUI, which is usually occurred in the Keywords late implementation. We should not have any problems in delaying GUI testing Test Automation, GUI Testing, Test Case Generation. giving the fact that a tool will automate the generation and executing process. 1. INTRODUCTION We designed a tool in C# that uses Testing tries to answer the reflection to serialize the GUI control following questions(3): Does the system components or widgets. Certain control do what it should do, or does its properties are selected to be serialized. behavior comply with its functional These properties are relevant to the user specification (conformance testing), how interface. The application then uses the fast can the system perform its tasks XML file that is produced to build the GUI tree or the event flow graph and
  • 2.
    generate the testcases. Generating the appropriate test cases for these paths. test cases takes into consideration the These techniques can further be tree structure. Test cases are selected classified as static and dynamic. Static with the consideration of the techniques are often based on symbolic effectiveness of the selected test suit. We execution, whereas dynamic techniques will study the fault detection obtain the necessary data by executing effectiveness of our test case selections. the program under test. Goal-oriented The algorithms developed to techniques identify test cases covering a generate test cases from the GUI are selected goal such as a statement or novels. The two factors that affect the branch, irrespective of the path taken. suggested algorithms were first Intelligent techniques of automated test generating a valid test scenario in which case generation rely on complex each edge is a legal edge in the actual GUI computations to identify test cases. The model. The second factor is ensuring a real challenge to test generation is in the certain level of effectiveness on the generation of test cases that are capable generated test scenarios. of detecting faults in the IUT. We will The next section introduces the list some of the works related to this related work. Section 3 lists the goals of this research and describes the work done toward paper. Goga(2) introduce an algorithm those goals. Section 4 introduces in bases on probabilistic approach. It summary the developed GUI Auto tool. suggests combining the test generation Section 5 presents the conclusion and future and the test execution in one phase. work. Tretmans(3) studied test case generation algorithms for implementations that 2. RELATED WORK communicate via inputs and outputs, Software testing is about based on specifications using Labelled checking the correctness of the system Transition Systems (LTS). In MulSaw and confirming that the implementation project (4), the team use 2 conforms to the specifications. complementary frameworks, TestEra Conformance testing checks whether a and Korat for specification based test black box Implementation Under Test automation. To test a method, TestEra (IUT) behaves correctly with respect to and Korat automatically generate all its specification. The work in this paper non-isomorphic test cases from the is related to test case generation method's pre-condition and check its algorithms, automatic test case correctness using its post-condition as a generation and GUI test case generation test oracle. There are several papers in software testing. Several approaches related to this project. We have a similar have been proposed for test case approach that focus on GUI testing. As generation, mainly random, path- explained earlier, one of the goals of our oriented, goal-oriented and intelligent automatic generation of test scenarios is approaches (5) and domain testing to produce non-isomorphic test (which includes equivalence scenarios. We also check the results of partitioning, boundary-value testing, and the tests through comparing the output the category-partition method) (7). Path- results with event tables generated from oriented techniques generally use control the specification. Those event tables are flow information to identify a set of similar to the pre post condition event paths to be covered and generate the tables. Clay (6) presented an overview
  • 3.
    for model basedsoftware testing using for another tool that is capable of UML. Prior to test case generation, we producing small adequate test-sets that develop an XML model tree that can successfully verify that an represents the actual GUI that is implementation of the specification serialized from the implementation. Test produced is correct. cases are then generated from the XML model. Turner and Robson [8] have In the specific area of GUI test case suggested a new technique for the generation, Memon (14) has several validation of OOPS which emphasizes papers about automatically generating the interaction between the features and test cases from the GUI using an AI the object’s state. Each feature is planner, the process is not totally considered as a mapping from its starting automatic and requires the user decision or input states to its resultant or output to set current and goal states. The AI states affected by any stimuli. Tse, Chan, planner will find the best way to reach and Chen (9) and (11) introduce normal the goal states giving the current state. forms for an axiom based test case Another issue with respect to this selection strategy for Object oriented research is that it does not address the programs and equivalent sequences of problem of the huge number of states operations as an integration approach for that a GUI in even small application can object oriented test case generation. Orso have and hence may generate too many and Silva (10) introduce some of the test cases. The idea of defining the GUI challenges that Object Oriented state as the collection state of each technologies added to the process of control and that the change of a single software testing. Rajanna (12) studies property in one control will lead to a the impact and usefulness of automated new state is valid but is the reason for software testing tools during the producing the huge amount of possible maintenance phase of a software product GUI states. We considered in our by citing the pragmatic experiences research another alternative definition of gained from the maintenance of a a GUI state. By generate an XML tree critical, active, and very large that represent the GUI structure, we can commercial software product as a case define the GUI state as embedded in this study. It demonstrated that most of the tree. This means that if the tree structure error patterns reported during the is changed, which is something that can maintenance are due to the inadequate be automatically checked, then we test coverage, which is often the consider this as a GUI state change. outcome of manual testing, by relating Although we generate this tree the error patterns and the capability of dynamically at run time and then any various test data generators at detecting change in the GUI will be reflected in them. Stanford paper (13) is an example the current tree, yet this definition can be of using formal methods in defining the helpful in certain cases where we want specifications through object to trigger some events ( like regression specification tool that check for some testing ) if the GUI state is changed. properties like correctness. It is hoped Mikkolainen (15) discusses some issues that the application produced by this related to GUI test automation project should form the groundwork challenges. Alexander (16) and Haward present the concept of critical path
  • 4.
    testing for GUItest case generation. 7. Beizer, Boris. Software Testing Techniques. They define the critical paths as those Second Edition. New York, Van Nostrand Reinhold, 1990. paths that have “repeated” edges or 8. Turner, C.D. and D.J. Robson. The State- event in many test cases. The approach based Testing of Object-Oriented Programs. utilizes earlier manually created test Proceedings of the 1993 IEEE Conference on cases through a captureplay back tool. Software Maintenance (CSM- 93), Montreal, Although this is expected to be an Quebec, Canada, Sep. 1993. 9. T.H. Tse, F.T. Chan, H.Y. Chen. An Axiom- effective way of defining critical paths, Based Test Case Selection Strategy for Object- yet it is not automatically calculated. As Oriented Programs. University of Hong Kong, an alternative to the need of defining Hong Kong. 94. critical paths from run time, we define in 10. Orso, Alessandro, and Sergio Silva. Open one algorithm static critical paths issues and research directions in Object Oriented testing. Italy. AQUIS98. through the use of metric weights. The 11. T.H. Tse, F.T. Chan, H.Y. Chen. In Black metric weight is calculated by counting and White: An Integrated Approach to Object- all the children- or grand children for a Oriented Program Testing. University of Hong control. Other ways of defining critical Kong, Hong Kong. 96. paths is by measuring delay time during 12. Rajanna V. Automated Software Testing Tools and Their Impact on Software execution, or by manually locating Maintenance- An Experience. Tata Consultancy critical paths from specification. From Services. the specification a critical path can be a 13. Stanford, Matthew. Object specification tool path that is calling an external API, using VTL. Master dissertation. University of saving to or calling an external file. Sheffield. 2002. 14. Memon, Atef. Hierarchical GUI Test Case Generation Using Automated Planning. IEEE 3. GOALS AND APPROACHES transactions on software engineering. 2001. vol 27. 15. Mikkolainen, Markus. Automated 4.CONCLUSION AND FUTURE WORK Graphical User Interface Testing. 2006. www.cs.helsinki.fi/u/paakki/mikkolainen.pdf. 16. Alexander K, Ames and Haward Jie. 5. REFERENCES Critical Paths for GUI Regression Testing. 1. Pettichord, Bret. Homebrew test automation. www.cse.ucsc.edu/~sasha/proj/gui_testing. ThoughtWorks. Sep. 2004. pdf www.io.com/~wazmo/ papers/ homebrew_test_automation_200409.pdf. 2. Goga, N. A probabilistic coverage for on-the-y test generation algorithms. Jan. 2003. fmt.cs.utwente.nl/publications/files/ 398_covprob.ps.gz. 3. Jan Tretmans: Test Generation with Inputs, Outputs, and Quiescence. TACAS 1996: 127- 146. 4. Software Design Group. MIT. Computer Science and Artificial Intelligence Laboratory. 2006. http://sdg.csail.mit.edu/index.html. 5. Prasanna, M, S.N. Sivanandam R.Venkatesan. and R.Sundarrajan. A survey on automatic test case generation. Academic Open Internet Journal. Vol. 15. 2005. 6. Williams, Clay. Software testing and the UML. ISSRE99. 99. http://www.chillarege.com /fastabstracts/issre99/.