计算机科学 ›› 2017, Vol. 44 ›› Issue (11): 109-113.doi: 10.11896/j.issn.1002-137X.2017.11.017

• 2016 年全国软件与应用学术会议 • 上一篇    下一篇

运用变异测试的并行程序测试用例最小化算法

郑炜,冯晨,吴潇雪,黄月明,方靓芸   

  1. 西北工业大学软件与微电子学院 西安710072,西北工业大学软件与微电子学院 西安710072,西北工业大学软件与微电子学院 西安710072,西北工业大学软件与微电子学院 西安710072,西北工业大学软件与微电子学院 西安710072
  • 出版日期:2018-12-01 发布日期:2018-12-01
  • 基金资助:
    本文受国家自然科学基金青年基金(61402370)资助

Mutation Test Based Test Case Minimization for Concurrent Program

ZHENG Wei, FENG Chen, WU Xiao-xue, HUANG Yue-ming and FANG Jing-yun   

  • Online:2018-12-01 Published:2018-12-01

摘要: 在并行程序测试中,测试输入和线程交互时序是影响并行错误检测的两个关键因素。以缩减并行错误检测的输入空间为目标,给出一种基于变异测试的测试用例最小化算法。首先对并行程序进行研究,选取与并行错误密切相关的9个变异算子,并以此为基础为待测程序生成多种变异体;采用JPF作为线程调度工具来执行测试用例,根据变异评分与平均时间成本对测试用例进行排序,在优化后的测试用例集中选取检测能力不重复的测试用例,从而得到面向并行错误检测的最小测试用例集。实验结果证明,该方法能有效减小测试用例集的规模,并大幅缩短运行时间,从而提高了并行程序的测试效率。

关键词: 并行程序,变异测试,测试用例优化,测试用例最小化

Abstract: In the test of concurrency program,test input and the timing of threads interaction are the two key factors that affect the concurrency bug detection.For narrowing input space of concurrency bug detection,this paper proposed an algorithm of test case minimization based on mutation test.It first studies on different concurrency programs and selects 9 mutation operators which can contribute to the generation of mutants to the testing programs.Then it chooses JPF as the detecting tool during the execution of programs,through which the test cases are sorted according to mutation score(MS) and average cost(AC).Finally it picks those test cases which can find out different bugs in the prioritized test cases.Experimental results show that the method can effectively reduce the size of test cases,shorten running time and improve the effectiveness of concurrency bug detection.

Key words: Concurrency program,Mutation test,Test case prioritization,Test case minimization

[1] MANIKA T.An Approach for Test Case Prioritization Based on Three Factors[J].Information Technology and Computer Scien-ce,2015(4):79-86.
[2] GKE N,BELLI F,EMINOV M,et al.Model-based test case prioritization using cluster analysis:a soft-computing approach.http://journals,tubitak.gov.tr/elektrik/abstract.htm?id=16001.
[3] OURIQUES J F S,CARTAXO E G,M ACHADO P D L.Revealing influence of model structure and test case profile on the prio-ritization of test cases in the context of model-based testing[J].Journal of Software Engineering Research & Development,2015,3(1):1-28.
[4] KAVITHA R,SURESHKUMAR N.Test Case Prioritizationfor Regression Testing based on Severity of Fault[J].International Journal on Computer Science & Engineering,2010,2(5):1462-1466.
[5] CHEN T Y,LAU M F.A new heuristic for test suite reduction [J].Information & Software Technology,1998,40(5):347-354.
[6] CHEN T Y,LAU M F.A simulation study on some heuristics for test suite reduction[J].Information & Software Technology,1998,40(13):777-787.
[7] BRADBURY J S,CORDY J R,DINGEL J.Mutation Operators for Concurrent Java (J2SE 5.0)[C]∥The Workshop on Mutation Analysis.IEEE Computer Society,2006:11.
[8] GLIGORIC M,ZHANG L,PEREIRA C,et al.Selective mutation testing for concurrent code[C]∥International Symposium on Software Testing and Analysis.2013:224-234.
[9] DAN H,HIERONS R M.Semantic Mutation Analysis of Floa-ting-Point Comparison[C]∥IEEE Fifth International Confe-rence on Software Testing,Verification and Validation.IEEE,2012:290-299.
[10] DENG D,ZHANG W,LU S.Efficient concurrency-bug detec-tion across inputs[C]∥Acm Sigplan International Conference on Ojbect Oriented Prgramming Systems Languages & Applications.ACM,2013:785-802.
[11] LUCIA B,CEZE L,STRAUSS K.ColorSafe:architectural support for debugging and dynamically avoiding multi-variable atomicity violations[J].ACM Sigarch Computer Architecture News,2010,38(3):222-233.
[12] GAO Q,ZHANG W,CHEN Z,et al.2ndStrike:toward manifesting hidden concurrency typestate bugs[J].ACM SIGPLAN Notices,2012,47(4):239-250.
[13] MUZAHID A,QI S,TORRELLAS J.Vulcan:Hardware sup-port for detecting sequential consistency violations dynamically[C]∥2012 45th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).IEEE,2012:363-375.
[14] DEMILLO R A,LIPTION R J,SAYWARD F G.Hints on Test Data Selection:Help for the Practicing Programmer[J].Computer,1978,11(4):34-41.
[15] HAMLET R G.Testing Programs with the Aid of a Compiler[J].IEEE Transactions on Software Engineering,1977,SE-3(4):279-290.
[16] ANDREWS J H,BRIAND L C,Labiche Y.Is mutation an appropriate tool for testing experiments?[C]∥International Conference on Software Engineering,2005(ICSE 2005).IEEE,2005:402-411.
[17] ZHONG H,ZHANG L,MEI H.An experimental study of four typical test suite reduction techniques [J].Information & Software Technology,2008,50(6):534-546.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!