自动化测试脚本产生及使用方法技术

技术编号:4173305 阅读:199 留言:0更新日期:2012-04-11 18:40
本发明专利技术揭示一种自动化测试脚本产生及使用方法,该自动化测试脚本产生方法在三大模块中实现的,该产生方法包括:产生调用函数关系;设计出相应的测试用例;获取上述调用函数关系和测试用例;从底层函数开始遍历直到将顶层函数包含出来;提取当前所遍历到的函数组写入一个空的脚本并在该脚本里写入一个入口函数;在入口函数开口部分插入一段代码,用于读取用例;在入口函数结尾部分插入一段代码,用于输出测试结果,最后产生脚本并运行该脚本。借助该自动化测试脚本产生及使用方法不会因为操作人员的技术水准高低而影响测试的效果,提高了用例执行的可靠性和回归测试的一致性,同时也配合提高了测试覆盖率。

Automatic test script generation and use method

The invention discloses a method for generating and using automated test scripts and methods implemented in three modules in the automated test script generation, including the production methods: call function; design the corresponding test cases; get the call function and test case; traversal until the top-level function contains out from the bottom function the traversal function group; extraction to write a free script and write a script in the entrance function; in the entrance opening part function insert a code for reading the case; in the entrance end of the function part insert a code for the output test results, finally produced the script and the script is run. With the help of the automated test scripts and use method does not influence the test results because of the operator's technical level, improve the reliability of regression test case execution and consistency, but also with the increase of test coverage.

【技术实现步骤摘要】

【技术保护点】
一种自动化测试脚本产生的方法,该自动化测试脚本产生的方法在三大模块中实现的,其特征在于,该自动化测试脚本产生的方法步骤包括: (1)代码解析模块产生调用函数关系并输入给脚本产生模块; (2)用例设计模块设计出相应的测试用例并作为 输入给脚本产生模块; (3)脚本产生模块获取上述调用函数关系和测试用例; (4)从底层函数开始遍历直到将顶层函数包含出来; (5)提取当前所遍历到的函数组写入一个空的脚本并在该脚本里写入一个入口函数; (6)在入口函 数开口部分插入一段代码,用于读取用例; (7)在入口函数结尾部分插入一段代码,用于输出测试结果,最后产生脚本。

【技术特征摘要】

【专利技术属性】
技术研发人员:杨柳高敏齐武
申请(专利权)人:环达电脑上海有限公司成都宇达电通有限公司
类型:发明
国别省市:31[中国|上海]

网友询问留言 已有0条评论
  • 还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。

1