A test case refactoring approach for pattern-based software development |
| |
Authors: | Peng-Hua Chu Nien-Lin Hsueh Hong-Hsiang Chen Chien-Hung Liu |
| |
Affiliation: | (1) Department of Information Engineering and Computer Science, Feng Chia University, Taichung, Taiwan;(2) Computer Science and Information Engineering Department, National Taipei University of Technology, Taipei, Taiwan |
| |
Abstract: | In the current trend, Extreme Programing methodology is widely adopted by small and medium-sized projects for dealing with
rapidly or indefinite changing requirements. Test-first strategy and code refactoring are the important practices of Extreme
Programing for rapid development and quality support. The test-first strategy emphasizes that test cases are designed before
system implementation to keep the correctness of artifacts during software development; whereas refactoring is the removal
of “bad smell” code for improving quality without changing its semantics. However, the test-first strategy may conflict with
code refactoring in the sense that the original test cases may be broken or inefficient for testing programs, which are revised
by code refactoring. In general, the developers revise the test cases manually since it is not complicated. However, when
the developers perform a pattern-based refactoring to improve the quality, the effort of revising the test cases is much more
than that in simple code refactoring. In our observation, a pattern-based refactoring is composed of many simple and atomic
code refactorings. If we have the composition relationship and the mapping rules between code refactoring and test case refactoring,
we may infer a test case revision guideline in pattern-based refactoring. Based on this idea, in this research, we propose
a four-phase approach to guide the construction of the test case refactoring for design patterns. We also introduce our approach
by using some well-known design patterns and evaluate its feasibility by means of test coverage. |
| |
Keywords: | |
本文献已被 SpringerLink 等数据库收录! |
|