摘要
为了提高黑盒自动化测试的人机交互便捷性以及测试用例的可维护性,文章设计了一种基于自然语言的脚本语言,通过设计用例模型和用例描述规则,实现使用自然语言作为用例脚本的描述语言并建立脚本解析机制,将自然语言描述的测试过程转化为计算机可以识别和执行的信息;基于所建立的用例模型,采用嵌套执行用例的方法,解决了功能模块相互影响导致测试结果不确定的问题。建立了一套用于机车安全设备的自动测试系统进行验证,结果表明,该方法能满足自然语言编写的测试脚本输入以及复杂耦合关联功能的测试要求。
In order to improve the convenience of human-computer interaction and the maintainability of test cases in black-box automated testing, a script language based on natural language was proposed in this paper. By designing the use-case model and the usecase description rules, use cases can be described with natural language, and the script parsing mechanism is established to transform the test process described by natural language into information that can be understood and execute by computer. In addition, based on the established use-case model, nested execution of use cases is used to solve the problem of uncertainty of test results caused by the interaction of functional modules. This method is validated by establishing an automatic test system for safety equipment of train, which satisfies the input of test scripts written in natural language and the test of complex coupling and correlation functions.
引文
[1]周经野,许筱婷,肖赤心.一种新的自然语言形式语义的计算方法[J].湘潭大学自然科学学报, 2010, 32(1):85-91.
[2]王立霞,淮晓永.基于语义的中文文本关键词提取算法[J].计算机工程, 2012, 38(1):1-4.
[3]陈锦富,卢炎生,谢晓东,等.一个组件安全自动化测试平台的设计与实现[J].计算机科学, 2008, 35(12):229-233.
[4]周经野,陈新伟.基于语义神经网络的汉语表层语义分析[J].计算机工程与科学, 2009, 31(8):1-3.
[5]马慧芳,王辉,丁毅.ARINC661服务器软件自动化测试的研究与实现[J].航空电子技术, 2014, 45(4):36-40.
[6]吕江花,马世龙,李先军,等.安全苛刻系统自动化测试的形式化语义模型[J].软件学报, 2014, 25(3):489-505.
[7]薛丰.计算机联锁自动测试系统研究与设计[D].成都:西南交通大学, 2017.
[8]刘权.基于神经网络的自然语言语义表达及推理方法研究[D].合肥:中国科学技术大学, 2017.