摘要
传统的对应用程序编程接口的测试需要编写测试驱动程序驱动被测API,然后编译驱动程序,接着执行驱动程序,最后要对测试运行结果做分析。过程繁琐而且对测试人员的编码能力要求较高。文中利用关键字驱动的思想,将测试脚本中变化的逻辑和数据部分从测试脚本中分离出来,放到单独的测试数据表格中。实现了一种对Java的应用程序编程接口进行自动测试的框架JAPITest。该框架实现了API的自动提取、关键字的自动生成、测试用例管理和执行环节的自动化,具有测试脚本的可重用性高、测试逻辑清晰、测试用例维护方便等特点。
The traditional API testing need to write code to drive measured API,compile the driver program,then execute the driver,the last is to do analysis on the test results.The process is trivial and tester requires higher code ability.In order to solve the problem,this paper proposes an automatic test framework(JAPITest).Based on the keyword-driven automation theory,the framework separate test logic and data from test scripts.An example illustrated superiorities of the framework.The framework reduced the scale of test scripts.The test logic is clearer,and the test cases maintenance is more convenient.Key words: keyword-driven;API test;test automation;Java testing;framework
出处
《计算机技术与发展》
2011年第8期42-45,共4页
Computer Technology and Development
基金
山西省自然科学基金资助项目(2009011022-1)