43 5 Vol. 43 No. 5 2011 9 JOURNAL OF SICHUAN UNIVERSITY ENGINEERING SCIENCE EDITION Sept. 2011 1009-3087 2011 05-0126-07 610065 Internet Internet ACO MySQL ACO TP311 A Implementation Technology Study of Distributed Automated Software Testing YANG Qiu-hui ZHOU Hong-yu HONG Mei WANG Song ZANG Kang School of Computer Sci. Software Sichuan Univ. Chengdu 610065 China Abstract In order to study the distributed and automated testing of large-scale software a distributed automated software testing platform DASTP was presented which was based on the analysis of an existing software testing framework and the idea of distributed continuous software quality assurance. The prototype system was implemented. The platform integrated a series of tools required in the software testing and could use free resources in Internet to complete the continuous integration and testing of large-scale software. A task scheduling algorithm based on part-time constraint and an improved ACO algorithm for set partitioning problem were proposed. These two algorithms can partition testing task into subtasks and then schedule these subtasks automatically. By running MySQL testing in the prototype system the feasibility of the platform architecture and the effectiveness of the algorithms were verified. Key words automated software testing distributed continuous quality assurance software testing platform distributed task scheduling ACO algorithm Internet Web Li 1 Stocks Carrington TTF 2 Hartman 2010-10 - 17 1970 -.. AGE- DIS 3 Marinov Khurshid Java
5 127 4 Porter 5 Skoll Internet Cloud Testing Kite SOASTA Web STAF IBM STAF 6 Zhu 7 1 Skoll Fig. 1 Skoll running environment Web 5 Skoll DASTP 2 Internet Web Internet DASTP distributed automated software testing platform Internet Web 24 1 1. 2 1. 1 DASTP 3 Skoll 5 3 B /S Skoll QA C /S C /S Web Web 1 Skoll DASTP
128 43 Fig. 2 2 DASTP DASTP platformrunning environment 3 DASTP Fig. 3 DASTP architecture Web 4 1. 3 4
5 129 4 Fig. 4 System processing flow j i a ij = 1 a ij 2 = 0 c j j x k j 2. 1 j k 1 0 SPP Min f k x = n c j x k j k = 1 m 1 j = 1 n a ij x i j = 1 i = 1 m 2 j = 1 2. 1. 1 ACO SPP 8-10 p τ α p k j η β j j t = τ l η l β if j Nk 3 l N k τ j j SPP 8 η j α β α β N k SPP η j 9 n S m η m n A = a ij j = 1 4 c j
130 43 c j j EndWhile 5 EndFor τ i t + Δt = 1 - ρ τ i t + Δτ i t t + Δt 5 PostProcessingProcedures ρ 0 < ρ < 1 1 - ρ UpdateOptimum τ i t UpdatePheromone t i Δt EndWhile Return best_solution_founded End 11 Δτ i while { Q Δτ i = L if i tabulist k D TabuList 6 k Sum D 0 otherwise L k Q / M% M tabulist k k 100 M 150 2. 1. 2 ACO Crawford Castr 9 ACO D AS ACS PostProcessing- Procedures SPP α = 1 β = 0. 5 ρ = 0. 1 Q 9 ACO m 10-12 ACO Procedure ACO for SPP Begin InitParameters While remain iterations do j = PriorProcessingProcedures For k = 1 to nants - j do While solution is not completed SelectElement If Sum < D then AddElementToSolution election AddToTabuList k Else Break endif D PriorProcessingProcedures 13 14 2. 2 15-16 T k = A B D E R = A B D E F C k I A B D
5 131 E R 3. 2 F I MySQL ID = MySQL Win7 Windows Windows = Win7 MySQL T C T = T 1 = T n A 1 B 1 D 1 E 1 R 1 A n B n D n E n R { } n G k C&&B Gk = B Tp &&A Gk = A Tp && G = G k D Gk = D Tp &&E Gk = E Tp &&F Gk R T p G T p T p MySQL MySQL Test Frameworks MySQL Test Frameworks Linux Linux MySQL Test Frameworks MySQL 3 mysql MySQL 5. 1 3. 1 DASTP Web MyEclipse Java Linux Linux Windows MySQL 24 27 30 33 36 min CVS 5 ANT Junit Linux MySQL MySQL Test Framework MySQL 600 C 1 A 1 B 1 D 1 E 1 F 1 C = = C 1 Linux Windows Linux m A m B m D m E m F m T T p = A p B p D p E p R p 5 2 PC C G MySQL 600 Web
132 43 ASE. San Diego CA 2001 22-32. 5 Porter A Yilmaz C Memon A M. Skoll Distributed continuous quality assurance C / /Proceedings of the 26 th IEEE / ACM International Conference on Software Engineering. Edinburgh Scotland IEEE /ACM 2004. 6 Rankin C. The software testing automation framework J. IBM Systems Journal Software Testing and Verification Fig. 5 5 Final testing results 4 9 Crawford B Castro C. Integrating lookahead and post processing procedures with ACO for solving set partitioning and covering problems C / /Rutkowski L Tadeusiewicz R Zadeh L A et al. ICAISC 2006. LNCS LNAI Heidelberg Springer 2006 4029 1082-1090. 10 Dorigo M Stutzle T. Ant colony optimization M. Cambridge MA MIT Press 2004. Internet 11 Leguizamon G Michalewicz Z. A new version of ant system for subset problems C / /Congress on Evolutionary Computation. CEC 99 Piscataway NJ USA IEEE Press 1999 1459-1464. 1 Lin Yuehua Zhang Jing Gray J. A testing framework for model transformations M / /Beydeda S Matthias B Gruhn V. Modeldriven Software Development Research and Practice in Software Engineering. Springer 2005 219-236. 2 Stocks P A Carrington D A. Test templates A specificationbased testing framework C / /Proceedings of 15 th International Conference on Software Engineering. 1993 405-414. 3 Hartman A Nagin K. The AGEDIS tools for model based testing C. International Symposium on Software Testing and Analysis 2004 29 4 129-132. 4 Marinov D Khurshid S. TestEra A novel framework for automated testing of Java programs C / /Proc 16 th IEEE International Conference on Automated Software Engineering 2002 41 1 126-139. 7 Zhu F Rayadurgam S Tsai W T. Automating regression testing for real-time software in a distributed environment C / /Proceedings of First International Symposium on Object-Oriented Real-Time Distributed Computing ISORC 98. 1998 373-382. 8 Maniezzo V Milandri M. An ant-based framework for very strongly constrained problems C / /Dorigo M Di Caro G Sampels M. Ant algorithms Proceedings of ANTS 2002 Third International Workshop. Lecture Notes in Comput Sci Berlin Springer 2002 2463 222-227. 12 Lessing L Dumitrescu I Stutzle T. A comparison between ACO algorithms for the set covering problem C / /ANTS 2004. Lecture Notes in Comput Sci SV 2004 3172 1-12. 13 Chu P C Beasley J E. Constraint handling in genetic algo- rithms the set partitioning problem J. Journal of Heuristics 1998 4 323-357. 14 Gao Shang Hou Zhiyuan. Particle swarm optimization algorithm for set partition problem J. Journal of Jiangsu University of Science and Technology Natura1 Science Edition 2005 12 42-45.. J. 2005 12 42-45. 15 Dandamudi S P. A comparison of task scheduling strategies for multiprocessor systems C / /Proceedings of the IEEE Symposium on Parallel and Distributed Processing. Dallas TX 1991 423-426. 16 Aguilar J Gelenbe E. Task assignment and transaction clustering heuristics for distributed systems J. Information Sciences 1997 97 199-219.