计算机科学 ›› 2019, Vol. 46 ›› Issue (2): 159-165.doi: 10.11896/j.issn.1002-137X.2019.02.025

• 软件与数据库技术 • 上一篇    下一篇

基于梦境粒子群优化的类集成测试序列生成方法

张悦宁1, 姜淑娟1, 张艳梅1,2   

  1. 中国矿业大学计算机科学与技术学院矿山数字化教育部工程研究中心 江苏 徐州2211161
    桂林电子科技大学广西可信软件重点实验室 广西 桂林5410042
  • 收稿日期:2018-08-11 出版日期:2019-02-25 发布日期:2019-02-25
  • 通讯作者: 姜淑娟(1966-),女,博士,教授,博士生导师,CCF高级会员,主要研究领域为编译技术、软件工程等,E-mail:shjjiang@cumt.edu.cn
  • 作者简介:张悦宁(1993-),男,硕士生,主要研究领域为软件测试、类集成测试序列生成等,E-mail:ynzhang@cumt.edu.cn;张艳梅(1982-),女,博士,副教授,CCF会员,主要研究领域为软件分析与测试。
  • 基金资助:
    本文受国家自然科学基金(61673384,61502497),广西可信软件重点实验室开放课题(kx201530)资助。

Approach for Generating Class Integration Test Sequence Based on Dream Particle Swarm Optimization Algorithm

ZHANG Yue-ning1, JIANG Shu-juan1, ZHANG Yan-mei1,2   

  1. Mine Digitization Engineering Research Center of the Ministry of Education,School of Computer Science and Technology,China University of Mining and Technology,Xuzhou,Jiangsu 221116,China1
    Guangxi Key Laboratory of Trusted Software,Guilin University of Electronic Technology,Guilin,Guangxi 541004,China2
  • Received:2018-08-11 Online:2019-02-25 Published:2019-02-25

摘要: 类集成测试序列的确定是面向对象类集成测试技术中的一个重要课题。合理的类集成测试序列可以降低为其构造测试桩的总体复杂度,从而减小测试代价。针对粒子群优化算法容易早熟的缺陷,文中提出一种基于梦境粒子群优化算法的类集成测试序列生成方法。首先把每个类集成测试序列映射为一维空间中的一个粒子,然后将粒子看作有做梦能力的个体。每个迭代周期分为白天和夜间两个阶段,在白天阶段粒子正常移动,而在夜间阶段粒子根据各自的做梦能力扭曲当前位置。如此,粒子有机会在当前位置附近进行搜索,使得算法减缓收敛速度,避免过早陷入局部最优。实验结果表明,多数情况下该方法可以得到测试代价更小的类集成测试序列。

关键词: 测试代价, 测试序列, 集成测试, 局部最优, 梦境粒子群优化算法

Abstract: Determination of class integration test sequence is an important topic in object-oriented software integration testing.Reasonable class integration test sequence can reduce the overall complexity of test stub,and then reduce test cost.For particle swarm optimization algorithm,it is easy to be precocious.So a class integration test sequence determination method based on dream particle swarm optimization algorithm was proposed in this paper.First,each sequence is taken as a particle in one dimensional space.Then,every particle is considered to be a dreamer.Each iteration cycle is divided into two phases:day and night.In the daytime,particles move to new locations,and during the night,they contort the locations gained at day phase according to dreaming ability.In this way,particle has the opportunity to search near the current location,so that the algorithm can converge slowly and avoid falling into local optimum too early.The experimental results show that the proposed approach takes a lower test cost in most cases.

Key words: Dream particle swarm optimization algorithm, Integration testing, Local optimum, Test cost, Test sequence

中图分类号: 

  • TP311
