An Empirical Evaluation for Object Initialization of Member Variables in Unit Testing

Stefan Fischer, Evelyn Nicole Haslinger, Markus Zimmermann,Hannes Thaller

2020 IEEE Workshop on Validation, Analysis and Evolution of Software Tests (VST)(2020)

引用 2|浏览0
暂无评分
摘要
Automated test case generation techniques usually aim to maximize some coverage criteria. For object oriented languages, like Java, the branches that can be reached in source code, frequently depend on the internal object state. Meaning certain branches will only be taken, if fields inside the tested class are set to specific values. It is however not obvious how much of the internal object state can be controlled. In this paper, we analyzed a corpus of 110 open source systems to evaluate how settable their classes are. Meaning we looked for ways that fields inside classes can be written. For instance, we analyzed the source code to identify setter methods that can be used to set the values of a field. Our results show that 66.5% of fields can be set to a desired value, while 31.5% of fields may be only settable to particular values or require a more in depth analysis. Only for 2% of fields, we did not find any way to set their values.
更多
查看译文
关键词
test automation,test case generation,object state,test setup
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要