基于嵌入式Linux專變采集終端單元測試方法的研究
本文關(guān)鍵詞: 單元測試 代碼審查 內(nèi)存泄露 PC-Lint CppUnit 出處:《華北電力大學》2012年碩士論文 論文類型:學位論文
【摘要】:按照國家電網(wǎng)公司建設(shè)堅強智能電網(wǎng)的總體要求,業(yè)界正在大力進行用電信息采集系統(tǒng)建設(shè)。在用電信息采集系統(tǒng)中,專變采集終端是采集使用專用變壓器的用戶用電信息的設(shè)備,大多基于ARM9平臺和嵌入式Linux操作系統(tǒng)開發(fā)而成。由于嵌入式系統(tǒng)軟件的特性:運行環(huán)境資源緊缺、測試工具較少,目前國內(nèi)針對這種嵌入式系統(tǒng)軟件測試的系統(tǒng)測試開展研究較多,但是針對軟件模塊單元級別的測試研究還很少,因此對基于嵌入式Linux專變采集終端的單元測試方法的研究就很有必要。 本文結(jié)合實際工作中對專變采集終端單元測試方法的研究,總結(jié)論述了基于嵌入式linux軟件的通用單元測試方法,具體內(nèi)容是: (1)單元測試活動步驟,也分為4步:計劃、設(shè)計、實現(xiàn)、執(zhí)行; (2)單元測試活動包括詳細設(shè)計階段的文檔評審、單元測試模型設(shè)計、單元測試用例設(shè)計,編碼階段的代碼檢視、動態(tài)執(zhí)行測試; (3)代碼檢視可以借助相關(guān)工具進行規(guī)范性檢查、資源越界檢查、語法問題檢查等,也可以針對代碼修改進行走讀; (4)單元測試必須輸出相關(guān)文檔,遵守測試驗收規(guī)范 另外,本文根據(jù)工作需要,在借鑒了國內(nèi)外已有的多種單元測試工具的基礎(chǔ)上,探索研究了適用專變采集終端開發(fā)過程中單元測試活動的幾種工具,并詳細研究了工具的使用方法,為了推廣并進行了應(yīng)用創(chuàng)新,重點介紹了專變采集終端軟件代碼審查關(guān)注點,如何使用PC-Lint進行代碼檢查,如何使用CppUnit工具進行單元測試動態(tài)執(zhí)行,如何使用Ccmalloc/Valgrind工具進行內(nèi)存泄露檢查。
[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
【參考文獻】
相關(guān)期刊論文 前10條
1 肖世杰;;構(gòu)建中國智能電網(wǎng)技術(shù)思考[J];電力系統(tǒng)自動化;2009年09期
2 魏平,夏良正,王巖;Linux體系結(jié)構(gòu)及嵌入式Linux的移植方法[J];東南大學學報(自然科學版);2004年S1期
3 周小麗,李俊峰;嵌入式系統(tǒng)編程中的代碼優(yōu)化[J];電腦開發(fā)與應(yīng)用;2004年01期
4 張文亮;劉壯志;王明俊;楊旭升;;智能電網(wǎng)的研究進展及發(fā)展趨勢[J];電網(wǎng)技術(shù);2009年13期
5 鐘金;鄭睿敏;楊衛(wèi)紅;吳復立;;建設(shè)信息時代的智能電網(wǎng)[J];電網(wǎng)技術(shù);2009年13期
6 蔡高亮;;軟件單元測試[J];信息技術(shù)與標準化;2008年Z1期
7 徐思琰;;基于故障模式的代碼審查方法[J];電子產(chǎn)品可靠性與環(huán)境試驗;2009年06期
8 周勇;;智能電網(wǎng)的發(fā)展現(xiàn)狀、優(yōu)勢及市場機遇[J];廣西電業(yè);2009年08期
9 謝麗榮,奚后瑋,馬新平;實時的嵌入式Linux在電力系統(tǒng)中的應(yīng)用[J];江蘇電機工程;2005年04期
10 秦春燕;姚竹亭;;嵌入式系統(tǒng)軟件測試的研究[J];機械管理開發(fā);2008年03期
,本文編號:1466479
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1466479.html