计算机科学与探索 ›› 2019, Vol. 13 ›› Issue (11): 1839-1851.DOI: 10.3778/j.issn.1673-9418.1812004

• 系统软件与软件工程 • 上一篇    下一篇

Web应用程序搜索功能的组合测试

吕成成,张龙,邓茜,曾凡平,严俊,张健   

  1. 1.中国科学技术大学 计算机科学与技术系,合肥 230026
    2.中国科学院 软件研究所 计算机科学国家重点实验室,北京 100190
    3.安徽省计算与通讯软件重点实验室,合肥 230026
  • 出版日期:2019-11-01 发布日期:2019-11-07

Combinatorial Testing of Search Function in Web Application

LV Chengcheng, ZHANG Long, DENG Xi, ZENG Fanping, YAN Jun,ZHANG Jian   

  1. 1.Department of Computer Science and Technology, University of Science and Technology of China, Hefei 230026, China
    2.State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China
    3.Key Lab of Computing and Communication Software of Anhui Province, Hefei 230026, China
  • Online:2019-11-01 Published:2019-11-07

摘要: 为了方便用户查询感兴趣的资源,许多Web应用程序会提供搜索功能。如果搜索功能存在故障,将会导致Web应用程序的功能异常,甚至会引发安全问题,因而需要对其进行充分的测试。可以使用组合测试的方法生成测试用例测试Web应用程序的搜索功能,其中每一个测试用例是由特殊字符组成的字符串。对于引起系统错误的测试用例,使用组合测试错误定位的方法找到系统错误是由哪些字符组合引起的。使用该方法对学校、政府和事业单位的96个网站进行了测试,发现其中23个网站在搜索某些特殊字符组合时,会引起服务器错误响应。错误定位结果表明,56%的服务器错误响应是由“%”“<”“’”“\”和其他字符的组合引起的。

关键词: Web测试, 组合测试, 错误定位

Abstract: In order to facilitate users to find resources of interest, many Web applications may provide search function. If there is a failure in the search function, the Web application will run abnormally and even security problems will be caused. So the search function needs to be fully tested. This paper uses the method of combinatorial testing to generate test cases to test the search function of Web application, where each test case is a string of special characters. For test cases that can cause server errors, this paper uses the method of fault location based on combinatorial testing to find the combinations of characters that can cause server errors. This paper tests 96 websites, including schools, governments and institutions, and it is found that 23 of these sites will meet a server error when searching for some special combinations of characters. The experimental result of fault location indicates that 56% of server errors are caused by the combinations of “%” “<” “’” “\” and other characters.

Key words: Web testing, combinatorial testing, fault location