In aspect of guaranteeing software quality, software testing is a very important means, which can enhance the reliability of software products, but at the same time it is also the human cost and time.Class cluster testing,also known as integration testing, it is an indispensable part in object oriented software testing, because the correct realization of relationships among various clusters is to rely on it to check.Class cluster testing need to class and class of a lot of interaction to do testing, using traditional sequential test mode, one can only test a target to be measured, the need to spend a lot of time. Application of multithreading technology in the cluster level testing, you can create multiple threads on multi-core system,and execute integration test cases in parallel manner.Multithreading technology can make the processor resources are fully utilized, which will shorten the time needed for the software test.The traditional parallel integration testing strategy is a method of program based on functional decomposition, the larger is to divide the big program into several independent sub tasks and make the sub tasks for parallel processing. The composition unit of an object-oriented program is a class, the class has inheritance, encapsulation and polymorphism characteristics, object-oriented program no longer has a hierarchical structure, and all kinds of static call relationship between the formation is complex network. This makes the parallel testing task methods are no longer suitable for cluster level testing program based on the decomposition of the traditional.Parallelization of class integration testing task is to keep the no-related classes testing simultaneously in multiple threads, and class cluster testing order is one of the important problems in the research. Using the cluster test sequence properly can effectively reduce the cost of constructing the test stubs. With inheritance, aggregation and association relationships between classes and so on, complex class cluster relationships tend to form a loop. In order to determine the starting of testing position need to break the loop first, association relationship is the weakest of all the coupling relationships, therefore this article takes the break association side. In order to calculate the degree of association that the relationship sids has been broken, this article uses the class coupling measurement way of computing complexity of test stubs, and puts forward a method of comprehensive consideration of broken degree of node number, number of loops and the complexity of test pile. To the no-loop object relation graph for parallel analysis, and design two kinds of parallel algorithms, one is the hierarchical parallel algorithm, and the other one is the extended hierarchical parallel algorithm. The former is the highest efficiency in the case that the same layer class testing task execution time are similar, the latter avoids the hierarchical algorithm that the classses in the same layer waiting for each other and a waste of time, and considers the effect of the number of threads in the test of time. |