基于嵌入式Linux专变采集终端单元测试方法的研究
发布时间:2018-01-26 20:11
本文关键词: 单元测试 代码审查 内存泄露 PC-Lint CppUnit 出处:《华北电力大学》2012年硕士论文 论文类型:学位论文
【摘要】:按照国家电网公司建设坚强智能电网的总体要求,业界正在大力进行用电信息采集系统建设。在用电信息采集系统中,专变采集终端是采集使用专用变压器的用户用电信息的设备,大多基于ARM9平台和嵌入式Linux操作系统开发而成。由于嵌入式系统软件的特性:运行环境资源紧缺、测试工具较少,目前国内针对这种嵌入式系统软件测试的系统测试开展研究较多,但是针对软件模块单元级别的测试研究还很少,因此对基于嵌入式Linux专变采集终端的单元测试方法的研究就很有必要。 本文结合实际工作中对专变采集终端单元测试方法的研究,总结论述了基于嵌入式linux软件的通用单元测试方法,具体内容是: (1)单元测试活动步骤,也分为4步:计划、设计、实现、执行; (2)单元测试活动包括详细设计阶段的文档评审、单元测试模型设计、单元测试用例设计,编码阶段的代码检视、动态执行测试; (3)代码检视可以借助相关工具进行规范性检查、资源越界检查、语法问题检查等,也可以针对代码修改进行走读; (4)单元测试必须输出相关文档,遵守测试验收规范 另外,本文根据工作需要,在借鉴了国内外已有的多种单元测试工具的基础上,探索研究了适用专变采集终端开发过程中单元测试活动的几种工具,并详细研究了工具的使用方法,为了推广并进行了应用创新,重点介绍了专变采集终端软件代码审查关注点,如何使用PC-Lint进行代码检查,如何使用CppUnit工具进行单元测试动态执行,如何使用Ccmalloc/Valgrind工具进行内存泄露检查。
[Abstract]:According to the overall requirements of the State Grid Company to build a strong smart grid, the industry is vigorously building a power information collection system. The special transformer acquisition terminal is a device for collecting the information of users using special transformers. Most of them are based on ARM9 platform and embedded Linux operating system. Because of the characteristic of embedded system software: the running environment resources are scarce and the testing tools are few. At present, there are many researches on the software testing of this embedded system in China, but there are few researches on the software module unit level. Therefore, it is necessary to study the unit test method based on embedded Linux special transformer acquisition terminal. Combined with the research of unit testing method of special transformer acquisition terminal in practical work, this paper summarizes and discusses the general unit testing method based on embedded linux software. The specific contents are as follows: The activity steps of unit testing are also divided into four steps: plan, design, implement and execute; Unit testing activities include document review during the detailed design phase, unit test model design, unit test case design, code review in the coding phase, and dynamic execution of the test; Code inspection can be carried out with the help of relevant tools, such as normative check, check of resources, check of grammar problems, etc., and can also be read out according to code modification; Unit tests must output relevant documents and comply with test acceptance specifications In addition, according to the needs of the work, based on the reference of many existing unit testing tools at home and abroad, this paper explores and studies several tools for unit testing activities in the development process of the special transformer acquisition terminal. In order to promote and innovate the application, this paper focuses on the focus of code review of special change acquisition terminal software, and how to use PC-Lint to check the code. How to use CppUnit tools for unit testing dynamic execution, how to use Ccmalloc/Valgrind tools for memory leak checking.
【学位授予单位】:华北电力大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TP311.52;TP368.1
【参考文献】
相关期刊论文 前10条
1 肖世杰;;构建中国智能电网技术思考[J];电力系统自动化;2009年09期
2 魏平,夏良正,王岩;Linux体系结构及嵌入式Linux的移植方法[J];东南大学学报(自然科学版);2004年S1期
3 周小丽,李俊峰;嵌入式系统编程中的代码优化[J];电脑开发与应用;2004年01期
4 张文亮;刘壮志;王明俊;杨旭升;;智能电网的研究进展及发展趋势[J];电网技术;2009年13期
5 钟金;郑睿敏;杨卫红;吴复立;;建设信息时代的智能电网[J];电网技术;2009年13期
6 蔡高亮;;软件单元测试[J];信息技术与标准化;2008年Z1期
7 徐思琰;;基于故障模式的代码审查方法[J];电子产品可靠性与环境试验;2009年06期
8 周勇;;智能电网的发展现状、优势及市场机遇[J];广西电业;2009年08期
9 谢丽荣,奚后玮,马新平;实时的嵌入式Linux在电力系统中的应用[J];江苏电机工程;2005年04期
10 秦春燕;姚竹亭;;嵌入式系统软件测试的研究[J];机械管理开发;2008年03期
,本文编号:1466479
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1466479.html