Indian Journal of Science and Technology
Year: 2016, Volume: 9, Issue: 46, Pages: 1-7
H. Omotunde1*, R. Ibrahim1 , M. Ahmed1 , R. F. Olanrewaju2 , N. Ibrahim1 and H. Shah3
1Department of Computer Science and Information Technology, Universiti Tun Hussein Onn Malaysia, 86400 Parit Raja, Batu Pahat, Johor, Malaysia; [email protected] 2International Islamic University Malaysia, 50728 Kuala Lumpur, Gombak, Malaysia 3College of Computer Science, King Khalid University, Abha KSA
*Author for correspondence
H. Omotunde Department of Computer Science and Information Technology, Universiti Tun Hussein Onn Malaysia, 86400 Parit Raja, Batu Pahat, Johor, Malaysia; [email protected]
Objective: Test cases tend to be large in number as redundant test cases are generated due to the presence of code smells, hence the need to reduce these smells. Methods/Statistical Analysis: This research adopts a proactive approach of reducing test cases by detecting the lazy class code smells based on the cohesion and dependency of the code and applying the inline class refactoring practices before test case generation thereby significantly avoiding redundant test cases from being generated Findings: The test cases generated from the original source code is compared to test cases from the refactored code. Test cases from the refactored code show a reduction of up to 33.3% in cyclomatic complexity compared to the original source code. There was 8.2% improvement in the branch coverage of the generated test cases indicating the efficiency of the refactored code Applications/Improvements: From the results, refactoring is an effective technique that can reduce redundant test cases. While the focus is on test case reduction, it also improves the quality of generated test cases in terms of its branch coverage.
Keywords: Android Test Suite, Code Smell, Refactoring, Test cases, Test case redundancy
Subscribe now for latest articles and news.