首页> 中文期刊> 《计算机技术与发展》 >基于持续集成的C/C++软件覆盖率测试

基于持续集成的C/C++软件覆盖率测试

         

摘要

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.%覆盖率测试是一种白盒测试方法,软件代码的覆盖率指标是软件开发过程中重要的度量指标.覆盖率测试主要分为两部分:对程序代码进行插桩;编译插桩后的进程文件进行用例测试.首先介绍了Linux环境下C/C++代码覆盖率测试的原理与流程,在此基础上叙述了基于持续集成的软件覆盖率测试原理与流程.详细叙述了覆盖率工程的实现,包括持续集成系统上进行插桩编译、集成构建、插桩数据预处理、HLT测试检查和覆盖率数据处理.代码覆盖率报告提供了软件代码整体覆盖率与新增代码覆盖率的统计数据,反映了软件代码宏观覆盖率信息.测试过程中生成的VBS数据库提供了微观的覆盖率信息.最后介绍了一个典型工作案例,工作实践表明软件开发过程中做好代码覆盖率统计工作,可以有效监控和改进软件源代码的质量,提升软件开发和测试工作.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号