
科学技术与工程

中国技术经济学会
面向MC/DC覆盖的白盒单元测试用例自动生成技术
秦畅 , 陈赛 , 李坤 , 刘恒 , 杨柳 , 马征
科学技术与工程 ›› 2024, Vol. 24 ›› Issue (30) :13039-13047
面向MC/DC覆盖的白盒单元测试用例自动生成技术
An Automatic Unit Test Case Generation Scheme for MC/DC Coverage
在航空航天、医疗、交通等需要保证严格安全的领域,软件测试过程中通常需要利用修正条件判定覆盖(modified condition/decision coverage, MC/DC)替代传统覆盖准则,以此生成更高质量的测试用例。基于此,提出了一种面向MC/DC覆盖的白盒单元测试用例自动生成方案,该方案以MC/DC覆盖到分支覆盖的映射为理论依据,基于符号执行引擎KLEE和底层虚拟机(low-level virtual Machine, LLVM)基础技术框架设计了多款工具,从而自动生成满足测试代码MC/DC最高覆盖的测试用例,以此检测出由于设计导致的MC/DC无法达到100%覆盖的代码缺陷。
In the fields of aerospace, medicine, transportation, and others where strict safety is paramount, MC/DC (modified condition/decision coverage) was commonly utilized instead of traditional coverage criteria in software testing. As a result, a greater number of high-quality test cases are necessary. Due to the aforementioned considerations, a white-box unit test case automatic generation scheme for MC/DC coverage was proposed. Based on the theoretical foundation of mapping from MC/DC coverage to branch coverage, the proposed scheme has developed several tools based on the framework of the symbolic execution engine KLEE and the LLVM(low-level virtual machine). With this approach, automated test cases can be generated that attain the highest possible MC/DC coverage, thereby assisting human testers in identifying potential code defects which prevent the achievement of 100% MC/DC coverage.
白盒测试 / 单元测试 / 测试用例自动生成 / 修正条件判定覆盖
white-box testing / automatic test case generation / modified condition decision overlay / unit test
/
| 〈 |
|
〉 |