| 本文已被:浏览 2869次 下载 5689次 |
 码上扫一扫! |
|
|
| CPN建模与on-the-fly方法相结合的测试用例生成 |
|
张玉荣1, 李华1,2, 邢熠1, 王显荣1, 阮宏玮1,2, 张素梅1
|
|
1.内蒙古大学 计算机学院, 内蒙古 呼和浩特 010021;2.内蒙古大学 网络信息中心, 内蒙古 呼和浩特 010021
|
|
| 摘要: |
| 在对复杂的软件系统进行测试时,生成的系统状态空间可能会非常庞大.为了避免对整个状态空间进行遍历,提出将on-the-fly方法与CPN形式化建模方法结合起来,用于生成测试例.在这种方法中,无需对整个状态空间进行遍历,只是仅对测试人员感兴趣的部分状态空间进行针对性的测试.首先,给出CPN和扩展可达图的定义,介绍了on-the-fly测试方法中涉及的相关概念,包括系统规约、测试目的、同步乘积和测试例等.然后,实现了同步乘积算法,并设计相关测试例对其进行了测试.最后,选定一个被测系统示例CPN建模与on-the-fly结合的方法,并通过适配器实现与被测系统的交互,生成和执行测试例,由此验证了方法的可行性和有效性. |
| 关键词: on-the-fly测试 CPN层次模型 扩展可达图 同步乘积 测试例 |
| DOI:10.13328/j.cnki.jos.005145 |
| 分类号: |
| 基金项目:国家自然科学基金(61163011,61262082);内蒙古自治区自然科学基金(2015MS0612);内蒙古自治区高校科学技术研究项目(NJZY010);赛尔创新项目(NGII20150112) |
|
| Test Case Generation Based on the Combination of CPN Modeling and On-the-Fly Method |
|
ZHANG Yu-Rong1, LI Hua1,2, XING Yi1, WANG Xian-Rong1, RUAN Hong-Wei1,2, ZHANG Su-Mei1
|
|
1.College of Computer Science, Inner Mongolia University, Hohhot 010021, China;2.Centre of Network and Information, Inner Mongolia University, Hohhot 010021, China
|
| Abstract: |
| The generated system state space can be very large when a complex software system is tested.In order to avoid the unnecessary traversing of the entire state space, a new method is presented based on the combination of CPN modeling and on-the-fly method to generate test cases.During such a process, only part of the state space is traversed according to the tester's personnel interest.Firstly, both the definitions of CPN and the extended reachability graph are introduced, and the related concepts relating to the on-the-fly testing method, including system specification, test purpose, synchronous product and test cases, are introduced.Secondly, a synchronous product algorithm is implemented, and the test cases are designed to test the algorithm as well.Finally, an implementation under test is selected to sample the combination method of CPN modeling and on-the-fly method.The interactions between the tester and the implementation under test are realized through an adapter, and the test cases are generated and executed simultaneously.Thus the feasibility and the effectiveness of the proposed method are verified. |
| Key words: on-the-fly testing CPN hierarchy modeling extended reachability graph synchronous product test case |