IP Library Granted Patent US 10,671,516
Granted Patent B2
US 10,671,516 · App. 15/465,588 · Granted Jun 2, 2020

Method, device, and computer program product for testing code

Inventors: Xiongfang Nie (Beijing, CN); Derek Quanhong Wang (Beijing, CN); Xiaoqiang Zhou (Beijing, CN)
Assignee: EMP IP Holding Company LLC
G06F11/3684G06F11/3664G06F11/3676G06F11/3688
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,671,516
App. No.
15/465,588
Granted
Jun 2, 2020
Kind
B2
Abstract

A method, device, and computer program product for testing code. The method includes identifying a plurality of test points in the code and a plurality of test values to be assigned to the plurality of test points. At least one of the plurality of test points is to be assigned with two or more test values. The method also includes comparing a target test case with a set of test cases. The target test case and the set of test cases are associated with the plurality of test points. The method further includes, in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the set of test cases, excluding the target test case from the set of test cases.

Claims (47)

1. A method of testing code, comprising:

identifying, via a processor, a plurality of test points in the code and a plurality of test values to be assigned to the plurality of test points, at least one of the plurality of test points to be assigned with two or more test values;

comparing a target test case with a set of test cases, the target test case and the set of test cases being associated with the plurality of test points to determine whether the target test case increases a number of different combinations of the plurality of test values present in the set of test cases;

in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the set of test cases indicating the target test case does not increase the number of different combinations of the plurality of test values present in the set of test cases, excluding the target test case from the set of test cases;

in response to determining that at least one of combinations of the test values assigned to at least two of the plurality of test points in the target test case is different from each of combinations of the test values for the at least two test points in the set of test cases, adding the target test case into the set of test cases based on a number of test cases included in the set of test cases;

executing the code using the set of test cases to generate one or more results;

generating a notification indicating that at least one test case of the set of test cases corresponds to a defect in response to at least one result of the one or more results being inconsistent with an expected result;

in response to generating a notification indicating that at least one test case of the set of test cases corresponds to a defect, identifying and assigning at least one new test point associated with the defect;

determining whether further testing for the at least one new test point and at least one corresponding test value is needed; and

generating a new set of test cases based on the at least one new test point and one or more new test values corresponding to one or more existing test points.

2. The method according to claim 1 , further comprising: generating the target test case by randomly assigning test values from the plurality of test values to the plurality of test points.

3. The method according to claim 1 , wherein excluding the target test case from the set of test cases comprises removing the target test case from the set of test cases.

4. The method according to claim 1 , further comprising: determining test coverage for the set of test cases by comparing the number of different combinations of the test values included in the set of test cases with a total number of different combinations of the plurality of test values for the plurality of test points.

5. The method according to claim 1 , further comprising: invoking a plurality of interface functions corresponding to the plurality of test points using the test values for the plurality of test points in respective test cases in the set of test cases as inputs to test the code, the plurality of interface functions assigning the test values in the respective test cases to the corresponding test points.

6. The method according to claim 1 , wherein the set of test cases is a first set of test cases, the method further comprising:

in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the first set of test cases, comparing the target test case with a second set of test cases;

in response to determining that at least one of combinations of the test values assigned to at least two of the plurality of test points in the target test case is different from each of combinations of the test values for the at least two test points in the second set of test cases, adding the target test case into the second set of test cases; and

randomly selecting at least one test case from the first and second sets of test cases to test the code.

7. A device for testing code, including one or more processors and one or more memories configured to perform operations, comprising:

identifying a plurality of test points in the code and a plurality of test values to be assigned to the plurality of test points, at least one of the plurality of test points to be assigned with two or more test values;

comparing a target test case with a set of test cases, the target test case and the set of test cases being associated with the plurality of test points to determine whether the target test case increases a number of different combinations of the plurality of test values present in the set of test cases;

in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the set of test cases indicating the target test case does not increase the number of different combinations of the plurality of test values present in the set of test cases, excluding the target test case from the set of test cases;

in response to determining that at least one of combinations of the test values assigned to at least two of the plurality of test points in the target test case is different from each of combinations of the test values for the at least two test points in the set of test cases, adding the target test case into the set of test cases based on a number of test cases included in the set of test cases;

executing the code using the set of test cases to generate one or more results;

generating a notification indicating that at least one test case of the set of test cases corresponds to a defect in response to at least one result of the one or more results being inconsistent with an expected result;

