Test case selection
AssigneeInternational Business Machines Corporation
InventorsJin Wang, Lei Gao, A PENG ZHANG, Si Er Han, Jing James Xu, Kai Li
Life of this patent
Estimating the term…
Abstract
Test case selection methods are disclosed. A feature of a candidate test case and respective features of a set of test cases are extracted. The set of test cases is clustered into a plurality of clusters based on the respective features of the set of test cases. At least one cluster related to the candidate test case is determined from the plurality of clusters based on the feature of the candidate test case. At least one test case similar to the candidate test case is selected from a plurality of test cases included in the at least one cluster.
Claims22
A computer-implemented method comprising:
- extracting a feature of a candidate test case and respective features of a set of test cases;
- clustering the set of test cases into a plurality of clusters based on the respective features of the set of test cases;
- determining distances between centers of respective clusters of the plurality of clusters and the candidate test case, wherein the distances indicate an average similarity between the candidate test case and test cases included in respective clusters of test cases;
- ranking the distances by length, smallest to largest, the smallest distance indicating a closest average similarity;
- determining a cluster of the plurality of clusters is related to the candidate test case by selecting the cluster having a distance with the smallest length, wherein a ratio of cluster test cases in the selected cluster to total test cases in the set of test cases exceeds a first threshold;
- and
- selecting at least one cluster test case similar to the candidate test case from the cluster test cases included in the selected cluster.
(canceled)
A computer system comprising:
- a processor(s) set;
- a machine readable storage device;
- and
- computer code stored on the machine readable storage device, with the computer code including instructions and data for causing the processor(s) set to perform operations including the following:
- extracting a feature of a candidate test case and respective features of a set of test cases,
- clustering the set of test cases into a plurality of clusters based on the respective features of the set of test cases,
- determining distances between centers of respective clusters of the plurality of clusters and the candidate test case, wherein the distances indicate an average similarity between the candidate test case and test cases included in respective clusters of test cases,
- ranking the distances by length, smallest to largest, the smallest distance indicating a closest average similarity,
- determining a cluster of the plurality of clusters is related to the candidate test case by selecting the cluster having a distance with the smallest length, wherein a ratio of cluster test cases in the selected cluster to total test cases in the set of test cases exceeds a first threshold, and
- selecting at least one cluster test case similar to the candidate test case from the cluster test cases included in the selected cluster.
(canceled)
A computer program product comprising:
- a machine readable storage device;
- and
- computer code stored on the machine readable storage device, with the computer code including instructions and data for causing a processor(s) set to perform operations including the following:
- extracting a feature of a candidate test case and respective features of a set of test cases,
- clustering the set of test cases into a plurality of clusters based on the respective features of the set of test cases,
- determining distances between centers of respective clusters of the plurality of clusters and the candidate test case, wherein the distances indicate an average similarity between the candidate test case and test cases included in respective clusters of test cases,
- ranking the distances by length, smallest to largest, the smallest distance indicating a closest average similarity,
- determining a cluster of the plurality of clusters is related to the candidate test case by selecting the cluster having a distance with the smallest length, wherein a ratio of cluster test cases in the selected cluster to total test cases in the set of test cases exceeds a first threshold, and
- selecting at least one cluster test case similar to the candidate test case from the cluster test cases included in the selected cluster.
Dependencies are inferred from the claim text.