Design and implementation of model repository testing based on metamodel and JUnit
-
摘要: 在模型驱动测试中,针对测试模型的存储测试问题,提出了单元素、单个测试元模型、组合测试元模型等测试覆盖准则,并通过实例化的方法生成了测试用例,讨论了测试结果的判定方法.在Eclipse平台上,借助于JUnit框架实现了模型存储测试.通过分析不同数量级的测试用例对执行效率的影响以及不同测试覆盖准则和相应的JUnit测试代码规模之间的关系,为测试元模型的设计与存储提供了实践指导,并表明JUnit框架可以用于基于元模型的测试.提出了一个基于JUnit和元模型的自动测试框架——JMetamodel,可以用于模型存储以及模型转换的测试.Abstract: To solve repository testing problem of test models in model driven testing, the single element, single test metamodel and combination of test metamodels coverage criteria were proposed. Test cases were generated by instantiation method and test verdict problem was discussed. The model repository testing project was implemented by JUnit framework on Eclipse platform. The effect of execution efficiency with different quantitative test cases and the relation of different test coverage criteria and corresponding JUnit test code scale were analyzed. Then practical instructions were given for test metamodel design and repository. The test results indicate that JUnit framework could be used to metamodel based testing. An automatic test framework-JMetamodel based on JUnit and metamodel was proposed which could be used for model repository and transformation testing.
-
Key words:
- JUnit /
- metamodel /
- test case generation /
- model driven testing /
- model repository
-
[1] Hawai IBM Haifa Research Laboratory. Model driven testing tools .AGEDIS 1999-20218.Release 4.0.0, 2003 [2] Yoonsik Cheon,Gary T Leavens. A simple and practical approach to unit testing:the JML and JUnitway Boris Magnusson. ECOOP 2002 Object-Oriented Programming, 16th European Conference. Spain:Springer-Verlag,2002:231-255 [3] Andrew Patterson,Michael Kolling,John Rosenberg.Introducing unit testing with blueJ Proceedings of the 8th Annual Conference on Innovation and Technology in Computer Science Education.Thessaloniki:ITiCSE,2003:11-15 [4] 余波,王树林,张大方.基于JUnit自动生成类测试案例框架的实现[J].计算机工程与应用,2006(1):89-91 Yu Bo, Wang Shulin, Zhang Dafang. The implementation of class test case framework automatically generated based on JUnit[J].Journal of the Computer Engineering and Application, 2006(1):89-91 (in Chinese) [5] Aidan Delaney,Thomas J, Naughton. Emulation of an unconventional model of computation in Java Proceedings of the Inaugural Conference on the Principles and Practice of Programming. Ireland: ACM International Conference Proceeding, 2002:1-6 [6] 谢煜涛, 左雪梅.用JFCunit对GUI 图形界面进行单元测试[J].中国测试技术,2005,31(3):78-80 Xie Yutao,Zuo Xuemei.How to use JFCunit to unit test[J]. Journal of China Measurement Technology,2005, 31(3):78-80(in Chinese) [7] 罗婧婷,赵轶群,郑小军.开放源Web 应用开发中的一种测试解决方案[J].计算机与现代化,2005(1):25-28 Luo Jingting,Zhao Yiqun,Zheng Xiaojun. Test solution for open2source web application development[J]. Computer and Modernization, 2005(1):25-28(in Chinese) [8] 何成万,余秋惠.用JUnit实现Java程序的自动测试[J].计算机应用, 2002, 22(3):93-94 He Chengwan, Yu Qiuhui. Automatically Java program testing by JUnit[J]. Journal of Computer Applications, 2002, 22(3):93-94(in Chinese) [9] Huang Chenghui, Chen Huoyan.A semi-automatic generator for unit testing code files based on JUnit IEEE International Conference on Systems, Man and Cybernetics. Hawaii:IEEE,2005:140-145 [10] Lin Yuehua, Zhang Jing, Gray Jeff. Model comparison:a key challenge for transformation testing and version control in model driven software development . Vancouver:Addison Wesley Press, 2004.http://www.softmetaware.com/oopsla2004/gray.pdf
点击查看大图
计量
- 文章访问数: 2546
- HTML全文浏览量: 172
- PDF下载量: 1044
- 被引次数: 0