首页> 外文期刊>Software Engineering, IEEE Transactions on >Instance Generator and Problem Representation to Improve Object Oriented Code Coverage
【24h】

Instance Generator and Problem Representation to Improve Object Oriented Code Coverage

机译:实例生成器和问题表示法可提高面向对象的代码覆盖率

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

摘要

Search-based approaches have been extensively applied to solve the problem of software test-data generation. Yet, test-data generation for object-oriented programming (OOP) is challenging due to the features of OOP, e.g., abstraction, encapsulation, and visibility that prevent direct access to some parts of the source code. To address this problem we present a new automated search-based software test-data generation approach that achieves high code coverage for unit-class testing. We first describe how we structure the test-data generation problem for unit-class testing to generate relevant sequences of method calls. Through a static analysis, we consider only methods or constructors changing the state of the class-under-test or that may reach a test target. Then we introduce a generator of instances of classes that is based on a family of means-of-instantiation including subclasses and external factory methods. It also uses a seeding strategy and a diversification strategy to increase the likelihood to reach a test target. Using a search heuristic to reach all test targets at the same time, we implement our approach in a tool, JTExpert, that we evaluate on more than a hundred Java classes from different open-source libraries. JTExpert gives better results in terms of search time and code coverage than the state of the art, EvoSuite, which uses traditional techniques.
机译:基于搜索的方法已广泛应用于解决软件测试数据生成的问题。然而,由于OOP的特性,例如抽象,封装和可见性阻止了直接访问源代码的某些部分,因此面向对象编程(OOP)的测试数据生成是具有挑战性的。为了解决这个问题,我们提出了一种新的基于搜索的自动化软件测试数据生成方法,该方法可以在单元级测试中实现较高的代码覆盖率。我们首先描述如何构造用于单元类测试的测试数据生成问题,以生成方法调用的相关序列。通过静态分析,我们仅考虑更改被测类的状态或可能达到测试目标的方法或构造函数。然后,我们介绍基于类实例化方法的类实例的生成器,该类实例化方法包括子类和外部工厂方法。它还使用了播种策略和多样化策略来增加达到测试目标的可能性。通过使用搜索试探法同时达到所有测试目标,我们在工具JTExpert中实现了我们的方法,该工具可对来自不同开源库的一百多个Java类进行评估。与使用传统技术的最新技术EvoSuite相比,JTExpert在搜索时间和代码覆盖率方面提供了更好的结果。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号