[1]BRIAND L C,FENG J,LABICHE Y.Using Genetic Algorithms and Coupling Measures to Devise Optimal Integration Test Orders [C]∥ Proceedings of the 14th International Conference on Software Engineering and Knowledge Engineering.Ischia,Italy,2002:43-50.
[2]BRIAND L C,FENG J,LABICHE Y.Experimenting with Genetic Algorithms and Coupling Measures to Devise Optimal Integration Test Orders [R].Canada:Carleton University,Technical Report:SCE-02-03,2002.
[3]WANG Z S,LI B X,Wang L L,et al.Using Coupling Measure Technique and Random Iterative Algorithm for Inter-Class Integration Test Order Problem [C]∥ Proceedings of the 34th Annual IEEE Computer Software and Applications Conference Workshops.Seoul Korea,2010:329-334.
[4]ZHANG Y M,JIANG S J,CHEN R Y,et al.Class Integration Testing Order Determination Method Based on Particle Swarm Optimization Algorithm [J].Chinese Journal of Computers,2016,39(55):1-18.(in Chinese)
张艳梅,姜淑娟,陈若玉,等.基于粒子群优化算法的类集成测试序列确定方法[J].计算机学报,2016,39(55):1-18.
[5]WANG S S,CHEN M.Dream Effected Particle Swarm Optimization Algorithm [J].Journal of Information & Computational Science,2014,11(15):5631-5640.
[6]KUNG D C,GAO J,HSIA P,et al.Class Firewall,Test Order,and Regression Testing of Object-Oriented Programs [J].Journal of Object Oriented Programming,1993,8(2):51-65.
[7]KUNG D C,GAO J,HSIA P,et al.A Test Strategy for Object-Oriented Programs [C]∥ Proceedings of the 9th International Annual International Computer Software and Applications Conference.Dallas,Texas,USA,1995:239-244.
[8]KUNG D C,GAO J,HSIA P,et al.On Regression Testing of Object Oriented Programs [J].Journal of Systems Software,1996,32(1):21-40.
[9]TAI K C,DANIELS F J.Test Order for Inter-Class Integration Testing of Object-Oriented Software [C]∥ Proceedings of the 21th International Computer Software and Applications Confe-rence.Washington,USA,1997:602-607.
[10]LE TRAON Y,JERON T,MOREL P.Efficient Object-Oriented Integration and Regression Testing [J].IEEE Transactions on Reliability,2000,49(1):12-25.
[11]BRIAND L C,LABICHE Y,WANG Y.Revisiting Strategies for Ordering Class Integration Testing in the Presence of Dependency Cycles [C]∥ Proceedings of the 12th International Sympo-sium on Software Reliability Engineering.Hong Kong,China,2001:287-296.
[12]BRIAND L C,LABICHE Y,WANG Y.An Investigation of Graph-Based Class Integration Test Order Strategies [J].IEEE Transactions on Software Engineering,2003,29(7):594-607.
[13]TARJAN R.Depth-First Search and Linear Graph Algorithms [J].Siam J of Computing,2003,1(4):144-121.
[14]ZHANG Y M,JIANG S J,ZHANG H C.An Approach for Class Integration Testing Based on the Dynamic Dependency Relations [J].Chinese Journal of Computers,2011,34(6):1075-1089.(in Chinese)
张艳梅,姜淑娟,张红昌.一种基于动态依赖关系的类集成测试方法[J].计算机学报,2011,34(6):1075-1089.
[15]ZHANG Y M.Research on Testing Technology of Object-Oriented Programs Based on Dependency Analysis [D].Xuzhou:China University of Mining and Technology,2012.(in Chinese)
张艳梅.基于依赖性分析的面向对象程序测试技术研究[D].徐州:中国矿业大学,2012.
[16]JIANG S J,ZHANG Y M,LI H Y,et al.An Approach for Inter-Class Integration Test Order Determination Based on Coupling Measures [J].Chinese Journal of Computers,2011,34(6):1062-1074.(in Chinese)
姜淑娟,张艳梅,李海洋,等.一种基于耦合度量的类间集成测试序的确定方法[J].计算机学报,2011,34(6):1062-1074.
[17]HEWETT R,KIJSANAYOTHIN P.Automated Test Order Generation for Software Component Integration Testing [C]∥ Proceedings of the IEEE/ACM International Conference on Automated Software Engineering.Auckland,New Zealand,2009:211-220.
[18]ZHANG M,JIANG S J,ZHANG Y M,et al.A Multi-Level Feedback Approach for the Class Integration and Test Order Problem [J].The Journal of Systems and Software,2017,133(2017):54-67.
[19]HANH V L,AKIF K,TRAON Y L,et al.Selecting an Efficient OO Integration Testing Strategy:An Experimental Comparison of Actual Strategies [C]∥ Proceedings of the 15th European Conference on Objecte-Oriented Programming.Budapest,Hungary,2001:381-401.
[20]BORNER L,PAECH B.Integration Test Order Strategies to Consider Test Focus and Simulation Effort [C]∥ Proceedings of the International Conference on Advances in System Testing and Validation Lifecycle.Porto,Portugal,2009:80-85.
[21]CABRAL R D V,POZO A,VERGILIO S R.A Pareto Ant Colony Algorithm Applied to the Class Integration and Test Order Problem [C]∥ Proceedings of the 22th IFIP International Conference on Testing Software and Systems.Natal,Brazil,2010:16-29.
[22]VERGILIO S R,POZO A,CABRAL R D V,et al.Multi-Objective Optimization Algorithms Applied to the Class Integration and Test Order Problem [J].International Journal on Software Tools for Technology Transfer,2012,14(4):461-475.
[23]ASSUNÇÃO W K G,COLANZI T E,POZO A T R,et al.Establishing Integration Test Orders of Classes with Several Coupling Measures [C]∥ Proceedings of the 13th Annual Confe-rence Companion on Genetic and Evolutionary Computation.New York,USA,2011:1867-1874.
[24]DEB K,PRATAP A,AGARWAL S,et al.A Fast and Elitist Multiobjective Genetic Algorithm:NSGA-II [J].IEEE Transactions on Evolutionary Computation,2002,6(2):182-197.
[25]ZITZLER E,LAUMANNS M,THIELE L.SPEA2:Improving the Strength Pareto Evolutionary Algorithm [R].Technical Report 103,Gloriastrasse 35,CH-8092 Zurich,Switzerland,2001 [26]KNOWLES J D,CORNEL D W.Approximating the Nondominated Front Using the Pareto Archived Evolution Strategy [J].Evolutionary Computation,2000,8(2):149-172.
[27]GUIZZO G,FRITSCHE G M,VERGILIO S R,et al.A Hyper-Heuristic for the Multi-Objective Integration and Test Order Problem[C]∥Proceedings of the Genetic and Evolutionary Computation Conference.Madrid,Spain,2015:1343-1350.
[28]GUIZZO G,VERGILIO S R,POZO T R,et al.Grammatical Evolution for the Multi-Objective Integration and Test Order Problem [C]∥ Proceedings of the Genetic and Evolutionary Computation Conference.Paraná,Brazil,2016:1069-1076.
[29]JAROENPIBOONKIT J,SUWANNASART T.Finding a Test Order Using Object-Oriented Slicing Technique [C]∥Procee-dings of the 20th Asia-Pacific Software Engineering Conference.2007:49-56.
[30]LIU L Y.Research of Object-Oriented Software Integration Testing Strategy [D].Beijing:Beijing University of Posts and Telecommunications,2013 (in Chinese)
刘颖莲.面向对象软件集成测试策略研究[D].北京:北京邮电大学,2013.
[31]ZHAO Y L,WANG Y,YU H,et al.An Inter-Class Integration Test Order Generation Method Based on Complex Networks [J].Journal of Northeastern University(Natural Science),2015,36(12):1696-1700.(in Chinese)
赵玉丽,王莹,于海,等.基于复杂网络的类间集成测试序列生成方法[J].东北大学学报(自然科学版),2015,36(12):1696-1700.
[32]WANG Y,YU H,ZHU Z L.A Class Integration Test Order Method Based on the Node Importance of Software [J].Journal of Computer Research and Development,2016,53(3):517-530.(in Chinese)
王莹,于海,朱志良.基于软件节点重要性的集成测试序列生成方法[J].计算机研究与发展,2016,53(3):517-530.
[33]ZAIDMAN A,DEMEYER S.Automatic Identification of Key Classes in a Software System Using Webmining Techniques [J].Journal of Software Maintenance and Evolution:Research and Practice,2008,20(6):387-417.
[34]WAMSLEY E J,TUCKER M,PAYNE J D,et al.Dreaming of A Learning Task is Associated With Enhanced Sleep-Dependent Memory Consolidation [J].Current Biology Cb,2010,20(9):850-855.
[35]HOBSON J A,PACE-SCHOTT E F.The Cognitive Neuro- science of Sleep:Neuronal Systems,Consciousness and Learning [J].Nature Reviews Neuroscience,2002,3(9):579-693.
[1] 郑友莲, 雷德明, 郑巧仙.
求解高维多目标调度的新型人工蜂群算法
Novel Artificial Bee Colony Algorithm for Solving Many-objective Scheduling
计算机科学, 2020, 47(7): 186-191. https://doi.org/10.11896/jsjkx.190600089
[2] 徐俊, 项倩红, 肖刚.
基于改进混合蛙跳算法的云工作流负载均衡调度优化
Load Balancing Scheduling Optimization of Cloud Workflow Using Improved Shuffled Frog Leaping Algorithm
计算机科学, 2019, 46(11): 315-322. https://doi.org/10.11896/jsjkx.181001866
[3] 张悦,孙惠香,魏政磊,韩博.
具有自适应调整策略的混沌灰狼优化算法
Chaotic Gray Wolf Optimization Algorithm with Adaptive Adjustment Strategy
计算机科学, 2017, 44(Z11): 119-122. https://doi.org/10.11896/j.issn.1002-137X.2017.11A.024
[4] 李华,孙涛,王显荣,邢熠,李颖杰,夏兴行.
基于CPN对系统的并发行为进行测试
Testing Concurrent Behavior of System Based on CPN
计算机科学, 2016, 43(1): 218-225. https://doi.org/10.11896/j.issn.1002-137X.2016.01.048
[5] 王浩光,余世明.
求解车辆路径问题的改进伊藤算法
Improved ITO Algorithm for Solving VRP
计算机科学, 2015, 42(9): 253-256. https://doi.org/10.11896/j.issn.1002-137X.2015.09.049
[6] 陈建新 陈圆缘 章韵 杜月林.
用于移动汇聚节点的自适应数据采集策略
Self-adapting Data Gathering Scheme for Mobile Sink Node
计算机科学, 2012, 39(11): 45-50.
[7] 吴建辉,章兢,张小刚,刘朝华.
一种求解TSP问题的分层免疫算法
Novel Hierarchical Immune Algorithm for TSP Solution
计算机科学, 2010, 37(6): 256-260.
[8] .
一种基于运行时交互约束的COTS构件集成测试用例生成方法

计算机科学, 2009, 36(3): 261-265.
[9] 李华,叶新铭,刘静,刘龙.
移动IPv6协议中移动节点的可执行测试序列生成方法研究
Research on Executable Test Sequence Generation of Mobile Node of Mobile IPv6
计算机科学, 2009, 36(10): 137-140.
[10] .
构造基于构件依赖关系矩阵的元数据模型

计算机科学, 2008, 35(7): 269-273.
[11] 马良荔 郭福亮 李永杰.
基于变更模型的元数据在构件回归测试中的应用研究

计算机科学, 2008, 35(5): 280-283.
[12] .
基于复杂网络面向对象集成测试的研究

计算机科学, 2008, 35(12): 254-257.
[13] .
一种基于多UIO的一致性测试序列优化方法

计算机科学, 2007, 34(2): 274-276.
[14] .
基于交互纵览图的集成测试方法与实现

计算机科学, 2007, 34(12): 283-285.
[15] .
基于IRCFG覆盖的UML顺序图测试方法

计算机科学, 2006, 33(12): 270-273.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!