首页> 外文OA文献 >Test Blueprints - Exposing Side Effects in Execution Traces to Support Writing Unit Tests
【2h】

Test Blueprints - Exposing Side Effects in Execution Traces to Support Writing Unit Tests

机译:测试蓝图-在执行轨迹中暴露副作用以支持编写单元测试

摘要

Writing unit tests for legacy systems is a key maintenance task. When writing tests for object-oriented programs, objects need to be set up and the expected effects of executing the unit under test need to be verified. If developers lack internal knowledge of a system, the task of writing tests is non-trivial. To address this problem, we propose an approach that exposes side effects detected in example runs of the system and uses these side effects to guide the developer when writing tests. We introduce a visualization called Test Blueprint, through which we identify what the required fixture is and what assertions are needed to verify the correct behavior of a unit under test. The dynamic analysis technique that underlies our approach is based on both tracing method executions and on tracking the flow of objects at runtime. To demonstrate the usefulness of our approach we present results from two case studies.
机译:为遗留系统编写单元测试是一项关键的维护任务。在为面向对象的程序编写测试时,需要设置对象,并且需要验证执行被测单元的预期效果。如果开发人员缺乏系统的内部知识,那么编写测试的任务就很简单。为了解决这个问题,我们提出了一种方法,该方法公开在系统示例运行中检测到的副作用,并在编写测试时使用这些副作用来指导开发人员。我们引入了称为“测试蓝图”的可视化,通过该可视化,我们可以识别所需的夹具以及需要哪些断言来验证被测单元的正确行为。我们的方法所基于的动态分析技术既基于跟踪方法的执行,又基于运行时跟踪对象的流。为了证明我们方法的有效性,我们提供了两个案例研究的结果。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号