in response to generating a notification indicating that at least one test case of the set of test cases corresponds to a defect, identifying and assigning at least one new test point associated with the defect;

determining whether further testing for the at least one new test point and at least one corresponding test value is needed; and

generating a new set of test cases based on the at least one new test point and one or more new test values corresponding to one or more existing test points.

8. The device according to claim 7 , wherein the operations further comprise generating the target test case by randomly assigning test values from the plurality of test values to the plurality of test points.

9. The device according to claim 7 , wherein the operations further comprise removing the target test case from the set of test cases.

10. The device according to claim 7 , wherein the operations further comprise determining test coverage for the set of test cases by comparing the number of different combinations of the test values included in the set of test cases with a total number of different combinations of the plurality of test values for the plurality of test points.

11. The device according to claim 7 , wherein the operations further comprise invoking a plurality of interface functions corresponding to the plurality of test points using the test values for the plurality of test points in respective test cases in the set of test cases as inputs to test the code, the plurality of interface functions assigning the test values in the respective test cases to the corresponding test points.

12. The device according to claim 7 , wherein the set of test cases is a first set of test cases, the operations further comprising:

in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the first set of test cases, comparing the target test case with a second set of test cases;

in response to determining that at least one of combinations of the test values assigned to at least two of the plurality of test points in the target test case is different from each of combinations of the test values for the at least two test points in the second set of test cases, adding the target test case into the second set of test cases; and

randomly selecting at least one test case from the first and second sets of test cases to test the code.

13. A computer program product for testing code, the computer program product comprising:

a non-transitory computer readable medium encoded with computer-executable code, the code configured to enable the execution of:

identifying a plurality of test points in the code and a plurality of test values to be assigned to the plurality of test points, at least one of the plurality of test points to be assigned with two or more test values;

comparing a target test case with a set of test cases, the target test case and the set of test cases being associated with the plurality of test points to determine whether the target test case increases a number of different combinations of the plurality of test values present in the set of test cases;

in response to determining that each of combinations of the test values assigned to at least two of the plurality of test points in the target test case is present in the set of test cases indicating the target test case does not increase the number of different combinations of the plurality of test values present in the set of test cases, excluding the target test case from the set of test cases; and

in response to determining that at least one of combinations of the test values assigned to at least two of the plurality of test points in the target test case is different from each of combinations of the test values for the at least two test points in the set of test cases, adding the target test case into the set of test cases based on a number of test cases included in the set of test cases;

executing the code using the set of test cases to generate one or more results;

generating a notification indicating that at least one test case of the set of test cases corresponds to a defect in response to at least one result of the one or more results being inconsistent with an expected result;

in response to generating a notification indicating that at least one test case of the set of test cases corresponds to a defect, identifying and assigning at least one new test point associated with the defect;

determining whether further testing for the at least one new test point and at least one corresponding test value is needed; and

generating a new set of test cases based on the at least one new test point and one or more new test values corresponding to one or more existing test points.

Assignments (9)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (042769/0001) Recorded Apr 26, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO MOZY, INC.); DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO WYSE TECHNOLOGY L.L.C.)
Reel/Frame 059803/0802 →
RELEASE OF SECURITY INTEREST AT REEL 042768 FRAME 0585 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; MOZY, INC.; WYSE TECHNOLOGY L.L.C.
Reel/Frame 058297/0536 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
SECURITY AGREEMENT Recorded Mar 21, 2019
From: CREDANT TECHNOLOGIES, INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 049452/0223 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 11, 2019
From: EMC CORPORATION
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 048559/0487 →
KEY EMPLOYMENT AGREEMENT Recorded Apr 11, 2018
From: NIE, XIONGFANG; WANG, DEREK QUANHONG; ZHOU, XIAOQIANG
To: EMC CORPORATION
Reel/Frame 045910/0129 →
PATENT SECURITY INTEREST (NOTES) Recorded Jun 12, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; MOZY, INC.; WYSE TECHNOLOGY L.L.C.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 042769/0001 →
PATENT SECURITY INTEREST (CREDIT) Recorded Jun 12, 2017
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; MOZY, INC.; WYSE TECHNOLOGY L.L.C.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH, AS COLLATERAL AGENT
Reel/Frame 042768/0585 →
Priority Claims (1)
CN 2016 1 0162636 · Mar 21, 2016 · national
Continuity (1)
Related Publication 20170270035A1 · Sep 21, 2017