Investigating the Effect of Aspect-Oriented Refactoring on the Unit Testing Effort of Classes: An Empirical Evaluation

被引:1
作者
Badri, Mourad [1 ]
Kout, Aymen [1 ]
Badri, Linda [1 ]
机构
[1] Univ Quebec Trois Rivieres, Dept Math & Comp Sci, Software Engn Res Lab, Trois Rivieres, PQ, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
Aspect-Oriented refactoring; unit testing effort; unit test case construction; source code attributes; unit test code attributes; metrics; SOFTWARE; DESIGN; TESTABILITY; METRICS;
D O I
10.1142/S0218194017500280
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
This paper aims at investigating empirically the effect of aspect-oriented (AO) refactoring on the unit testability of classes in object-oriented software. The unit testability of classes has been addressed from the perspective of the unit testing effort, and particularly from the perspective of the unit test cases (TCs) construction. We investigated, in fact, different research questions: (1) the impact of AO refactoring on source code attributes (size, complexity, coupling, cohesion and inheritance), attributes that are mostly related to the unit testability of classes, (2) the impact of AO refactoring on unit test code attributes (size, assertions, invocations and data creation), attributes that are indicators of the effort involved to write the code of unit TCs, and (3) the relationships between the variations observed after AO refactoring in both source code and unit test code attributes. We used in the study different techniques: correlation analysis, statistical tests and linear regression. We performed an empirical evaluation using data collected from three well-known open source (Java) software systems (JHOTDRAW, HSQLBD and PETSTORE) that have been refactored using AO programming (AspectJ). Results suggest that: (1) overall, the effort involved in the construction of unit TCs of refactored classes has been reduced, (2) the variations of source code attributes have more impact on methods invocation between unit TCs, and finally (3) the variations of unit test code attributes are more influenced by the variation of the complexity of refactored classes compared to the other class attributes.
引用
收藏
页码:749 / 789
页数:41
相关论文
共 59 条
[11]  
Badri M., 2011, 23 INT C SOFTWARE EN
[12]   An exploratory study of the effect of aspect-oriented programming on maintainability [J].
Bartsch, Marc ;
Harrison, Rachel .
SOFTWARE QUALITY JOURNAL, 2008, 16 (01) :23-44
[13]   DESIGN FOR TESTABILITY IN OBJECT-ORIENTED SYSTEMS [J].
BINDER, RV .
COMMUNICATIONS OF THE ACM, 1994, 37 (09) :87-101
[14]   An empirical study into class testability [J].
Bruntink, Magiel ;
van Deursen, Arie .
JOURNAL OF SYSTEMS AND SOFTWARE, 2006, 79 (09) :1219-1232
[15]  
Ceccato M., 2004, 1 WORKSH ASP REV ENG
[16]   A METRICS SUITE FOR OBJECT-ORIENTED DESIGN [J].
CHIDAMBER, SR ;
KEMERER, CF .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (06) :476-493
[17]   Managerial use of metrics for object-oriented software: An exploratory analysis [J].
Chidamber, SR ;
Darcy, DP ;
Kemerer, CF .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1998, 24 (08) :629-639
[18]  
Cinneide M., 2011, P INT C SOFTW TEST V
[19]  
Coelho R., 2008, P 22 EUR C OBJ OR PR
[20]  
Deepiga A. S., 2014, IEEE INT C ADV COMM