Test-Suite Reduction Based on K-Medoids Clustering Algorithm

Software testing is a key approach to guarantee the software quality. It is the objective unremittingly pursed by virtue of effective testing cases in the shortest time. The test suite optimization method is a NP-complete problem. Although some people apply k-means clustering algorithm to the test suite reduction, the algorithm is unstable and seldom considers the coverage rate of such test cases; as a result, it will waste many unnecessary testing time in redundant cases and always result in high cost. Therefore, this paper introduces k-medoids thought of the clustering algorithm and then proposes a method of parameter generation test suite characterized by cyclomatic complexity and code coverage rate. This method utilizes the greedy algorithm to process the streamlined test suite while guaranteeing the cases coverage rate and the error detection rate finally gain the minimal test suite. As indicated by the stimulation experimental results, our method features higher coverage rate with lower complexity under the streamlined test suite of the same quantity.