Abstract

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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.