PASTIC Dspace Repository

Evaluating the Impact of Refactoring on Clients and Unit Tests

Show simple item record

dc.contributor.author Basit, Wafa
dc.date.accessioned 2018-02-19T05:43:08Z
dc.date.accessioned 2020-04-14T23:35:18Z
dc.date.available 2020-04-14T23:35:18Z
dc.date.issued 2016
dc.identifier.uri http://142.54.178.187:9060/xmlui/handle/123456789/10379
dc.description.abstract Refactorings are specific code transformations that improve the design of existing code without changing its externally observable behavior. In practice, unit tests are the most commonly used tools to ensure preservation of behavior after refactoring. Since unit tests are tightly coupled with the code, refactoring of the code can also invalidate the associated unit tests. If not properly adapted and maintained along with any transformation in the production code, the safety net provided by the unit tests would not be available and could result in a huge loss in terms of effort and cost. Refactoring guidelines provide mechanics for code transformation and refactoring tools provide support for automatic execution of these mechanics. Since refactoring can result in breaking of client and test code, adaptation techniques to fix these should be appropriately addressed. This thesis extends the state of the art in refactoring by formalizing the concept of unit test adaptation with refactorings. In this thesis, we established that, in the context of refactoring, unit test is different from an ordinary client. Therefore, it requires additional adaptations that are not applicable to any other client in the software. For instance, moving a method to another class requires adaptation of its clients including the unit tests. If the clients are not updated, this refactoring will result in compilation errors. On the other hand if test code is not adapted accordingly, this refactoring will introduce test smells in the test code. The test adaptation mechanics developed in this thesis also improve the design of test code along overall improvement in quality of production code. In this thesis we reviewed and analyzed various concepts and tools for refactoring java programs. and unit testing and identified the areas that could be improved. It also includes identification of problem areas in Fowler’s catalog via empirical evaluation . It has also been demonstrated, how refactoring guidelines can be extended. In addition, a test and client adaptation framework has been designed. This framework can provide a basis for automation of primitive refactorings and their associative adaptive actions to be performed on production and test code. The functions from this framework have been used to develop formal specifications of extended refactoring guidelines at different levels of abstraction. We also show with the help of results from an expert survey, empirical investigation and practical demonstration that our proposed approach has various advantages as compared to conventional approaches. en_US
dc.description.sponsorship Higher Education Commission, Pakistan en_US
dc.language.iso en en_US
dc.publisher National University of Computer and Emerging Sciences Lahore, PAKISTAN en_US
dc.subject Natural Sciences en_US
dc.title Evaluating the Impact of Refactoring on Clients and Unit Tests en_US
dc.type Thesis en_US


Files in this item

This item appears in the following Collection(s)

Show simple item record

Search DSpace


Advanced Search

Browse

My Account