Test blueprints - Exposing side effects in execution traces to support writing unit tests

被引:0
|
作者
Lienhard, Adrian [1 ]
Girba, Tudor [1 ]
Greevy, Orla [1 ]
Nierstrasz, Oscar [1 ]
机构
[1] Univ Bern, Software Composit Grp, CH-3012 Bern, Switzerland
关键词
dynamic analysis; object flow analysis; software maintenance; unit testing;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:83 / 92
页数:10
相关论文
共 5 条