摘要
软件测试是保证Web服务质量的重要技术手段.测试数据生成是Web服务测试的重要内容.测试数据的质量将直接影响Web服务测试的效率和成本.文章基于合约式设计的 Web服务测试技术,提出一种 Web服务的测试数据自动生成方法.首先根据WSDL文档采用随机法自动生成初始测试数据,然后使用合约变异技术进行测试数据的选择,据此可以生成一组达到一定合约变异充分度的有效测试数据,从而提高 Web服务的测试质量和效率.最后实现了一个Web服务的测试数据自动生成工具原型,并通过实验验证了方法的有效性.
Software testing is one of the most important techniques used to assure the quality of Web Services at present. Test data generation is an important topic in Web Services testing. The quality of test data will influence the efficiency and cost during Web Services testing. Based on the design by contract testing technology for Web Services, this paper presents a method of automated test data generation for Web Services. Firstly, according to the description information and contracts in WSDL document of Web Services, the initial test data are generated automatically by random method. Then the test data are selected by means of contract mutation testing. The algorithms about initial test data generation and test data selection are presented. In order to improve the quality and efficiency of Web Services testing, this method can generate a test suite meeting a certain contract mutation score. Finally, a prototype has been developed on the Microsoft. NET platform. For the same Web Service with different contracts, the experiments are carried out on this prototype. The contract mutation score of generated test data is compared with the statement coverage score and condition coverage score. The results have shown that the method is effective in automated test data generation for Web Services.
出处
《计算机学报》
EI
CSCD
北大核心
2005年第4期568-577,共10页
Chinese Journal of Computers
基金
国家自然科学基金(60373003)
国家"九七三"重点基础研究发展规划项目基金(2002CB312003)
国家"八六三"高技术研究发展计划项目基金(2004AA112070)资助.
关键词
WEB服务
软件测试
测试数据生成
合约
变异测试
Web service
software testing
test data generation
contract
mutation testing