计算机应用 ›› 2010, Vol. 30 ›› Issue (10): 2738-2740.

• 软件过程技术与先进计算 • 上一篇    下一篇

嵌入式软件语句覆盖率测试插桩技术

孙红利1,王忠民1,王文浪2   

  1. 1. 西安邮电学院
    2. 西安邮电学院 计算机学院
  • 收稿日期:2010-03-31 修回日期:2010-05-10 发布日期:2010-09-21 出版日期:2010-10-01
  • 通讯作者: 孙红利
  • 基金资助:
    陕西省自然科学基础研究计划项目;西安市科技计划项目

Instrumentation technology for embedded software statement coverage testing

  • Received:2010-03-31 Revised:2010-05-10 Online:2010-09-21 Published:2010-10-01
  • Contact: SUN HongLi

摘要: 针对基于宿主机的嵌入式软件测试,提出一种单元测试中通用的语句覆盖率测试方法,通过插桩技术,采用向源代码插桩实现语句覆盖率测试。设计了测试代码的实现算法,通过测试代码可以自动完成向被测代码插桩。这些方法被成功地应用到笔者所在项目组开发的嵌入式软件仿真测试平台ARMtest上。利用这些方法,在嵌入式硬件系统未完成开发之前,可通过宿主机环境和仿真环境及时发现嵌入式软件开发初期的一些不足并加以完善。

关键词: 嵌入式软件, 宿主机环境, 程序插桩, 语句覆盖, 单元测试, 仿真测试

Abstract: For the host-based embedded software testing, a general method for statement coverage testing in the unit test was proposed. The method was implemented by piling technology before compiling the source code. The relevant algorithm of the test code, with which the piling technology would be automatically performed, was designed. And these approaches were eventually applied to the platform ARMtest for embedded software emulating and testing. By these approaches, the problems in the early embedded software development can be found and improved through the host-based environment and simulation environment.

Key words: embedded software, host-based environment, code instrumentation, statement coverage, unit test, emulating and testing

中图分类号: