欢迎访问铁路通信信号工程技术,今天是 English

铁路通信信号工程技术 ›› 2022, Vol. 19 ›› Issue (11): 32-36.DOI: 10.3969/j.issn.1673-4440.2022.11.007

• • 上一篇    下一篇

基于模型的联锁软件测试用例生成方法

彭丽维1,宋鹏飞2,江雪莹2,谢 林1   

  1. 1.卡斯柯信号(成都)有限公司,成都 610083;
    2.卡斯柯信号有限公司,上海 200071
  • 收稿日期:2021-07-29 修回日期:2022-09-28 出版日期:2022-11-25 发布日期:2022-11-25
  • 作者简介:彭丽维(1994—),女,工程师,硕士,主要研究方向:计算机联锁,邮箱: 1251192854@qq.com
  • 基金资助:
    卡斯柯信号有限公司iLOCK完善及维护项目(RA.11119002)

Model-based Test Case Generating Method of Interlocking Software

Peng Liwei1,  Song Pengfei2,  Jiang Xueying2,  Xie Lin1   

  1. 1. Casco Signal (Chengdu) Co. Ltd., Chengdu    610083, China;  
    2. Casco Signal Ltd., Shanghai    200071, China
  • Received:2021-07-29 Revised:2022-09-28 Online:2022-11-25 Published:2022-11-25

摘要: 联锁软件测试是保证联锁安全的重要手段之一,为解决联锁软件测试通用性不强,人工消耗过大的问题,提出一种通用联锁软件测试用例生成方法。结合计算机联锁技术条件、分析软件的功能需求将其转化为工具可识别的状态对象,并对识别的状态进行划分,形成若干四元组合,生成联锁状态转换的树形网状结构。通过对建立的树形网状结构解析,得到结构中若干四元组合的源状态、联锁条件和目标状态,生成抽象的测试用例,并根据预先写好定义的输入对每一组抽象用例进行反推,最后生成一系列的具体可执行的测试用例。该方法生成的用例可覆盖已知场景的所有联锁测试功能,减少人工编写用例时间,同时减少人为因素导致用例出错的概率,提高测试可靠性。

关键词: 模型, 树形网状结构, 状态转换, 测试用例

Abstract: Interlocking software test is one of the important means to ensure interlocking safety. In order to solve the problems of low generality and high labor cost of interlocking software test, a method of general-purpose interlocking software test case generation was proposed. This paper analyzes the problems of traditional test methods and proposes a test case generation method of general interlocking software. Combined with the technical specifications for computer based interlocking and the functional requirements of the software, it is transformed into the state object that can be identified by tools, and the identified states are divided to form several quaternion combinations to generate the tree network structure of interlocking state transition. Through the analysis of the established tree network structure, the interlocking condition and target state of several quaternion combinations in the structure are obtained and the abstract test cases are generated, and each group of abstract test cases are deduced according to the pre-defined input to generate a series of concrete test cases. The cases generated using this method can cover all the interlocking test functions in known scenarios, reduce the time of manual writing of cases, reduce the probability of errors caused by human factors, and improve the test reliability.

Key words: model, tree network structure, state transition, test case

中图分类号: