面向MC/DC覆盖的白盒单元测试用例自动生成技术

秦畅 ,  陈赛 ,  李坤 ,  刘恒 ,  杨柳 ,  马征

科学技术与工程 ›› 2024, Vol. 24 ›› Issue (30) :13039-13047

PDF (4375KB)
科学技术与工程 ›› 2024, Vol. 24 ›› Issue (30) :13039-13047 DOI: 10.12404/j.issn.1671-1815.2307618
自动化技术、计算机技术

面向MC/DC覆盖的白盒单元测试用例自动生成技术

作者信息 +

An Automatic Unit Test Case Generation Scheme for MC/DC Coverage

Author information +
文章历史 +

摘要

在航空航天、医疗、交通等需要保证严格安全的领域,软件测试过程中通常需要利用修正条件判定覆盖(modified condition/decision coverage, MC/DC)替代传统覆盖准则,以此生成更高质量的测试用例。基于此,提出了一种面向MC/DC覆盖的白盒单元测试用例自动生成方案,该方案以MC/DC覆盖到分支覆盖的映射为理论依据,基于符号执行引擎KLEE和底层虚拟机(low-level virtual Machine, LLVM)基础技术框架设计了多款工具,从而自动生成满足测试代码MC/DC最高覆盖的测试用例,以此检测出由于设计导致的MC/DC无法达到100%覆盖的代码缺陷。

Abstract

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.

关键词

白盒测试 / 单元测试 / 测试用例自动生成 / 修正条件判定覆盖

Key words

white-box testing / automatic test case generation / modified condition decision overlay / unit test

引用本文

引用格式 ▾
秦畅, 陈赛, 李坤, 刘恒, 杨柳, 马征. 面向MC/DC覆盖的白盒单元测试用例自动生成技术[J]. 科学技术与工程, 2024, 24(30): 13039-13047 DOI:10.12404/j.issn.1671-1815.2307618
QIN Chang, CHEN Sai, LI Kun, LIU Heng, YANG Liu, MA Zheng. An Automatic Unit Test Case Generation Scheme for MC/DC Coverage[J]. Science Technology and Engineering, 2024, 24(30): 13039-13047 DOI:10.12404/j.issn.1671-1815.2307618

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

基金资助

国家自然科学基金(U2268201)

PDF (4375KB)

34

访问

0

被引

详细

导航
相关文章

/

〈 〉