节点文献

Wi-Fi芯片自动化测试系统的设计与实现

A Method of Design and Implementation of Wi-Fi Chip Automation Test System

【作者】 刘冰

【导师】 姜丽红; 黄忠华;

【作者基本信息】 上海交通大学 , 软件工程(专业学位), 2016, 硕士

【摘要】 目前Wi-Fi自动化测试,对Wi-Fi芯片厂商变得越来越重要。测试内容主要包括以下几个方面:协议一致性测试、备互操作性测试(Inter-Operability Test,IOT)和客户特殊需求的测试。芯片厂商研发出的芯片不仅仅要通过Wi-Fi联盟(Wi-Fi Alliance,WFA)的互操作性认证测试,还要满足客户的不同需求。面对客户的特殊需求,必须向芯片做相应的设置,这是目前流行的自动化测试工具无法做到的;再者,纯人工测试会花费很多资源,因此很有必要为Wi-Fi芯片厂商开发一套自动化测试系统。但是传统的Wi-Fi自动化测试系统存在灵活性差和维护性难的问题。一方面,Wi-Fi测试用例的修改可能会导致测试脚本的修改,因为测试脚本对测试用例依赖性较强,进而导致测试系统灵活性差,因此对于不会编程的测试人员来说,可能会阻碍测试进程。另一方面,由于Wi-Fi测试用例数量较多,对应的测试脚本数量庞大,存在难以维护的问题。本文从Wi-Fi实际测试现状出发,分析了传统的Wi-Fi自动化测试中的主要问题,针对如何描述测试用例做了深入的研究,提出一种基于XML封装关键字的测试用例描述方法,设计了基于关键字驱动的Wi-Fi自动化测试系统。本文提出的测试用例描述方法为测试人员修改测试用例提供了便利。同时,本文所设计的Wi-Fi自动化测试系统通过解析XML描述的测试用例,抽取其中的关键字,结合关键字集合中的具体实现步骤,完成了对测试过程的导航。本文实现了测试用例与测试代码的分离,增加了测试系统的灵活性,提高了测试系统的易维护性。主要研究工作如下:1.Wi-Fi自动化测试系统的需求与总体设计本文首先分析了传统的Wi-Fi自动化测试系统存在灵活性差和难以维护的问题,在明确自动化测试系统需求的基础上,设计了测试系统的总体架构。采用分层设计方式使得测试逻辑和测试数据分离,该架构分为数据源层、测试用例解析层、测试用例执行层和测试设备通讯控制层。结合使用UML中的系统活动图明确自动化测试业务流程。本文所设计的Wi-Fi自动化测试系统包括以下几个重要模块:测试设备通讯控制模块,测试用例解析模块,测试用例执行模块和Log解析模块。2.Wi-Fi测试用例的描述和测试执行引擎的设计本文分析了Wi-Fi的测试用例,结合IEEE 802.11协议,抽取测试用例中的关键字,构建了描述Wi-Fi测试用例的关键字集合,提出了基于XML封装关键字的方法来描述测试用例。本文设计了一个测试执行控制引擎,它根据测试用例中的配置参数、测试数据、测试条件和测试步骤,结合关键字库实现的具体操作完成对测试用例的执行。另外,本文使用多线程技术实现测试用例中多任务的并发执行,测试Log的抓取和对被测试设备的状态监控。3.测试设备通用控制接口的设计考虑到测试环境中测试设备种类繁多,测试系统利用Telnet、UDP Socket和可编程的USB接口等多种通讯机制实现对测试环境中各个测试设备的控制。本文按照测试设备的类别划分,把同一类别的测试对象封装成统一的控制接口,一者是为了方便测试脚本完成对测试设备的参数设置和数据交互;二者,当测试设备改变时,仍然可以使用同样的控制接口,提高了自动化测试系统的适应性。4.Wi-Fi自动化测试系统的实现与验证本文实现了关键字集合中的所有关键字对应的具体操作,构建了关键字库集,根据测试用例描述规则和关键字驱动技术实现测试用例解析器与测试执行控制器,完成了对测试用例的执行。同时,本文根据测试标准,结合测试用例定义的检查点,采用Perl正则表达式关键字匹配的方法对测试Log做进一步分析,使用Wireshark对无线数据包做协议一致性分析,从而验证测试结果。另外,本文所设计的自动化测试系统完整地记录了每个测试步骤的信息,通过追踪详细的测试步骤,验证了Wi-Fi自动化测试系统的行为与测试用例期望的行为的一致性。本文通过测试用例XML描述方法和关键字驱动技术的应用,设计并实现了Wi-Fi自动化测试系统,在提高测试效率的同时,也解决了测试用例和测试脚本依赖性强的问题,起到了提高自动化测试系统的灵活性和易维护性的作用。

