Linux平台下代码覆盖率报告自动化输出设计
作者:

Design of Automatic Output of Code Coverage Report under Linux Platform
Author:
  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献 [8]
  • |
  • 相似文献 [20]
  • | | |
  • 文章评论
    摘要:

    白盒测试中经常用到覆盖率测试.轻量级覆盖率测试工具GCOV在使用上具有操作复杂繁琐的弊端.本文所述的设计基于GCOV覆盖率测试的原理,依据shell脚本批处理的特点将各部分操作封装为脚本工具;通过Expect脚本工具对上一操作是否成功进行断言,实现各脚本工具调用的联动.通过该设计进行覆盖率报告输出比传统的操作节省了大量时间.同时,本设计具有操作简易、便于移植的特点.极大的减少了工作人员重复的操作,提高了软件开发测试的效率.

    Abstract:

    Coverage testing is often used in white box testing. The lightweight coverage testing tool GCOV has the disadvantage of operating complicatedly. The design described in this paper is based on the principle of GCOV coverage testing. According to the characteristics of batch processing of shell script, all parts of the operation are encapsulated as script tools. Through the Expect script tool asserting whether the last operation is successful or not, to achieve all script tools being excuted automatically. The output of coverage report by this design saves a lot of time than traditional operation. At the same time, this design has advantages of operating simplely and transplanting easily. It greatly reduces the repeated operation of programmers and improves the efficiency of software development and testing.

    参考文献
    [1] 李超, 史晓华, 王斐. 一种轻量级的代码分支覆盖率检测方法:中国, CN106294163A. 2017-01-04.
    [2] 张世伟. 数据通信设备自动化测试框架设计与实现.[硕士学位论文]. 成都:电子科技大学, 2017.
    [3] 姜文, 刘立康. 基于持续集成的C/C++软件覆盖率测试. 计算机技术与发展, 2018, 28(3):37-41, 46.[doi:10.3969/j.issn.1673-629X.2018.03.008
    [4] 周雷. 嵌入式代码覆盖率统计方法. 计算机应用与软件, 2014, 31(5):326-327.[doi:10.3969/j.issn.1000-386x.2014.05.083
    [5] 毛养红. 自动化单元测试的测试用例扩展对桩代码的优化. 当代教育实践与教学研究, 2016, (5):212-213, 211.[doi:10.3969/j.issn.2095-6711.2016.05.186
    [6] 蒋云, 赵佳宝. 自动化测试脚本自动生成技术的研究. 计算机技术与发展, 2007, 17(7):4-7.[doi:10.3969/j.issn.1673-629X.2007.07.002
    [7] 凌永发, 张云生, 郭秀萍. 软件测试自动化中的脚本技术. 云南民族学院学报(自然科学版), 2002, 11(1):544-548.[doi:10.3969/j.issn.1672-8513.2002.01.006
    [8] 李斌, 陈榕. 和欣编程环境中进行单元测试覆盖率分析的方法. 福建电脑, 2008, 24(6):1-2, 4.[doi:10.3969/j.issn.1673-2782.2008.06.001
    引证文献
    网友评论
    网友评论
    分享到微博
    发 布
引用本文

石佳琦,陈鹏. Linux平台下代码覆盖率报告自动化输出设计.计算机系统应用,2019,28(2):68-74

复制
分享
文章指标
  • 点击次数:1773
  • 下载次数: 2213
  • HTML阅读次数: 1862
  • 引用次数: 0
历史
  • 收稿日期:2018-08-06
  • 最后修改日期:2018-09-05
  • 在线发布日期: 2019-01-28
  • 出版日期: 2019-02-15
文章二维码
您是第11416723位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号