Linux平台下代码覆盖率报告自动化输出设计
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Design of Automatic Output of Code Coverage Report under Linux Platform
  • 作者:石佳琦 ; 陈鹏
  • 英文作者:SHI Jia-Qi;CHEN Peng;Wuhan Research Institute of Posts and Telecommunications;Fiberhome Telecommunication Technologies Co.Ltd.;
  • 关键词:Linux ; 分布式系统 ; 覆盖率 ; 脚本 ; 自动化
  • 英文关键词:Linux;;distributed system;;coverage;;script;;automation
  • 中文刊名:XTYY
  • 英文刊名:Computer Systems & Applications
  • 机构:武汉邮电科学研究院;烽火通信科技股份有限公司;
  • 出版日期:2019-02-15
  • 出版单位:计算机系统应用
  • 年:2019
  • 期:v.28
  • 语种:中文;
  • 页:XTYY201902010
  • 页数:7
  • CN:02
  • ISSN:11-2854/TP
  • 分类号:70-76
摘要
白盒测试中经常用到覆盖率测试.轻量级覆盖率测试工具GCOV在使用上具有操作复杂繁琐的弊端.本文所述的设计基于GCOV覆盖率测试的原理,依据shell脚本批处理的特点将各部分操作封装为脚本工具;通过Expect脚本工具对上一操作是否成功进行断言,实现各脚本工具调用的联动.通过该设计进行覆盖率报告输出比传统的操作节省了大量时间.同时,本设计具有操作简易、便于移植的特点.极大的减少了工作人员重复的操作,提高了软件开发测试的效率.
        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]

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700