Font Size: a A A

Class Integration Test Order Generation For Object-Oriented Programs

Posted on:2019-12-03Degree:MasterType:Thesis
Country:ChinaCandidate:M ZhangFull Text:PDF
GTID:2428330566963650Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
The software industry has gradually involved in almost all fields of human society with the continuous development of computer science and technology.People are increasingly dependent on software products in contemporary society,and expect to acquire higher-quality software.As a main measure to improve the quality of software products and ensure their reliability,software testing techniques can detect and repair errors and bugs in the software in time,and avoid any inconvenience,even serious economic losses in production and life caused by software quality problems.Integration testing is one of the most important steps in the software testing,whose main aim is to ensure that the different modules and sub-systems can cooperate accurately and stably when they are combined according to the requirements.Object-oriented programs cannot be integrated and tested by tradition methods used in procedure-oriented programs,since their classes invoke each other,forming plenty of complicated dependencies,and finally there are not obvious hierarchy in these programs.To tackle this issue,researchers proposed an integration testing strategy based on test order for object-oriented programs.When a class require the services from other classes that have not been tested,testers should construct stubs to emulate the behaviors of these classes.So different test orders will cause various test stubs or test drivers,and the testing cost may be consequently different.It is significant to propose an effective approach to find out the optimal test order that can minimize the stubbing complexity and avoid the unnecessary efforts.Many experts and scholars at home and abroad have proposed different kinds of approaches for the class integration and test order problems,but these methods often generate class integration test orders with higher testing cost,and some methods even waste a significant amount of time and efforts in finding test orders especially for complex programs.Based on the analysis and study of the existing generation methods,this thesis addresses some problems,and proposes an approach for the class integration and test order problem based on reward and punishment,and a method for the class integration and test order problem considering transitive relation,and implements a class integration test order generation tool for Java programs.To overcome the limitation that the existing methods are inefficient and may devise sub-optimal test orders especially for large-scale programs,this thesis introduces an approach for the class integration and test order problem based on reward and punishment.The proposed method first sets the initial test priority for all classes based on their test cost and test net revenue;then the appropriate classes can be selected for testing,and the information of dependencies between the chosen classes and the untested classes can be used as a feedback to recalculate the test net revenue of untested classes;the reward and punishment mechanism would adjust the test priority for untested classes according to the recalculated test net revenue;finally,the above process will be repeated until all the classes have been integrated and tested.The experimental results indicate that this method can generate test orders with lower stubbing cost in a short time.To solve the problem that the cost function in existing methods is not accurate and comprehensive enough,the thesis introduces a method for the class integration and test order problem considering transitive relation.The proposed method first analyzes the dependencies among classes,identifies the transitive relation,and constructs inter-class transitive relation diagram;then the method calculates the complexity of control coupling,measures the stubbing cost for the inter-class transitive relation,and devises a new calculation for the stubbing complexity;finally,the existing methods can be improved according to the above defined testing cost measurement method.The experimental results show that this method can measure the inter-class transitive relation that is omitted by the existing cost function,and the inter-class transitive relation can affect the stubbing cost of the class integration test orders.The thesis also implements a class integration test order generation tool for Java programs,which adopts the above methods that we proposed.
Keywords/Search Tags:class integration test orders, reward and punishment mechanism, transitive relation, testing cost, test stubs
PDF Full Text Request
Related items