【24h】

Is This a Bug or an Obsolete Test?

机译:这是错误还是过时的测试?

获取原文

摘要

In software evolution, developers typically need to identify whether the failure of a test is due to a bug in the source code under test or the obsoleteness of the test code when they execute a test suite. Only after finding the cause of a failure can developers determine whether to fix the bug or repair the obsolete test. Researchers have proposed several techniques to automate test repair. However, test-repair techniques typically assume that test failures are always due to obsolete tests. Thus, such techniques may not be applicable in real world software evolution when developers do not know whether the failure is due to a bug or an obsolete test. To know whether the cause of a test failure lies in the source code under test or in the test code, we view this problem as a classification problem and propose an automatic approach based on machine learning. Specifically, we target Java software using the JUnit testing framework and collect a set of features that may be related to failures of tests. Using this set of features, we adopt the Best-first Decision Tree Learning algorithm to train a classifier with some existing regression test failures as training instances. Then, we use the classifier to classify future failed tests. Furthermore, we evaluated our approach using two Java programs in three scenarios (within the same version, within different versions of a program, and between different programs), and found that our approach can effectively classify the causes of failed tests.
机译:在软件演进中,开发人员通常需要确定测试失败是由于被测试源代码中的错误还是由于执行测试套件时测试代码的过时。开发人员只有在找到故障原因后,才能确定是要修复错误还是要修复过时的测试。研究人员提出了几种使测试修复自动化的技术。但是,测试修复技术通常假定测试失败始终是由于过时的测试造成的。因此,当开发人员不知道故障是由于错误还是过时的测试时,此类技术可能不适用于现实世界的软件开发。为了知道测试失败的原因是在测试中的源代码中还是在测试代码中,我们将此问题视为分类问题,并提出了一种基于机器学习的自动方法。具体来说,我们使用JUnit测试框架来定位Java软件,并收集可能与测试失败有关的一组功能。利用这组功能,我们采用最佳优先决策树学习算法来训练具有一些现有回归测试失败的分类器作为训练实例。然后,我们使用分类器对将来失败的测试进行分类。此外,我们在三个场景中使用了两个Java程序评估了我们的方法(在同一版本中,在一个程序的不同版本中以及在不同程序之间),并且发现我们的方法可以有效地对失败测试的原因进行分类。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号