Mining unit test cases to synthesize API usage examples

2017 ◽  
Vol 29 (12) ◽  
pp. e1841 ◽  
Author(s):  
Mohammad Ghafari ◽  
Konstantin Rubinov ◽  
Mohammad Mehdi Pourhashem K.
Keyword(s):  
Author(s):  
Cody Watson ◽  
Michele Tufano ◽  
Kevin Moran ◽  
Gabriele Bavota ◽  
Denys Poshyvanyk
Keyword(s):  

Author(s):  
Novi Setiani ◽  
Ridi Ferdiana ◽  
Rudy Hartanto
Keyword(s):  

Author(s):  
Mourad Badri ◽  
Aymen Kout ◽  
Linda Badri

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.


2020 ◽  
Author(s):  
Praveen Kumar Venkatesan ◽  
Rikhil Gade Rozario ◽  
Jinan Fiaidhi

Testing software before deploying is a mandatory task in SDLC. Various types of testing tools are used to test the software. This research focuses on JUnit framework to perform unit testing for Java applications. We have developed a Banking Inventory application using spring framework by connecting the application to the MongoDB. The application contains operations such as Create, Update, Delete and find for the customers and Unit test cases has been developed for all the modules using JUnit framework and the test cases are discussed and validated.


Sign in / Sign up

Export Citation Format

Share Document