IP Library Granted Patent US 9,342,440
Granted Patent B2
US 9,342,440 · App. 14/831,125 · Granted May 17, 2016

Test coverage analysis

Inventors: Chunguang Zheng (Beijing, CN); Zhi Zhang (Beijing, CN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F11/3676G06F11/3688G06F11/3692
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 9,342,440
App. No.
14/831,125
Granted
May 17, 2016
Kind
B2
Abstract

A test coverage analysis method and corresponding apparatus are disclosed, wherein, by executing the program under test using one or more test cases, generating one or more heapdump files containing the call stack information of the program under test, and analyzing the call stack information in the one or more heapdump files, the coverage information of the one or more test cases in terms of functions in the program under test is obtained.

Claims (58)

1. A computer-implemented method for analyzing test coverage of a program under test, comprising:

executing the program under test using a test case;

generating a heapdump file containing call stack information of the program under test;

obtaining, based upon an analysis of the call stack information, coverage information, wherein

the analysis includes:

performing a hash operation on each function call entry,

sorting the identifications of the function call entries in an identification list,

removing repetitive identifications from the identification list,

recording an association between the identification and a corresponding function call stack and test case,

an obtained hash code is an identification of the function call entry, and

the identification list is used to obtain the coverage information.

2. The method of claim 1 , further comprising filtering, using filter rules, function call entries in the call stack information.

3. The method of claim 2 , wherein

the filter rules include a partial or full name of a package containing the program under test, and

the filtering filters out the function call entries that do not contain the partial or full name of the package.

4. The method of claim 2 , wherein

the filter rules include a name of a class or method not required for analyzing test coverage of the program under test, and

the filtering filters out the function call entries containing the name of the class or method.

5. The method of claim 1 , wherein

the program under test is executed using a plurality of test cases, and

the coverage information includes

a specific function called during the executing of the program under test, and

an identification of at least one of the plurality of test cases associated with the specific function being called.

6. The method of claim 1 , wherein

the coverage information includes one or more functions in the program under test not called during the executing of the program under test.

7. The method of claim 1 , wherein

a plurality of heapdump files are generated during the executing the program under test, and

the coverage information is based upon the plurality of heapdump files.

8. A computer hardware system configured to analyze test coverage of a program under test, comprising:

at least one hardware processor, wherein the at least one hardware processor is configured to initiate and/or perform:

executing the program under test using a test case;

generating a heapdump file containing call stack information of the program under test;

obtaining, based upon an analysis of the call stack information, coverage information, wherein

the analysis includes:

performing a hash operation on each function call entry,

sorting the identifications of the function call entries in an identification list,

removing repetitive identifications from the identification list,

recording an association between the identification and a corresponding function call stack and test case,

an obtained hash code is an identification of the function call entry, and

the identification list is used to obtain the coverage information.

9. The system of claim 8 , wherein the at least one hardware processor is further configured to initiate and/or perform:

filtering, using filter rules, function call entries in the call stack information.

10. The system of claim 9 , wherein

the filter rules include a partial or full name of a package containing the program under test, and

the filtering filters out the function call entries that do not contain the partial or full name of the package.

11. The system of claim 9 , wherein

the filter rules include a name of a class or method not required to analyze test coverage of the program under test, and

the filtering filters out the function call entries containing the name of the class or method.

12. The system of claim 8 , wherein

the program under test is executed using a plurality of test cases, and

the coverage information includes

a specific function called during the executing of the program under test, and

an identification of at least one of the plurality of test cases associated with the specific function being called.

13. The system of claim 8 , wherein

the coverage information includes one or more functions in the program under test not called during the executing of the program under test.

14. The system of claim 8 , wherein

a plurality of heapdump files are generated during the executing the program under test, and

the coverage information is based upon the plurality of heapdump files.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 20, 2015
From: ZHENG, CHUNGUANG; ZHANG, ZHI
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 036381/0262 →
Priority Claims (1)
CN 2008 1 0212446 · Aug 26, 2008 · national
Continuity (3)
Continuation 13912954 · Jun 7, 2013
Continuation 12547262 · Aug 25, 2009
Related Publication 20150355999A1 · Dec 10, 2015