摘要
代码覆盖率测试技术是一种常见的白盒测试技术,利用它可在代码层面定位测试过程中所发现的缺陷。本文在已有研究基础之上,介绍了代码覆盖率的定义、分类及常用代码覆盖率测试工具,研究了针对Java语言的代码覆盖率工具ElcEmma的工作原理,并结合实例给出了具体的测试流程,分析了测试结果中代码的覆盖情况、未覆盖情况及缺陷定位等问题。
Code coverage testing technology is a common white- box testing technology,which can locate the defects at the code- level in the testing process. Based on the existing research,the definition,classification of code coverage and the common code coverage tools are introduced in the paper. Also,the working principle of ElcEmma,a code coverage tool for Java language is studied,the specific testing procedures with a practical example are presented. At the end,the coveraged codes,non- coveraged codes and the located defects of the testing result are analyzed.
出处
《宜春学院学报》
2016年第6期45-48,共4页
Journal of Yichun University
基金
福建省中青年教师教育科研项目(JA15489)
龙岩学院第三批教学改革项目(2014JY29)
龙岩学院青年攀登项目(LQ2014001)