计算机科学 ›› 2025, Vol. 52 ›› Issue (6): 58-65.doi: 10.11896/jsjkx.240700115
王晨源, 张艳梅, 袁冠
WANG Chenyuan, ZHANG Yanmei, YUAN Guan
摘要: 类集成测试确保软件系统中多个类之间正常交互和协作,合理的类集成测试序列可以降低测试成本。为了降低程序中类集成测试序列的测试成本,国内外研究人员提出了多种类集成测试序列生成方法,但已有的方法生成的类集成测试序列的测试成本过高。针对上述问题,提出一种融合深度强化学习和图卷积神经网络的类集成测试序列生成方法。该方法首先将图卷积神经网络作为深度强化学习中的神经网络部分,并对智能体的网络结构和环境状态等方面进行改进,使环境和智能体可以基于图结构的数据进行交互;然后通过设计强化学习中的动作空间和奖励函数等基本要素,完成类集成测试序列的生成场景;最终实现智能体在不断地学习和尝试中得到最佳的类集成测试序列。实验结果表明,在以总体测试桩复杂度作为度量指标时,该方法能够在一定程度上降低生成类集成测试序列所需的测试桩代价。
中图分类号:
[1]BERNARD H.Fundamentals of Software Testing[M].JohnWiley and Sons Inc,2024. [2]KUNG D,GAO J,PEI H,et al.A Test Strategy for Object-oriented Programs[C]//Proceedings of Computer Software and Applications Conference.1995:239-244. [3]JIANG S J,ZHANG M,ZHANG Y M,et al.An IntegrationTest Order Strategy to Consider Control Coupling[J].IEEE Transactions on Software Engineering,2019,47(7):1350-1367. [4]BRIAND L C,FENG J,LABICHE Y.Using Genetic Algorithms and Coupling Measures to Devise Optimal Integration Test Orders[C]//Proceedings of the International Conference on Software Engineering and Knowledge Engineering.2002:43-50. [5]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,2018,41(4):931-945. [6]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 IFIP WG 6.1 International Conference on Testing Software and Systems.2010:16-29. [7]GAO Y Z,NIE Y M.Survey of Multi-agent Deep ReinforcementLearning Based on Value Function Factorization[J].Computer Science,2024,51(S1):34-42. [8]CZIBULA G,CZIBULA I G,MARIAN Z.An Effective Ap-proach for Determining the Class Integration Test Order Using Reinforcement Learning[J].Applied Soft Computing,2018,65(6):517-530. [9]DING Y R,ZHANG Y M,JIANG S J,et al.Research on Generation Method of Class Integration Test Order Based on Reinforcement Learning[J].Journal of Software,2022,33(5):1674-1698. [10]DING Y R,ZHANG Y M,YUAN G,et al.Integration Test Order Generation Based on Reinforcement Learning Considering Class Importance[J].The Journal of Systems and Software,2023,205:111823. [11]ZHANG Y H,ZHANG Y M,ZHANG Z C,et al.GenerationMethod of Class Integration Test Order Based on Deep Reinforcement Learning[J].Acta Electronica Sinica,2023,51(2):455-466. [12]LI Y,ZHANG Y M,DING Y R,et al.A Class Integration Test Order Generation Approach Based on Sarsa Algorithm[J].Automated Software Engineering.2024,31(7):1-33. [13]WANG Y,CHEN Z B,WU Z R,et al.Review of Reinforcement Learning for Combinatorial Optimization Problem[J].Journal of Frontiers of Computer Science and Technology,2022,16(2):261-279. [14]ZHANG Y M,JIANG S J,ZHANG M,et al.Survey of ClassTest Order Generation Techniques for Integration Test[J].Chinese Journal of Computers,2018,41(3):670-694. [15]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. [16]KLEINBERG J.Authoritative Sources in a Hyperlinked Environment[J].ACM,1999,46(5):604-632. [17]KIPF T N,WELLING M.Semi-Supervised Classification withGraph Convolutional Networks[C]//Proceedings of the 5th International Conference on Learning Representations.2017:1-14. [18]ZHANG M,JIANG S,ZHANG Y,et al.A Multi-level Feedback Approach for the Class Integration and Test Order Problem[J].The Journal of Systems and Software,2017,133(1):54-67. [19]HASSELT H V,GUEZ A,SILVER D.Deep ReinforcementLearning with Double Q-learning[C]//Proceedings of the 30th AAAI Conference on Artificial Intelligence.2016:2094-2100. [20]CHAUL T,QUAN J,ANTONOGLOU I,et al.Prioritized Experience Replay[C]//Proceedings of the 4th International Conference on Learning Representations.2016:1-21. [21]LE TRAON Y,JERON T,JEZEQUEL J M,et al.Efficient Object-oriented Integration and Regression Testing[J].IEEE Transactions on Reliability,2000,49(1):12-25. [22]TAI K C,DANIELS F J.Test Order for Inter-class Integration Testing of Object-Oriented Software[C]//Proceedings of the 21st Annual International Computer Software and Applications Conference.1997:602-607. [23]BRIAND L C,LABICHE Y,WANG Y.An Investigation ofGraph-based Class Integration Test Order Strategies [J].IEEE Transactions on Software Engineering,2003,29(7):594-607. [24]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.2010:329-334. |
|