Emulator-based embedded software unit testing method
-
摘要: 介绍了一种基于仿真器的嵌入式软件测试方法,通过构造链接器分析目标文件,生成内存映像,加载到仿真器执行测试.该方法特别适合嵌入式软件的单元测试,支持对不完整的代码进行测试,同时引入了交互式脚本执行机制,支持采用高级脚本语言而不是嵌入式专用汇编语言设计桩函数和测试用例,降低了测试人员的培训代价.航天某院等单位的应用结果显示,该方法能有效提升嵌入式软件的单元测试效率,有较高的实际推广价值.Abstract: A unit testing method for embedded software was presented, which used customized linker to parse object files and generates memory image. The memory image can be loaded into a software simulator to generate testing results. This method is especially useful for the unit testing of embedded software, which can test incomplete code and support designing stub functions and test cases through advanced script programming language instead of embedded assembly programming language. Then the training cost of testing engineers can be reduced. The application result from one institute of China Aerospace Science and Industry Group shows that it can improve the efficiency of embedded software unit testing significantly.
-
Key words:
- embedded software /
- software testing /
- simulator /
- linker /
- unit testing
-
[1] 国家安全生产监督管理总局."7·23"甬温线特别重大铁路交通事故调查报告 .北京:国家安全生产监督管理总局,2011 .http://www.chinasafety.gov.cn/newpage/Contents/Channel_5498/2011/1228/160577/content_160577.htm State Administration of Work Safety of China.The investigation report of 7·23 Yong-wen major rail accident .Beijing:State Administration of Work Safety of China Official Website,2011 .http://www.chinasafety.gov.cn/newpage/Contents/Channel_5498/2011/1228/160577/content_160577.htm (in Chinese) [2] 薛伟.利用在线仿真器(ICE)设计微机故障自动诊断系统[J].小型微型计算机系统,1988,9(6):40-44 Xue Wei.The microcomputer automatic fault diagnosis system based on circuit emulator[J].Mini-Micro Systems,1988,9(6):40-44(in Chinese) [3] 师奕兵,王厚军.高速逻辑分析仪产品化设计的关键技术[J].仪器仪表学报,2002,23(5):38-40 Shi Yibing,Wang Houjun.Key techniques in product design of high-speed logic analyzer[J].Chinese Journal of Scientific Instrument,2002,23(5):38-40(in Chinese) [4] 李跃飞,郭君红,白成刚,等.飞行控制软件测试中的插桩技术[J].北京航空航天大学学报,2009,35(5):580-583 Li Yuefei,Guo Junhong,Bai Chenggang,et al.Instrumentation in flight-control software testing[J].Journal of Beijing University of Aeronautics and Astronautics,2009,35(5):580-583(in Chinese) [5] 周庆,刘斌,余正伟,等.综合模块化航电软件仿真测试环境研究[J].航空学报,2012,33(4):722-733 Zhou Qing,Liu Bin,Yu Zhengwei,et al.A framework of simulation testing environment for integrated modular avionics software[J].Acta Aeronautica et Astronautica Sinica,2012,33(4):722-733(in Chinese) [6] 吴晓葵.基于CodeTEST的嵌入式软件测试技术[J].电子设计工程,2010,18(9):74-76 Wu Xiaokui.Embedded software testing technology based on CodeTEST[J].Electronic Design Engineering,2010,18(9):74-76(in Chinese) [7] Rihar Marjan.Software simulator as an effective tool for testing control algorithms[J].Simulation,1994,63(1):6-14 [8] Anuradha P S,Kumar K S S,Arindam C.Commercial dynamic software satellite simulator[J].Journal of Spacecraft Technology,2010,20(2):1-8 [9] Analog Devices Corporation.ADSP-21XX processor architectural overview .Norwood:Analog Devices Corporation,2012 .http://www.analog.com/en/processors-dsp/products/adsp21xx_processor_architectural_overview/fca.html [10] 路晓丽,葛伟,龚晓庆,等.软件测试技术[M].北京:机械工业出版社,2007:32-46 Lu Xiaoli,Ge Wei,Gong Xiaoqing,et al.Software testing technology[M].Beijing:China Machine Press,2007:32-46(in Chinese) [11] IBM Corporation.Rational logiscope .New York:IBM Corporation,2012 .http://www-01.ibm.com/software/awdtools/logiscope/ [12] Wikipedia.Executable and linkable format .London:Wikipedia,2012 .http://en.wikipedia.org/wiki/Executable_and_Linkable_Format [13] Wikipedia.DWARF .London:Wikipedia,2012 .http://en.wikipedia.org/wiki/DWARF [14] Wikipedia.The common object file format .London:Wikipedia,2012 .http://en.wikipedia.org/wiki/COFF
点击查看大图
计量
- 文章访问数: 1752
- HTML全文浏览量: 220
- PDF下载量: 631
- 被引次数: 0