计算机科学 ›› 2019, Vol. 46 ›› Issue (8): 239-243.doi: 10.11896/j.issn.1002-137X.2019.08.039
陈静1, 舒强2, 谢昊飞3
CHEN Jing1, SHU Qiang2, XIE Hao-fei3
摘要: 协议一致性测试是检验被测实现是否与标准协议规范相一致的方法,可确保符合协议的设备或者系统互联与互通。在被测设备调试、升级和修复等过程中,往往需要重新执行所有测试案例,以确保协议一致性测试的完备性。在协议实现的过程中,需要频繁地进行测试和修复,直至被测设备的协议完全符合协议的标准规范。而在每次的回归过程中,没有策略地执行测试案例集中所有的测试案例会增加测试的工作量。只有所有的测试案例执行结束,才能确定测试故障是否被正确修复,或者检测出其他新出现的故障。这导致了某些可以检测到故障的测试案例不能尽早执行,无法将测试重点放在易出错的部分,测试执行开销较大,会影响测试效率。因此在协议一致性测试过程中,如何对庞大的测试案例集进行优化并减少测试成本?在保证测试需求的前提下,使用尽可能少的测试案例尽快检测出系统中存在的故障以提高测试的故障检测率,成为了亟待解决的问题。文中在对现有的测试用例优先排序方法进行研究的基础上,对基于故障定位的测试用例优先排序算法进行了改进,以提高故障检测效率。该方法结合测试需求间的依赖关系、执行序列进行动态调整,对检错概率高的测试案例进行动态选取。在搭建的无线传感器网络的协议一致性测试系统上,对该算法进行了有效性验证。相较于Additional和FTP算法,所提方法的故障检测平均百分比APFD和测试效率TCFD分别至少提高了9.2%和7.6%。
中图分类号:
[1]JIANG B,CHAN W K.On the integration of test adequacy,test case prioritization,and statistical fault localization[C]∥Proceedings of the 10th International Conference on Quality Software (QSIC).Zhangjiajie:IEEE,2010:377-384. [2]JONES J A,HARROLD M J.Empirical evaluation of the tarantula automatic fault-localization technique[C]∥International Conference on Automated Software Engineering.Long Beach,USA:IEEE,2005:273-282. [3]PERELMAN L S,ABBAS W,KOUTSOUKOS X,et al.Sensor placement for fault location identification in water networks:A minimum test cover approach[J].Automatica,2016,72(C):166-176. [4]HAO D,ZHANG L,ZANG L,et al.To be optimal or not in test-case prioritization[J].IEEE Transactions on Software Engineering,2016,42(5):490-505. [5]ZHEN W,TANG Y H,LIU M,et al.Travelling wave fault location test technique and its applications using high speedtra-velling wave generator[C]∥Power and Energy Engineering Conference.Shanghai:IEEE,2012:1-4. [6]MASRI W,ASSI R A,et al.Prevalence of coincidental correctness and mitigation of its impact on fault localization[J].Acm Transactions on Software Engineering & Methodology,2014,23(1):1-28. [7]MIAO Y,CHEN Z,LI S,et al.Identifying coincidental correctness for fault localization by clustering test cases[M]∥Advances in Production Management Systems.Competitive Manufacturing for Innovative Products and Services.Berlin:Springer International Publishing,2012:158-165. [8]BODE F,SACHS F,FRANZ M R.Tarantula peptide inhibits atrial fibrillation[J].Nature,2001,409(6816):35-36. [9]YOO S,HARMAN M,CLARK D.Fault localization prioritization:Comparing information-theoretic and coverage-based approaches[J].Acm Transactions on Software Engineering & Methodology,2013,22(3):1-29. [10]ZHAO S,FANG Y,LI W,et al.Design and implemention of an emulation node for space network protocol testing[C]∥International Conference on Machine Learning and Intelligent Communications.Cham:Springer,2017:658-667. [11]WANG R,TIAN Y L,ZHOU D H,et al.Test-suite Reduction Based on MC/DC in Software Fault Localization[J].Computer Science,2015,42(10):170-174.(in Chinese) 王瑞,田宇立,周东红,等.面向故障定位的基于MC/DC的测试用例约简方法[J].计算机科学,2015,42(10):170-174. [12]LI X,ZHANG C,LUO X.Naive Bayesian Applied in Automatic Test Cases Generation.Journal of Chongqing University of Technology(Natural Science),2012,26(2):76-78.(in Chinese) 李欣, 张聪, 罗宪. 朴素贝叶斯应用于自动化测试用例生成. 重庆理工大学学报(自然科学), 2012, 26(2):76-78. [13]WU D P,LI Y,WANG R Y.A link failure localization strategy based on knight’s tour for Mesh optical network.Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition),2011,23(1):1-5.(in Chinese) 吴大鹏,李阳,王汝言.基于骑士巡游的Mesh光网络链路故障定位策略.重庆邮电大学学报(自然科学版),2011,23(1):1-5. |
[1] | 徐佳庆, 胡小月, 唐付桥, 王强, 何杰. 基于随机森林的高性能互连网络阻塞故障检测 Detecting Blocking Failure in High Performance Interconnection Networks Based on Random Forest 计算机科学, 2021, 48(6): 246-252. https://doi.org/10.11896/jsjkx.201200142 |
[2] | 刘云,尹传环,胡迪,赵田,梁宇. 基于循环神经网络的通信卫星故障检测 Communication Satellite Fault Detection Based on Recurrent Neural Network 计算机科学, 2020, 47(2): 227-232. https://doi.org/10.11896/jsjkx.190600147 |
[3] | 肖振华, 梁意文, 谭成予, 周雯. 基于免疫平衡机制的故障检测方法 Fault Detection Method Based on Immune Homeostasis Mechanism 计算机科学, 2019, 46(8): 337-341. https://doi.org/10.11896/j.issn.1002-137X.2019.08.056 |
[4] | 冯沈峰, 高建华. 基于AHP的回归测试用例优先级排序方法 Test Case Prioritization Method Based on AHP for Regression Testing 计算机科学, 2019, 46(8): 233-238. https://doi.org/10.11896/j.issn.1002-137X.2019.08.038 |
[5] | 张晓策,燕雪峰,周勇. 一种基于动态故障树的SBDD方法 Method of SBDD Based on Dynamic Fault Tree 计算机科学, 2017, 44(9): 195-199. https://doi.org/10.11896/j.issn.1002-137X.2017.09.037 |
[6] | 张芳,邓畅霖,王之,郭薇. 软件定义卫星网络的链路故障检测和恢复方案 Link Failure Detection and Fast Recovery in Software-defined Satellite Network 计算机科学, 2017, 44(6): 63-67. https://doi.org/10.11896/j.issn.1002-137X.2017.06.010 |
[7] | 吕宁,颜鲁齐,白光远. 分段多向核主元分析的啤酒发酵过程故障检测 Fault Detection for Beer Fermentation Process Based on Segmentation Multiway Kernel Principal Component Analysis 计算机科学, 2016, 43(Z6): 25-27. https://doi.org/10.11896/j.issn.1002-137X.2016.6A.004 |
[8] | 姚毅,刘勇,沈轩帆,廖勇,赵明. 基于IEEE 802.11e的无线传感器/执行器网络丢包判器设计 Packet Drop Detector Design Based on IEEE 802.11e in Wireless Sensor and Actuator Networks 计算机科学, 2016, 43(8): 66-70. https://doi.org/10.11896/j.issn.1002-137X.2016.08.013 |
[9] | 叶俊民,魏鹏,金聪,王敬华,张清国,张维. 内存泄漏故障静态分析研究 Static Analysis of Memory Leak Fault 计算机科学, 2010, 37(6): 171-175. |
[10] | 万亚平,冯丹,欧阳利军,刘立,杨天明. 一种适用于P2P存储系统的自反馈故障检测算法 Self-feedback Fault Detection Algorithm for Peer-to-Peer Storage System 计算机科学, 2010, 37(2): 48-52. |
[11] | . 一种适用于分布对象环境的层次型故障检测方法的研究 计算机科学, 2009, 36(2): 278-281. |
[12] | 杨光 周敬利 刘钢. 一种基于iSCSI的自适应故障检测器的研究 计算机科学, 2008, 35(6): 90-94. |
[13] | 刘钢 周敬利 秦磊华 陈小平. 纠错码拜占庭容错Quorum中错误检测机制 计算机科学, 2007, 34(5): 75-78. |
[14] | 许毅平 朱振华 周曼丽. BACnet应用层状态机在线测试研究 计算机科学, 2006, 33(6): 76-78. |
[15] | 叶新铭 孙美飞. IPv6邻居发现协议的一致性测试 计算机科学, 2005, 32(6): 43-46. |
|