Font Size: a A A

Research On Analysis And Testing Techniques Of Object-Oriented Programs

Posted on:2007-02-19Degree:DoctorType:Dissertation
Country:ChinaCandidate:C Y MaoFull Text:PDF
GTID:1118360242961907Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
During the whole lifecycle of software development, software testing is one of the key steps to ensure the high quality of software. The introduction of Object-Oriented methodology into software engineering greatly facilitates the processes of software design, development and maintenance, but some characters of Object-Oriented programs, such as encapsulation, inheritance, polymorphism, and exception handling mechanism, bring some new challenging problems to software testing. Some traditional testing strategies and methods can be adjusted or improved for testing the OO programs. On the other hand, exploiting a new system of testing theory and technology for these new specialties is essentially important.Object-Oriented software testing can be classified into four different levels: method level, class level, cluster level, and system level. There is no significant difference between the methods in class and the procedures (or functions) in traditional program, thus the common structural testing methods, such as control flow or data flow testing, can be applied into intra-/inter-method testing in class, and the branch coverage criterion has been proved to be the best cost performance of its all criteria. Based on analyzing the dependency of program constructs and properties of Decision-to-Decision graph, which is a representation of program's control flow, an approximate algorithm (called Find_ SemiUE) for solving the set of unconstrained edges (i.e., UE) is proposed, which is simple, quick and very suitable for the large-scale programs. Under the direction of UE, a simplified algorithm named Generate_PathSet can generate the test path cases with low time and space cost via forward (backward) breadth (depth) traversal of DD graph.Statistical testing approach has been proved to be with stronger fault revealing power than deterministic testing method in practice. With its remarkable characters of simplicity, convenience, and lower cost, it has been diffusely adopted in software testing activities. Aiming at OO program's specialties and different comprehension perspectives, the statistical testing in method level and object level can be employed on class programs respectively. The statistical structural testing in method level is suitable to detect the logical errors in statements. On the other hand, the statistical functional testing in object level can expose the incorrect implementations which will lead to failure state transitions. Furthermore, a mixed statistical testing framework can be constructed by combining the above two approaches in different levels.Determining inter-class test order is one of the most difficult tasks in cluster level testing. The concept of extended/weighted object relation diagram (EORD/WORD) is presented by extending the traditional object relation diagram (ORD). While generating the inter-class test order based on WORD, minimizing the number of realistic stubs (not the number of classes to be stubbed) is regarded as optimization objective. Some heuristic rules, such as association intensity, cycling weight and direction factor of edge, are treated as important criteria to cut association edges to break cycles. An improved algorithm ICTO is proposed via analyzing some principles of the existing methods and overcoming some of their drawbacks. This algorithm has some merits such as the fewer number recursion times, lower cost of generating class stubs, and excellent stability.Object-Oriented technology provides an essential support for component realization, so component generally retains the basic Object-Oriented characters, and component- based software's testing can be viewed as the continuation and extension of OO program testing. Due to lack of the detailed internal constructs and change information of the externally-developed components, system testers (i.e., component users) generally can't perform effective testing (especially regression testing), on their component-based systems. The ultimate reason is that they are unable to select the proper test cases to retest the affected parts caused by the modifications in component. Through analyzing the drawbacks of existing regression testing techniques for component-based systems, two improved strategies are proposed: one is based on the enhanced representation of change information of component version, and the other is implemented via the component built-in test design. Preliminary experiment results show that the above two strategies of regression test case selection are fairly feasible and cost-effective in practice.Software testing is a practical activity combined with theory, technology, tool, and management. Among these four important facets, assistant tool for testing plays an outstanding role in software development in practice, and should not be neglected. In order to facilely perform testing on C or C++ programs, a prototype tool called CppTest is designed and implemented. It can employ three levels'testing, namely (1) structural testing in method level by analyzing program's constructs, instrumenting probes, redirecting I/O stream, etc., (2) state-based class level testing through modeling state transition behaviors using an extended finite state machine (EFSM) from the class specifications, and (3) system level black-box testing with some traditional strategies such as equivalence partitioning and boundary-value analysis. In addition, the tool can employ clustering analysis on the failure executions and then sample fairly few representative test executions to direct program diagnosis. Multi-levels'testing capability, test project management, high automation, visualization and scalability are the remarkable merits of the prototype system.
Keywords/Search Tags:Software Testing, Test Case, Branch Testing, Statistical Testing, Inter-class Test Order, Regression Testing, Built-in Test Design, Clustering Analysis
PDF Full Text Request
Related items