Currently reuse rate of "capture / playback "test for Web Application is not high, and the method of texting test scripts for it needs testers to have a higher capacity of programming. To solve this issue, a design of auto test framework and a set of "private language" for this framework based on Selenium are proposed-a kind of open-source Web application auto test tools, this kind of "private language" is a set of parsing rules for XML data-driven files. At last, this Web application auto test framework has been implemented. Data-driven file describes multi-request/response model of Web application behavior, it clearly defines outer test data in order to avoid "hard-code". Using this framework, testers develop test projects only by texting XML data-driven files, it has reduced the requirements for test as well as advanced test efficiency.%Web应用“捕捉/回放”式测试复用率不高,而编写测试脚本的测试方法对测试人员的程序设计能力又有较高要求.针对这个问题,根据Web应用的特性提出了一套自动化测试框架的设计,并基于开源Web自动化测试工具Selenium为此框架设计了一套“私有语言”,即基于XML的数据驱动文件的解析规则.最后实现了基于此数据驱动文件的Web自动化测试框架.数据驱动文件描述了Web应用行为的多请求/响应的模型,清晰地定义了外部测试数据以避免数据“硬编码”的缺陷.利用此框架,测试人员仅仅通过编写XML数据驱动文件就能进行测试工程的开发,有效降低测试门槛,提高测试效率.
展开▼