期刊文献+

消除测试代码异味对代码质量的影响分析 被引量:1

Measuring the Impact of Test Smell Removal on Software Code Quality
下载PDF
导出
摘要 良好的软件测试可以提升软件的可靠性,因此测试代码的设计和实现是国际学者研究的热点之一.测试异味是软件测试中潜在的设计问题,已有研究讨论了测试异味的定义和检测方式,但消除测试异味对代码质量的影响仍不明确.本文量化测试异味消除前后测试代码及关联生产代码的缺陷倾向,进而探究消除测试异味后代码质量的受益程度.在此基础上,本文提出了一种基于SZZ算法和相对风险的方法,以评估测试异味对代码质量的影响.实验聚焦5种测试代码异味,通过挖掘6个开源项目的93个历史发布版本,计算测试异味消除后代码质量的受益程度.实验发现,消除测试异味可显著提升测试代码质量.消除测试异味后,生产代码存在缺陷倾向的概率较之前减少59%.相较于其他4种测试异味,重构EagerTest异味对生产代码质量提升的帮助更大. Well-designed software testing benefits software reliability,so the design of test code is worthy of attention.Test smell is used to describe potential test code design problems.Some studies have defined and detected several test smells,but the impact of test smell removal on software code quality is still unclear.This paper quantified the benefit degree of software code quality by measuring the defect-proneness of production and test code before and after test smell removal.And,this paper put forward an algorithm based on SZZ and relative risk to assess the impact of smelly tests on the quality of the software.This paper detected 5 kinds of test code smell in 93 historical releases of 6 open source projects to quantify the benefit degree of software code quality brought by test smell elimination.Experiment concluded that removing test smell could significantly improve test code quality,production code were 59%less defect-prone than before.Refactoring Eager Test smell could mostly improve production code quality.
作者 黄华俊 吴海涛 高建华 黄子杰 HUANG Hua-jun;WU Hai-tao;GAO Jian-hua;HUANG Zi-jie(Department of Computer Science and Technology,Shanghai Normal University,Shanghai 200234,China)
出处 《小型微型计算机系统》 CSCD 北大核心 2020年第11期2420-2426,共7页 Journal of Chinese Computer Systems
基金 国家自然科学基金项目(61672355)资助.
关键词 测试异味 自动化测试 测试驱动开发 代码质量 test code smell automated test test-driven developement software code quality
  • 相关文献

同被引文献6

引证文献1

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部