Font Size: a A A

The Application Of Automatic Generation Of Test Scripts In Object-oriented Software Testing

Posted on:2009-03-05Degree:MasterType:Thesis
Country:ChinaCandidate:B F ZhaoFull Text:PDF
GTID:2178360242481579Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
As indispensable part of software life cycle, software testing plays animportant role in improving the quality of software. With the development ofsoftware technology, the use of software test automation technology to raisetest efficiency, shorten the development cycle and reduce the cost of softwaretesting has become the inevitable trend of development. A lot of work hasbeen done in software testing automation. Many software companies developcommercial software testing tools for automated testing.The rapid development of object-oriented software technology makesthe research and development of object-oriented software testing tools hasbecome an urgent task. Therefore, this paper will discuss features andmethods of object-oriented software testing, featuring in the application ofautomatic generation of test scripts in object-oriented software testing andtest process improvement.Graphical user interface GUI (Graphical User Interface) is an importantcomponent of modern software part. Since the main function of the softwareis called through a graphical user interface, modern GUI test is the key tosoftware testing. As the most commonly used interactive media betweencomputer and users, GUI has developed rapidly. With the increasing of typeand function, GUI software not only brought convenience to the users, it hasalso brought challenge to software quality assurance. GUI functional testingmainly tests whether the software achieve users'expectations withoutexception reports. The complexity of the GUI testing determines itsdevelopment direction is how to achieve the greatest degree of automation toimprove efficiency and accuracy.During testing process, test scripts are usually used to reduce the manualworkload and improve the automation of testing after designing the test cases. Test scripts play an important role in the course of automated testing. Thedesign and creation of scripts directly impact on the test results reproduction.The creation of automated test scripts will greatly improve the automation oftesting.In this paper, the software testing technology and the status quo ofresearch are firstly introduced. Then the concept, technology and meaning ofautomated testing software, the principle and methods of test automationtools, and the development trend of test automation are introduced. Then, theadvantages and limitations of automated testing are analyzed. Also a detailedanalysis and comparison of current technologies of automatic generation ofthe test scripts is given.The features and the technology of commonly used automated GUItesting tools are analyzed. Most GUI test tool has not reached the maximumdegree of automation: the capture/playback technology needs manual testdata collection; data-driven test scripts are not really used; no results reportsverification mechanism. At the same time, the use of third-party scriptinglanguage in these tools has brought inconvenience.Based on the analysis of the problems and the limitations of currenttesting method and software testing tools, after reading a lot of related papers,learning from practical experience, a more complete set of automated testingsolutions which implements a greater degree of automated testing frameworkis put forward. Based on this framework and using .NET technology, anautomated software testing tool AutoTest is implemented.It includesAutoNonGUITest for non-GUI program testing and AutoGUITest for GUItesting. Although AutoTest currently only supports the applications in .NETFramework object-oriented languages, but its ideas and technology can befurther extended to testing under other platforms.In this paper, functional design and the realization of functional modulesof AutoNonGUITest, which is used to achieve the automation of non-GUI software testing, are illustrated. AutoNonGUITest tools use the smallestinteraction to thoroughly test a complex software product. AutoNonGUITestmakes the testing of non-GUI program more thoroughly and automatically,reducing the workload of test engineer.The following technical principles andrealization processes are discussed:1) Research on testing principle of data-driven methods of softwaretesting automation which AutoNonGUITest uses.2) Implementation of automatic search the namespace and class in theprogram, gathering relevant test information.3) Automatic test data generation and modification. Use XMLdocuments and EXCEL spreadsheet related namespace to implement testingdata access.4) Implementation of automatic generating mechanism of data-driventest scripts, the separation of the test scripts and the test data, thus enhancingthe rate of reusable test scripts.5) Simplify the stub modeling of integration testing through the reusingtest scripts of the bottom. Use real objects in the integration testing.6) Automatic running of test scripts, automatic test validation, automaticgeneration of the tests reports.AutoGUITest tool achieves a greater degree of GUI testing automation,fixing existing problems of current automated GUI testing tools.AutoGUITest tool reduces the number of interaction between tester andprogram, simplifies the process of generating and maintaining test cases,avoids tedious manual test validation process.The paper focuses on thefollowing principles and the technical implementation process:1) Using automatic search of GUI Controls to replace the captureprocess of commercial testing tools. First, automatic searching approach ofGUI needs to divide GUI screen of application under test into a grid system.the size of Each grid is determined by the density of controls under test so that each GUI control must appear in at least one grid.2) Try to use improved test case generation technology. The technologyfills the test sequence editor with the information of step 1. Tester will specifycontrol and its event from the test data collector, and insert test points (objectattributes to be verified). The system will automatically capture theinformation and generate test cases. Tester will be able to generate test casesquickly and accurately using a little interaction with program.3) Data-driven universal script: current scene-based test scripts notonly include test case, but also the corresponding scene information anddetails of achieving the bottom. The script has poor readability and difficultyto maintain. The research of this paper is to allow universal test script onlycontains the information of implementation, reducing the underlying sceneinformation, the specific details of the realization and the test data, so thatenhance the readability and maintainability of script greatly.4) Methods of testing implementation: The testing process is driven bythe test cases. The objective of this paper is the analyzing of test scripts andunderlying realization of the basic operation of the objects in the test cases.5) Automatic generation of test verification results. Four typical GUIverification methods are discussed: simple object verification, the specificobject verification, sum up validation and optimization certification.In this paper, some examples are used to verify the characteristics ofAutoGUITest and AutoNonGUITest. These examples prove that the AutoTesttesting tools are able to achieve more convenient object-oriented automatedtest process. Finally, the main work is concluded and the next work of thefuture is prospected.
Keywords/Search Tags:Object-oriented
PDF Full Text Request
Related items