针对嵌入式系统软硬件开发不同步的问题,提出一种宿主环境下嵌入式软件白盒测试方法。采用基于顺序块的插桩方法来实现语句覆盖测试,采用基于逻辑树的插桩方法来实现分支覆盖测试,在被测程序运行过程中由嵌入式模拟器实时发送桩信息到分析器,由分析器计算得到语句与分支覆盖率。实验表明,该方法能实时获取嵌入式软件测试过程中的语句和分支覆盖率,测试效果良好。
An embedded software testing method based on hosting platform is proposed for in-depth study of white-box testing of embedded software technology.An instrumentation method based on sequence block is brought forward to do statement coverage testing,which can effective-ly reduce the number of stubs and thus reduce the impact of the testing process.An instrumenta-tion method based on Logic tree is proposed to do branch coverage test.After instrumentation, the program is run on ARMulator.Stub information is analysed by the stub receiver in real time to get the statement and branch coverage.An embedded software testing platform is developed for the ARM-Test.The experiemtns show that ARM-Test can get real-time statement and branch coverage,and do effective white-box testing.