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 条
[1]  
Advani D., 2006, SAC
[2]  
Ali M. Sarmad, 2010, INF SOFTW TECHNOL, V52, P1204
[3]   Empirical taxonomy of refactoring methods for aspect-oriented programming [J].
Alshayeb, Mohammad ;
Al-Jamimi, Hamdi ;
Elish, Mahmoud O. .
JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2013, 25 (01) :1-25
[4]  
[Anonymous], 1990, IEEE STANDARD GLOSSA
[5]  
[Anonymous], 1991, 9126 ISOIEC
[6]  
[Anonymous], 4 INT WORKSH SOURC C
[7]  
Badri L., 2011, INT J SOFTW ENG ITS, V5, P69
[8]  
Badri M., 2012, ADV SOFTW ENG
[9]  
Badri M., 2012, J. Software Eng. Applicat., V05, P513, DOI [10.4236/jsea.2012.57060, DOI 10.4236/JSEA.2012.57060]
[10]  
Badri M, 2012, IEEE INT C COMP SYST