Computer Engineering and Applications ›› 2016, Vol. 52 ›› Issue (13): 43-47.

Previous Articles     Next Articles

Research on automated testing of mobile applications based on image matching

LI Xinyu, HOU Chunping, WANG Baoliang, NING Guojin, YU Kuixing   

  1. School of Electronic and Information Engineering, Tianjin University, Tianjin 300072, China
  • Online:2016-07-01 Published:2016-07-15

基于图像匹配的移动应用自动化测试方法研究

李昕宇,侯春萍,王宝亮,宁国津,于奎星   

  1. 天津大学 电子信息工程学院,天津 300072

Abstract: Massive mobile?applications have?made the research of?testing technology?for mobile applications becoming a focus. The realization of automation test of mobile software can save time and manpower. An automation testing method based on the screenshot annotation and image matching is proposed. Taking the limited resolution and restricted details of the mobile phone screen into account and considering the characteristics of the mobile phone interface, such as images, text areas, lists, grids and so on, SURF feature points matching, RANSAC algorithm optimization and projection transformation can be used to compare a phone interface screenshot and the reference automatically. Experiments show that this method is 1.69 times faster than SIFT, and 2.01 times faster than manual work, and it can check out 106 UI bugs out of 109 found by manual work, which is 1.71 times more accurate than SURF before optimization.

Key words: mobile application testing, testing automation, image matching, Speeded Up Robust Feature(SURF), RANSAC algorithm

摘要: 海量的移动应用使得面向移动应用的测试技术研究成为当前的研究热点,通过基于手机截图的移动应用软件自动化测试,可以节省大量的时间和人力,以此为背景提出了一种基于图像匹配和手机截屏区域标注的自动化测试方法。主要考虑到手机界面分辨率和显示细节有限的特点,并根据移动应用在移动终端中UI中的图像、文字、列表、网格等各种区域显示的特点,通过SURF特征点匹配、RANSAC算法优化和投影变换,以及区域树优化,实现移动应用的UI截图与基准截图的自动匹配和对比。实验结果证明通过采用设计的自动化测试方法,单进程运行的效率是采用SIFT算法的1.69倍,是手工的2.01倍;能检测出人工检测发现的109个界面显示问题中的106个,准确率是未经优化前的1.71倍。

关键词: 手机应用测试, 自动化测试, 图像匹配, 快速鲁棒性特征(SURF), RANSAC算法