期刊文献+

一种基于模型检验的类测试用例生成方法 被引量:7

Using model checking to generate test cases for class testing
下载PDF
导出
摘要 提出一种新的自动生成类测试用例的方法.使用符号执行从类源代码抽取对象的状态和行为,以一个四元组抽象描述类,并转化成等价的Kripke结构.使用CTL公式描述测试覆盖标准,然后把这组CTL公式和描述类状态行为的Kripke结构输入模型检验工具,并利用模型检验工具自动生成相应的证据路径,最后将路径转化成满足相应覆盖标准的类测试用例.该方法直接从源代码生成测试用例,并使用贪心法约减冗余用例以降低测试成本.实验表明该方法生成的测试用例具有较高的覆盖率. A novel approach is presented to generate test cases for class testing. The states and the behaviors of the object are extracted from the source code. Then the class under testing is characterized abstractly with a 4-tuple, which can be converted into an equivalent Kripke model. The coverage criteria are expressed by computer tree logic (CTL) formulae. Model checker generates witnesses automatically when verifying CTL formulae on that Kripke model. The witnesses can be converted into a test suite which satisfies the corresponding coverage criteria. Test cases are generated from source code directly, and the greedy method is used to reduce redundant test cases in order to save the cost of software testing. The experimental results show that test cases generated by the proposed approach can achieve high rate of coverage.
出处 《东南大学学报(自然科学版)》 EI CAS CSCD 北大核心 2007年第5期776-781,共6页 Journal of Southeast University:Natural Science Edition
基金 国家杰出青年科学基金资助项目(60425206) 国家自然科学基金资助项目(60403016) 江苏省自然科学基金资助项目(BK2005060) 东南大学优秀青年教师教学科研资助项目
关键词 软件测试 模型检验 时序逻辑 测试用例 software testing model checking temporal logic test case
  • 相关文献

参考文献12

  • 1Clarke E M,Grumberg O,Peled D.Model checking[M].Cambridge,Massachusetts:MIT Press,1999:61-87.
  • 2林惠民,张文辉.模型检测:理论、方法与应用[J].电子学报,2002,30(12A):1907-1912. 被引量:163
  • 3Ammann P,Black P,Majurski W.Using model checking to generate tests from specifications[C]//Proceedings of the Second IEEE International Conference on Formal Engineering Methods.Brisbane,Queensland,Australia,1998:46-54.
  • 4Gargantini A,Heitmeyer C.Using model checking to generate tests from requirements specifications[C]//Proceedings of the 7th European Engineering Conference Held Jointly with the 7th ACM SIGSOFT International Symposium on Foundations of Software Engineering.Toulouse,FR,1999:146-162.
  • 5Rayadurgam S,Heimdahl M P.Coverage based test case generation using model checkers[C]//Proceedings of the 8th Annual IEEE International Conference and Workshop on the Engineering of Computer Based Systems.Washington,USA,2001:83-91.
  • 6Hong H S,Lee I,Sokolsky O,et al.A temporal logic based theory of test coverage and generation[C]//Proceedings of the International Conference on Tools and Algorithms for Construction and Analysis of Systems.Grenoble,FR,2002:327-341.
  • 7Kung D C,Suchak N,Gao J,et al.On object state testing[C]//Proceedings of the 19th International Computer Software and Applications Conference.Taipei,1994:222-227.
  • 8Clarke L.Symstra:a system to generate test data and symbolically execute programs[J].IEEE Transactions on Software Engineering,1976,2(3):215-222.
  • 9Xie T,Marinov D,Schulte W,et al.A framework for generating object-oriented unit tests using symbolic execution[C]//Proceedings of 11th International Conference on Tools and Algorithms for the Construction and Analysis of Systems.Edinburgh,UK,2005:365-381.
  • 10Visser W,Pasareanu C S,Khurshid S.Test input generation with java PathFinder[C]//Proceedings of 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis.Boston,MA,USA,2004:97-107.

二级参考文献11

  • 1[1]Chen T Y,Lau M F. A new heuristic for test suite reduction.Information and Software Technology, 1998, 40(5/6) : 347~354
  • 2[2]Chen T Y, Lau M F. A simulation study on some heuristics for test suite reduction. Information and Software Technology,1998, 40(13): 777~787
  • 3[3]Lee J G, Chung C G. An optimal representative set selection method. Information and Software Technology, 2000, 42 (1):17~25
  • 4[4]Chen T Y,Lau M F. Dividing strategies for the optimization of a test suite. Information Processing Letters, 1996, 60(3): 135~141
  • 5[5]Johnson D S. Approximation algorithms for combinatorial problems. Journal of Computer and System Sciences, 1974, 9(3): 256~278
  • 6[6]Harrold M J,Gupta R,Soffa M L. A methodology for controlling the size of a test suite. ACM Transactions on Software Engineering and Methodology, 1993, 2(3): 270~285
  • 7[7]Chen T Y,Lau M F. Heuristics towards the optimization of the size of a test suite. In: Proceedings of the 3rd International Conference on Software Quality Management, Seville, Espagne, 1995, 2:415~424
  • 8[8]Jones J A, Harrold M J. Test-suite reduction and prioritization for modified condition/decision coverage. In: Proceedings of ICSM'01, Florence, Italy, 2001, 11:92~102
  • 9[9]Wong W E, Horgan J R, London S et al. Effect of test set minimization on fault detection effectiveness. In: Proceeding of the 17th International Conference on Software Engineering, Seattle, Washington DC, 1995. 41~50
  • 10[10]Wong W E, Horgan J R,Mathur A P et al. Test set size minimization and fault detection effectiveness: A case study in a space application. In: Proceeding of the 21st Annual International Computer Software and Application Conference of COMPSAC 97, Washington DC, 1997. 522~528

共引文献218

同被引文献86

引证文献7

二级引证文献5

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部