[1]姜文,刘立康.基于持续集成的C/ C++软件覆盖率测试[J].计算机技术与发展,2018,28(03):37-41.[doi:10.3969/ j. issn.1673-629X.2018.03.008]
JIANG Wen,LIU Li-kang.Code Coverage Test of C/ C++ Software Based on Continuous Integration[J].,2018,28(03):37-41.[doi:10.3969/ j. issn.1673-629X.2018.03.008]
点击复制
基于持续集成的C/ C++软件覆盖率测试(
)
《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]
- 卷:
-
28
- 期数:
-
2018年03期
- 页码:
-
37-41
- 栏目:
-
智能、算法、系统工程
- 出版日期:
-
2018-03-10
文章信息/Info
- Title:
-
Code Coverage Test of C/ C++ Software Based on Continuous Integration
- 文章编号:
-
1673-629X(2018)03-0037-05
- 作者:
-
姜文; 刘立康
-
西安电子科技大学 通信工程学院,陕西 西安 710071
- Author(s):
-
JIANG Wen; LIU Li-kang
-
School of Telecommunication Engineering,Xidian University,Xi’an 710071,China
-
- 关键词:
-
覆盖率测试; 插桩技术; 持续集成; 构建; VBS
- Keywords:
-
coverage testing; instrumentation technology; continuous integration; building; validation before submission
- 分类号:
-
TP311.56
- DOI:
-
10.3969/ j. issn.1673-629X.2018.03.008
- 文献标志码:
-
A
- 摘要:
-
覆盖率测试是一种白盒测试方法,软件代码的覆盖率指标是软件开发过程中重要的度量指标。 覆盖率测试主要分为两部分:对程序代码进行插桩;编译插桩后的进程文件进行用例测试。首先介绍了 Linux 环境下 C/ C++代码覆盖率测试的原理与流程,在此基础上叙述了基于持续集成的软件覆盖率测试原理与流程。 详细叙述了覆盖率工程的实现,包括持续集成系统上进行插桩编译、集成构建、插桩数据预处理、HLT 测试检查和覆盖率数据处理。 代码覆盖率报告提供了软件代码整体覆盖率与新增代码覆盖率的统计数据,反映了软件代码宏观覆盖率信息。测试过程中生成的 VBS 数据库提供
了微观的覆盖率信息。最后介绍了一个典型工作案例,工作实践表明软件开发过程中做好代码覆盖率统计工作,可以有效监控和改进软件源代码的质量,提升软件开发和测试工作。
- Abstract:
-
Coverage testing is a kind of white-box testing method. Software code coverage indicators is an important metrics in the development of software. Coverage testing is mainly divided into two parts:the instrumentation of program code;testing the module files after instrumentation with the test case. First we introduce the principle and process of C/ C++ code coverage testing in the Linux,basd on which the principle and process of software coverage testing based on the continuous integration is specified. We describe the implementation of coverage project in detail,including instrumentation compiling on the continuous integration system,integration establishment,instrumentation data preprocessing,HLT test and coverage data processing. Code coverage report provides the statistics of overall software code coverage and new code coverage,which reflects the macro software code coverage information. The VBS database generated in the test process provides the micro coverage information. Finally introduction of a typical case,the practice shows that doing the statistics of code coverage well during the software development can effectively monitor and improve the quality of the software source code,and also promote software development and testing work.
更新日期/Last Update:
2018-04-08