首页> 外文学位 >Improving Software Quality by Synergizing Effective Code Inspection and Regression Testing
【24h】

Improving Software Quality by Synergizing Effective Code Inspection and Regression Testing

机译:通过协同有效的代码检查和回归测试来提高软件质量

获取原文
获取原文并翻译 | 示例

摘要

Many dynamic and static program analysis techniques have been proposed, but testing a program involves substantial cost and risks and inspecting code change is tedious and error-prone. Our research addresses two fundamental problems in dynamic and static techniques. (1) To evaluate a program, developers are typically required to implement test cases and reuse them. As they develop more test cases for verifying new implementations, the execution cost of test cases increases accordingly. After every modification, they periodically conduct regression test to see whether the program executes without introducing new faults in the presence of program evolution. To reduce the time required to perform regression testing, developers should select an appropriate subset of the test suite with a guarantee of revealing faults as running entire test cases. Such regression testing selection techniques are still challenging as these methods also have substantial costs and risks and discard test cases that could detect faults. (2) As a less formal and more lightweight method than running a test suite, developers often conduct code reviews based on tool support; however, understanding context and changes is the key challenge of code reviews. While reviewing code changes---addressing one single issue---might not be difficult, it is extremely difficult to understand complex changes---including multiple issues such as bug fixes, refactorings, and new feature additions. Developers need to understand intermingled changes addressing multiple development issues, finding which region of the code changes deals with a particular issue. Although such changes do not cause trouble in implementation, investigating these changes becomes time-consuming and error-prone since the intertwined changes are loosely related, leading to difficulty in code reviews.;To address the limitations outlined above, our research makes the following contributions. First, we present a model-based approach to efficiently build a regression test suite that facilitates Extended Finite State Machines (EFSMs). Changes to the system are performed at transition level by adding, deleting or replacing transition. Tests are a sequence of input and expected output messages with concrete parameter values over the supported data types. Fully-observable tests are introduced whose descriptions contain all the information about the transitions executed by the tests. An invariant characterizing fully observable tests is formulated such that a test is fully-observable whenever the invariant is a satisfiable formula. Incremental procedures are developed to efficiently evaluate the invariant and to select tests from a test suite that are guaranteed to exercise a given change when the tests run on a modified EFSM. Tests rendered unusable due to a change are also identified. Overlaps among the test descriptions are exploited to extend the approach to simultaneously select and discard multiple tests to alleviate the test selection costs. Although test regression selection problem is NP-hard, the experimental results show the cost of our test selection procedure is still acceptable and economical. Second, to support code review and regression testing, we present a technique, called C hgCutter. It helps developers understand and validate composite changes as follows. It interactively decomposes these complex, composite changes into atomic changes, builds related change subsets using program dependence relationships without syntactic violation, and safely selects only related test cases from the test suite to reduce the time to conduct regression testing. When a code reviewer selects a change region from both original and changed versions of a program, ChgC utter automatically identifies similar change regions based on the dependence analysis and the tree-based code search technique. By automatically applying a change to the identified regions in an original program version, ChgCutter generates a program version, which is a syntactically correct version of program. Given a generated program version, it leverages a testing selection technique to select and run a subset of the test suite affected by a change automatically separated from mixed changes. Based on the iterative change selection process, there can be each different program version that include its separated change. Therefore, ChgC utter helps code reviewers inspect large, complex changes by effectively focusing on decomposed change subsets. In addition to assisting understanding a substantial change, the regression testing selection technique effectively discovers defects by validating each program version that contains a separated change subset. In the evaluation, ChgCutter analyzes 28 composite changes in four open source projects. It identifies related change subsets with 95.7% accuracy, and it selects test cases affected by these changes with 89.0% accuracy. Our results show that ChgC utter should help developers effectively inspect changes and validate modified applications during development. (Abstract shortened by ProQuest.).
机译:已经提出了许多动态和静态程序分析技术,但是测试程序会涉及大量成本和风险,并且检查代码更改既繁琐又容易出错。我们的研究解决了动态和静态技术中的两个基本问题。 (1)要评估程序,通常需要开发人员实施测试用例并重用它们。随着他们开发更多的测试用例以验证新的实现,测试用例的执行成本也相应增加。每次修改后,他们都会定期进行回归测试,以查看程序是否在没有程序演化的情况下执行而不会引入新的错误。为了减少执行回归测试所需的时间,开发人员应选择测试套件的适当子集,并保证在运行整个测试用例时能够揭示故障。这样的回归测试选择技术仍然具有挑战性,因为这些方法还具有巨大的成本和风险,并丢弃了可能检测故障的测试用例。 (2)与运行测试套件相比,作为一种不那么正式,更轻巧的方法,开发人员经常基于工具支持进行代码审查;但是,理解上下文和更改是代码审查的主要挑战。在审查代码更改时-解决一个问题-可能并不困难,而理解复杂的更改则极其困难-包括错误修复,重构和新功能添加等多个问题。开发人员需要了解混合的更改以解决多个开发问题,找到代码更改的哪个区域处理特定的问题。尽管此类更改不会给实现带来麻烦,但是由于这些更改之间存在松散的关联,因此调查这些更改变得既费时又容易出错,从而导致代码审查困难。为了解决上述局限性,我们的研究做出了以下贡献。首先,我们提出了一种基于模型的方法来有效地构建回归测试套件,以促进扩展有限状态机(EFSM)。通过添加,删除或替换过渡,可以在过渡级别执行对系统的更改。测试是一系列输入和预期输出消息,其中包含支持的数据类型上的具体参数值。引入了完全可观察的测试,其描述包含有关测试执行的转换的所有信息。制定了表征完全可观察测试的不变式,使得只要该不变式是可满足的公式,就可以完全观察到该测试。开发了增量过程来有效评估不变性,并从测试套件中选择测试,这些测试可保证在修改的EFSM上运行测试时可以进行给定的更改。还可以识别由于更改而无法使用的测试。利用测试描述之间的重叠来扩展方法,以便同时选择和丢弃多个测试以减轻测试选择成本。尽管测试回归选择问题很难解决,但实验结果表明,我们的测试选择程序的成本仍然可以接受且经济。其次,为了支持代码审查和回归测试,我们提出了一种称为C hgCutter的技术。它可以帮助开发人员理解和验证组合更改,如下所示。它以交互方式将这些复杂的复合更改分解为原子更改,使用程序依赖关系构建相关的更改子集,而没有语法冲突,并安全地从测试套件中选择了相关的测试用例,以减少进行回归测试的时间。当代码审阅者从程序的原始版本和更改版本中选择一个更改区域时,ChgC utter会基于依赖性分析和基于树的代码搜索技术自动识别相似的更改区域。通过自动将更改应用于原始程序版本中的已识别区域,ChgCutter会生成程序版本,该程序版本在语法上是程序的正确版本。给定生成的程序版本,它利用测试选择技术来选择并运行受自动从混合更改中分离出来的更改影响的测试套件的子集。基于迭代更改选择过程,可能会有每个不同的程序版本,包括其单独的更改。因此,ChgC utter通过有效地关注分解后的变更子集来帮助代码审查者检查大型,复杂的变更。除了帮助理解实质性变化之外,回归测试选择技术还通过验证包含独立变化子集的每个程序版本来有效发现缺陷。在评估中,ChgCutter分析了四个开源项目中的28个复合变更。它以95.7%的准确性识别相关的变更子集,并以89.0%的准确度选择受这些更改影响的测试用例。我们的结果表明,ChgC完全可以帮助开发人员在开发过程中有效地检查更改并验证修改后的应用程序。 (摘要由ProQuest缩短。)。

著录项

  • 作者

    Guo, Bo.;

  • 作者单位

    University of Nebraska at Omaha.;

  • 授予单位 University of Nebraska at Omaha.;
  • 学科 Computer science.
  • 学位 Ph.D.
  • 年度 2017
  • 页码 144 p.
  • 总页数 144
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号