计算机技术与发展2018,Vol.28Issue(3):37-41,46,6.DOI:10.3969/j.issn.1673-629X.2018.03.008
基于持续集成的C/C++软件覆盖率测试
Code Coverage Test of C/C++ Software Based on Continuous Integration
摘要
Abstract
Coverage testing is a kind of white-box testing method.Software code coverage indicators is an important metrics in the devel-opment 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 implementa-tion of coverage project in detail,including instrumentation compiling on the continuous integration system,integration establishment,in-strumentation 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.关键词
覆盖率测试/插桩技术/持续集成/构建/VBSKey words
coverage testing/instrumentation technology/continuous integration/building/validation before submission分类
信息技术与安全科学引用本文复制引用
姜文,刘立康..基于持续集成的C/C++软件覆盖率测试[J].计算机技术与发展,2018,28(3):37-41,46,6.基金项目
国家部委基础科研计划:国防预研基金项目(A1120110007) (A1120110007)