计算机科学 ›› 2019, Vol. 46 ›› Issue (8): 239-243.doi: 10.11896/j.issn.1002-137X.2019.08.039

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

基于故障定位的测试用例优先排序方法

陈静1, 舒强2, 谢昊飞3   

  1. (重庆第二师范学院经济与工商管理学院 重庆400067)1
    (重庆邮电大学 重庆400065)2
    (重庆邮电大学自动化学院 重庆400065)3
  • 收稿日期:2019-04-29 出版日期:2019-08-15 发布日期:2019-08-15
  • 作者简介:陈静(1978-),女,硕士,副教授,主要研究方向为计算机应用、控制科学与工程,E-mail:dixuancc@163.com;舒强(1981-),男,博士,副研究员,主要研究方向为网络化控制技术、计算机应用;谢昊飞(1978-),男,博士,教授,主要研究方向为网络化控制技术、无线传感器网络、协议测试、嵌入式系统

Priority Ranking Method of Test Cases Based on Fault Location

CHEN Jing1, SHU Qiang2, XIE Hao-fei3   

  1. (School of Economics and Business Administration,Chongqing University of Education,Chongqing 400067,China)1
    (Chongqing University of Posts and Telecommunications,Chongqing 400065,China)2
    (School of Automation,Chongqing University of Posts and Telecommunications,Chongqing 400065,China)3
  • Received:2019-04-29 Online:2019-08-15 Published:2019-08-15

摘要: 协议一致性测试是检验被测实现是否与标准协议规范相一致的方法,可确保符合协议的设备或者系统互联与互通。在被测设备调试、升级和修复等过程中,往往需要重新执行所有测试案例,以确保协议一致性测试的完备性。在协议实现的过程中,需要频繁地进行测试和修复,直至被测设备的协议完全符合协议的标准规范。而在每次的回归过程中,没有策略地执行测试案例集中所有的测试案例会增加测试的工作量。只有所有的测试案例执行结束,才能确定测试故障是否被正确修复,或者检测出其他新出现的故障。这导致了某些可以检测到故障的测试案例不能尽早执行,无法将测试重点放在易出错的部分,测试执行开销较大,会影响测试效率。因此在协议一致性测试过程中,如何对庞大的测试案例集进行优化并减少测试成本?在保证测试需求的前提下,使用尽可能少的测试案例尽快检测出系统中存在的故障以提高测试的故障检测率,成为了亟待解决的问题。文中在对现有的测试用例优先排序方法进行研究的基础上,对基于故障定位的测试用例优先排序算法进行了改进,以提高故障检测效率。该方法结合测试需求间的依赖关系、执行序列进行动态调整,对检错概率高的测试案例进行动态选取。在搭建的无线传感器网络的协议一致性测试系统上,对该算法进行了有效性验证。相较于Additional和FTP算法,所提方法的故障检测平均百分比APFD和测试效率TCFD分别至少提高了9.2%和7.6%。

关键词: 方法改进, 故障检测, 排序方法, 效率提升, 协议一致性测试

Abstract: Protocol conformance testing is a method to verify whether the tested implementation is consistent with the standard protocol specification,which can ensure the interconnection and interworking of the equipment or system in accordance with the protocol.In the process of debugging,upgrading and repairing the tested equipment,it is often necessary to re-execute all test cases to ensure the completeness of protocol conformance testing.In the process of protocol implementation,it is necessary to test frequently and repairs this process until the protocol implementation of the tested equipment fully conforms to the protocol standard specification.In each regression process,the unstrategic execution of all test cases in the test case set will increase the workload of the test.Only at the end of all test cases,whether the test failure has been repaired correctly,or if other new failures have been detected,can be determined.As a result,some test cases that can detect faults can not be executed as soon as possible,and the test can not focus on the error-prone parts.The cost of test execution is large,which affects the test efficiency.Therefore,in the process of protocol conformance testing,how to optimize the huge test case set and reduce the test cost.Under the premise of ensuring the test requirements,using as few test cases as possible to detect the faults in the system as soon as possible,and improving the test fault detection rate has become an urgent problem to be solved.In this paper,based on the research of the existing test case priority sorting methods,the test case priority sorting algorithm based on fault location was improved,so as to improve the efficiency of fault detection.Combined with the dependence between test requirements,the dynamic adjustment of sequence is performed,and the test cases with high error detection probability are selected dynamically.The algorithm is verified effectively on the protocol conformance test system of wireless sensor networks.Compared with the Additional and FTP algorithms,its average percentage of fault detection APFD and test cost TCFD increases by at least 9.2% and 7.6% respectively.

Key words: Efficiency improvement, Fault detection, Method improvement, Protocol conformance test, Sort method

中图分类号: 

  • TP13
[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.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!