[1]罗正军,金旭东,张丽丽.基于图像匹配的 Web UI 自动测试方法研究[J].计算机技术与发展,2022,32(10):65-69.[doi:10. 3969 / j. issn. 1673-629X. 2022. 10. 011]
 LUO Zheng-jun,JIN Xu-dong,ZHANG Li-li.Research on Web UI Automated Testing Method Based on Image Matching[J].,2022,32(10):65-69.[doi:10. 3969 / j. issn. 1673-629X. 2022. 10. 011]
点击复制

基于图像匹配的 Web UI 自动测试方法研究()

《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]

卷:
32
期数:
2022年10期
页码:
65-69
栏目:
软件技术与工程
出版日期:
2022-10-10

文章信息/Info

Title:
Research on Web UI Automated Testing Method Based on Image Matching
文章编号:
1673-629X(2022)10-0065-05
作者:
罗正军金旭东张丽丽
南京航空航天大学,江苏 南京 211106
Author(s):
LUO Zheng-junJIN Xu-dongZHANG Li-li
Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China
关键词:
Web UI自动化测试图像匹配SURFSSDA
Keywords:
Web UIautomation testimage machiningSURFSSDA
分类号:
TP391. 4
DOI:
10. 3969 / j. issn. 1673-629X. 2022. 10. 011
摘要:
传统的 Web UI 自动化测试以底层调用为基础,其测试方法如文本验证法、页面元素验证法和窗口变化验证法等,存在着图片、动态元素和元素样式无法测试和测试结果不够全面等问题,代码迁移成本高,用例覆盖度低。 图像匹配技术可以有效避开网页底层结构设计,以用户视角进行 UI 测试。 该文将图像匹配技术引入 Web UI 自动化测试进行方法研究,测试 Web UI 是否存在元素样式错乱和内容显示错误等现象。 使用了基于特征点匹配的改进型 SURF( Speeded UpRobust Features,加速鲁棒特性) 算法作为方法设计验证主体,并结合了 RANSAC( Random Sample Consensus,随机采样一致)算法优化特征点对,降低 SURF 算法中误差匹配和错误匹配的发生概率。 在此基础上还利用了基于模板匹配的 SSDA(Sequential Similarity Detection Algorithm,序贯相似性检测算法) 完成误匹配图片集的辅助验证。 在实验中,验证了所设计的图像匹配综合测试方法在 Web UI 自动化测试中的有效性,并且与传统方法相比具有一定的优势。
Abstract:
Traditional Web UI automated testing is based on low - level call. Testing methods include text verification, page element verification and window change verification. There are problems such as inability to test pictures,dynamic elements and element styles,and insufficient test results. The code migration cost is high,and the use case coverage is low. However,image matching technology can avoid the design of the underlying structure of Web pages and conduct UI testing from the perspective of users. In this paper,image matching technology is introduced into Web UI automation testing method research,testing whether there are elements style disorder and content display errors and other phenomena. SURF ( Speeded Up Robust Features) based on feature point matching is used as the main body of method design and verification, and RANSAC ( Random Sample Consensus) is combined to optimize feature point pairs to reduce the probability of error matching and error matching in SURF. On this basis, the SSDA ( Sequential Similarity Detection Algorithm) based on template matching is used to complete the auxiliary verification of mismatched image sets. In the experiment,the effectiveness of the proposed integrated test method for image matching in Web UI automation test is verified,and it has certain advantages compared with the traditional method.

相似文献/References:

[1]郝晓晓 张卫丰.基于XML的SDK自动化测试框架的设计与实现[J].计算机技术与发展,2010,(04):101.
 HAO Xiao-xiao,ZHANG Wei-feng.Design and Implementation of Automatic SDK Test Framework Based on XML[J].,2010,(10):101.
[2]李龙澍 刘磊.基于AutoIt和Flow Chart的测试用例生成与管理[J].计算机技术与发展,2010,(07):56.
 LI Long-shu,LIU Lei.Generation and Management of Test Case Based on AutoIt and Flow Chart[J].,2010,(10):56.
[3]杨萍 李杰.利用LoadRunner实现Web负载测试的自动化[J].计算机技术与发展,2007,(01):242.
 YANG Ping,LI Jie.Using LoadRunner to Test Web's Load Automatically[J].,2007,(10):242.
[4]贺斌 曾红卫 冯振华.WEB应用测试执行引擎的设计与实现[J].计算机技术与发展,2011,(06):28.
 HE Bin,ZENG Hong-wei,FENG Zhen-hua.Design and Implementation of Execution Engine for Web Application Testing[J].,2011,(10):28.
[5]郑蓓蓓 黄晓霞 刘蔚.基于LUA脚本的无线模块自动化测试[J].计算机技术与发展,2011,(10):197.
 ZHENG Bei-bei,HUANG Xiao-xia,LIU Wei.Automatic Test of RF Wireless Module Based on LUA-Script[J].,2011,(10):197.
[6]管小娟,周诚,钱炫宇,等.基于关键字驱动的自动化测试研究与应用[J].计算机技术与发展,2014,24(02):153.
 GUAN Xiao-juan,ZHOU Cheng,QIAN Xuan-yu,et al.Research and Application of Automation Testing Based on Keyword-driven[J].,2014,24(10):153.
[7]徐嫣,卢敬德.Watir自规范测试框架在一体化项目测试中的应用[J].计算机技术与发展,2014,24(03):238.
 XU Yan,LU Jing-de.Application of Watir Automation Test Framework in Integration Project Test[J].,2014,24(10):238.
[8]胡继东,鞠炜刚. 基于领域驱动的自动化测试框架研究与应用[J].计算机技术与发展,2016,26(04):162.
 HU Ji-dong,JU Wei-gang. Research and Application of Automation Testing Framework Based on Field-driven[J].,2016,26(10):162.
[9]陈春玲,李雯雯,余 瀚.嵌入式语音识别系统的测试方法研究[J].计算机技术与发展,2019,29(07):108.[doi:10. 3969 / j. issn. 1673-629X. 2019. 07. 022]
 CHEN Chun-ling,LI Wen-wen,YU Han.Research on Test Methods of Embedded Speech Recognition System[J].,2019,29(10):108.[doi:10. 3969 / j. issn. 1673-629X. 2019. 07. 022]
[10]姜 文,刘立康.自动化测试用例测试失败类型分析[J].计算机技术与发展,2020,30(04):8.[doi:10. 3969 / j. issn. 1673-629X. 2020. 04. 002]
 JIANG Wen,LIU Li-kang.Testing Failure Type Analysis of Automation Test Case[J].,2020,30(10):8.[doi:10. 3969 / j. issn. 1673-629X. 2020. 04. 002]

更新日期/Last Update: 2022-10-10