• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 论文 • 上一篇    下一篇

Android智能电视测试用例生成方法及应用研究

崔凯,周宽久,梁浩然,潘杰   

  1. (大连理工大学软件学院,辽宁 大连 116620)
  • 收稿日期:2016-04-18 修回日期:2016-06-15 出版日期:2016-08-25 发布日期:2016-08-25

A method for generating test cases and its application for Android smart TV    

CUI Kai,ZHOU Kuan-jiu,LIANG Hao-ran,PAN Jie   

  1. (School of Software Technology,Dalian University of Technology,Dalian 116620,China)
  • Received:2016-04-18 Revised:2016-06-15 Online:2016-08-25 Published:2016-08-25

摘要:

相比传统电视,由于增加上网浏览、音视频文件播放、下载各种应用软件等多种功能,智能电视系统软硬件变得异常复杂,用户使用相对繁琐,这种大批量消费类产品的可靠性是目前智能电视厂家面临的主要问题。提出根据系统设计规格书对智能电视的操作行为采用AutoStar进行层次化状态迁移矩阵(STM)建模,进而转化为具有记忆功能的正则表达式,同时根据正则表达式圈复杂度来递归确定正则表达式中包含所有闭包循环的次数,并生成测试用例,自动转成Python脚本,通过Android提供的ADB接口发送给Android智能电视,最后设计实现Android智能电视测试平台,该平台应用于国内智能电视的测试。

关键词: 状态迁移矩阵, 圈复杂度, 正则表达式

Abstract:

Compared with the traditional TV, a smart TV has diverse functions such as Internet surfing, audio and video files playing, and applications downloading. So the software and hardware of the smart TV become very complicated and are relatively hard for users to operate. The reliability of such a large scale of consumer oriented products is the main problem that smart TV manufacturers are facing. We model the behaviors of the smart TV with AutoStar by hierarchical state transition matrix (STM), which are converted into an expanded regular expression (ERE) with memory property. The cyclic number of regular expression closures is set according to the cyclomatic complexity of the regular expression, and then the test cases are generated from the ERE. The test cases are converted to Python scripts automatically and sent to the Android smart TV through the ADB interface. Finally, a test platform for the Android smart TV is designed and applied in smart TV tests in domestic house-hold electrical appliance plant.

Key words: state transition matrix, cyclomatic complexity, regular expression