Font Size: a A A

Analysis And Design Of Unit Test Useage Automated Generation

Posted on:2008-09-19Degree:MasterType:Thesis
Country:ChinaCandidate:H LiFull Text:PDF
GTID:2178360242958954Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Software testing is an important mean to ensure software quality. But traditional manual testing has many disadvantages such as low effect, using huge manpower and time resources, ineffective quantization management, etc. Automated testing has occupied more and more proportion in software testing. Automated testing wants to take automated test according to tester's prepared plan through automated test tools or other means. It's aim is to release laboring of manual testing and so achieve the aim of improving software quality. Test data automated generation is an essential problem. It can effectively and automated generate test usage which meet testing needs well, and it is an important mean to improve the work efficiency of software testing.Path-oriented test data automated generation can be described as follow: giving a program P and a path W, assuming that the input domain of P is D, requesting input x∈D to make P run through path W under the input x. To solve this problem can be changed to a constraint system construction and solving problem. The main obstacle of constructing constraint system lies in analysis and reducing all kinds of statements and data types on the path, and tries to express condition predicate as the function of input variables. And the primary obstacle in solving constraint system is nonlinear constraint on path. It had been proved that there is no universal and effective mean to solve nonlinear constraint system.Neelam Gupta et al proposed a method called Iterative Relaxation Method to address the problem. By means of analyzing the static and dynamic data dependencies between the statements on W, and constructing predicate slices and input dependency sets, this method linearizes the predicate functions with linear arithmetic representations, solving the problem by numerical analysis method. Because the method needs to know the static and dynamic data dependencies between the statements on W, it can only be used to generate test data for white-box testing.The Iterative Relaxation Method is improved in three aspects in this thesis, by omitting the constructions of predicate slices and input data dependency sets, selecting main path, replacing divided differences with the derivative of function. The improved method needn't to analyze the static and dynamic data dependencies between the statements on W, so it can be used to generate test data for black-box testing. The improved method has more abilities and higher efficiencies than original method.A path-oriented test data automated generation framework is proposed in this thesis, whose fundamental algorithm is the improved Iterative Relaxation Method. If all of the predicate functions on path are linear, the framework either find a solution for path in one iteration or guarantees that the path is infeasible. When there is nonlinear function, it may take more than one iteration to derive a desired input or enhance the confidence that the path is infeasible.A prototype of the path-oriented test data automated generation framework has been developed in this thesis. The prototype tools is developed in object-oriented idea, programmed in Java language, defined a simple language J for experiment. It uses JavaCC for automated generating lexical scanner and parser scanner of language J, solving the system of linear constraint. The initial experiments carried out on this framework have shown that the framework is correct and effective.
Keywords/Search Tags:software testing, path-oriented testing, automated generation of test data, black-box testing, white-box testing
PDF Full Text Request
Related items