投稿网址 http:www.VideoE.cn|《电视技术》第39 卷第5 期(总第458 期) 117 【本文献信息】沈杰,潘科,刘昕,等. 基于 Python 的智能家居自动化测试脚本设计及实现[J]. 电视技术,2015,39( 5) . 基于 Python 的智能家居自动化测试脚本设计及实现 沈 杰,潘 科,刘 昕,范雨晓 ( 工业和信息化部电信研究院西部分院( 重庆电信研究院) ,重庆 401336) 摘要:根据智能家居系统的特点和要求,详细介绍了所研发的自动化测试平台。在此平台基础上,通过 Python 脚本的设计,扩展了对智能家居业务的描述,设计了对测试脚本的架构方案,并且以门磁设备的测试用例为例,详细描述了脚本编写过程和方法及实现其功能的自动化测试。通过 Python 语法编写而成的测试方法,具有良好的描述能力,并且产生的测试方法易于维护,该方法对于开展智能家居自动化测试具有重要意义。 关键词:智能家居; 脚本设计; 自动化测试 中图分类号:TP391. 76 文献标志码:A DOI:10. 16280/j. videoe. 2015. 05. 029 Python Script Based on Smart Home Automatic Testing Design and Implementation SHEN Jie,PAN Ke,LIU Xin,FAN Yuxiao ( West Institute of CATR of MIIT( Chongqing Institute of Telecommunications) ,Chongqing 401336,China) Abstract: According to the characteristics of the smart home system and requirements,the development of smart home automation test platform is introduced. In this platform,it takes an example of door magnetic equipment,the Python script writing process and meth-ods is described in detail. Then,the function of automatic testing is implemented. The testing method which is programmed by Python has a good ability of description and easy to maintain,so it has great significance for implementing intelligent automated testing. Key words: smart home; script design; automated testing 利用脚本来描述测试用例,是具有标准语法、数据和指令的描述集合,在自动化测试过程中,通过脚本解释器来执行测试用例是一种非常有效的测试方法[1 -2]。在测试系统中引入脚本技术,测试需求使用面向测试的脚本语言来编写测试计划,描述一个或多个测试用例的执行,可以大大提高测试效率。测试人员根据被测系统要求,通过对各种资源进行配置,驱动被测系统运行,对输入输出接口进行结果判定。 1 智能家居自动化测试平台 1.1 测试原理 智

Logo

一站式 AI 云服务平台

更多推荐