【Abstract】 Recently,Wi-Fi automation test becomes more and more important for Wi-Fi chip manufactures.The main test area includes protocol conformance testing,inter-operability test(IOT),and test for customer specific requirements.The Wi-Fi chip shall pass WFA(Wi-Fi Alliance)inter-operability certification test and also meet the different needs of customers.In order to handle special needs of customers,testers must make the appropriate settings to the chip,which is some popular automation test tools cannot do.Furthermore,manual test costs lots of effort and resources,so it is necessary to develop a Wi-Fi automation test system for Wi-Fi chip makers.But there are some issues of traditional automation test system,such as poor flexibility and difficult maintenance.The first issue is,the modification of Wi-Fi test case may result in the test scripts’ modification,because the test scripts have high dependence on test cases,which will cause test system to poor flexibility,and finally blocks test procedure for those testers who don’t have any programming experience.Another issue is traditional test system has poor maintenance,that is because of lots of Wi-Fi test cases and mapping huge test scripts.In this paper,we analyze the main problems during Wi-Fi testing,and do research on how to describe test cases that presented by XML of embedding defined keywords.Finally,we design a Wi-Fi automation test system based on keyword driven technology.This paper presents a test case description method for testers to modify test cases.At the same time,the Wi-Fi automation test system analysis of the XML test case extract the keywords and complete the navigation of the testing process.This paper separates test scripts and test cases,and also increases the flexibility and maintenance of the automation test syste m.The main work of this paper as followings:1.The design of architecture of Wi-Fi automation test system.By analyzing the main issues of traditional automation test,we design the overall architecture of the automation test system.The architecture is divided into data source layer,test case analysis layer,test case execution layer and test device communication control layer.We use activity diagram of UML to define the business of automation test.The designed Wi-Fi automation test system includes the following important modules: test equipment communication control module,test case parser module,test case execution module and Log analysis module.2.Wi-Fi test case description and test execution engine design.In this paper,we analyze Wi-Fi test cases,refer IEEE 802.11 protocols,extract the keywords in test cases,construct the keyword library for description test cases,and propose a method based on XML to describe Wi-F test cases.We also design a test case execution engine to finish test execution by parser test case’s configurations.In addition,this paper uses multi-thread technology to realize multiple tasks execution,log capture and monitor the state of the test devices.3.The design of test device control interface.Considering that there’re lots of test devices,the automation test system may use Telnet,UDP socket and programmable USB interface to control each test devices.In this paper,we encapsulate each test objects into unified control interface,which is designed to facilitate the test scripts to complete the settings and data interaction with test equipment.The second advantage is that test automation system can use the same control interface without any modification of test codes.It will improve the adaptability of the automation test system.4.Implementation of Wi-Fi automation test system and verification.In this paper,we implement all the keyword functions,build the keyword library,and parse test cases according to the description method.Finally,we finish automation test system based on keyword-driven technology.Meanwhile,according to protocols,the paper uses Perl regular expression to analyze driver and firmware logs,and uses Wireshark to do protocol conformance analysis.In addition,the automation test system can record the information of each test steps,and verify the consistency of the behavior of the Wi-Fi test system and test case’s requirements.In this paper,we design and implement the Wi-Fi automation test system,which is based on the designed test case XML description method and Keyword-Driven technology.And it also solves the problem of test case and test script dependence.It plays a role in improving the flexibility and maintainability.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络