Predictive test case coverage

US11487645B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11487645-B2
Application numberUS-202017121665-A
CountryUS
Kind codeB2
Filing dateDec 14, 2020
Priority dateDec 14, 2020
Publication dateNov 1, 2022
Grant dateNov 1, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A code base is parsed to identify methods having changes in a code base since a last code commit. Thereafter, a call graph is traversed to identify test cases implicated by the identified methods having changes in the code base. The call graph can be a directed call graph comprising a plurality of connected nodes in which a first subset of the connected nodes are method nodes representing each method in the code base in which unidirectional edges connecting method nodes correspond to invocations by a calling method to a callee method, and in which a second subset of the connected nodes are test case nodes representing each of a plurality of available test cases to test the code base. The test case nodes are each coupled to one or more method nodes by unidirectional edges that correspond to the test case coverage of the method.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method comprising: parsing a code base to identify methods having changes in a code base since a last code commit; traversing a single call graph of connected nodes representing control flow relationships amongst each of the methods in the code base to identify a minimum number of test cases, wherein the minimum number of test cases are only those test cases that are implicated by the identified methods having changes in the code base; causing data characterizing the identified minimum number of test cases to be displayed in a graphical user interface; and executing the identified minimum number of test cases; wherein: the single call graph is a directed call graph comprising a plurality of connected nodes; a first subset of the connected nodes are method nodes representing each method in the code base in which unidirectional edges connecting method nodes correspond to invocations by a calling method to a callee method; a second subset of the connected nodes are test case nodes representing each of a plurality of available test cases to test the code base, the test case nodes are each coupled to one or more method nodes, of the first subset, by unidirectional edges that correspond to coverage of the method by the test case corresponding to the connected test case node; the single call graph is traversed from each method node corresponding to the identified methods changed in the code base to identify test cases covering such methods. 2. The method of claim 1 , further comprising: providing data characterizing the identified minimum number of test cases, wherein the providing data characterizing the identified minimum number of test cases comprises: loading the data characterizing the identified minimum number of test cases into memory, storing data characterizing the identified minimum number of test cases in physical persistence, or transmitting the data characterizing the identified minimum number of test cases to a remote computing device. 3. The method of claim 1 , wherein the single call graph is stored in a graph database, and the method further comprises: polling the graph database to obtain the single call graph prior to the traversing. 4. The method of claim 1 further comprising: accessing a code repository storing the code base prior to the parsing. 5. The method of claim 1 , wherein the parsing comprises: generating a first abstract syntax tree representation of the code base at the time of the last code commit; generating a second abstract syntax tree representation of the code base including the changes since the last code commit; and comparing the first abstract syntax tree representation of the code to the second abstract syntax tree representation of the code. 6. The method of claim 1 , wherein the parsing comprising: comparing source code of the code base at the time of the commit to the source code of the code base after the changes. 7. The method of claim 1 , wherein the parsing comprises: analyzing a subsequent commit sent to the code repository characterizing changes to the code base since the last commit. 8. The method of claim 7 , wherein the subsequent commit comprises which methods were changed since the last commit. 9. The method of claim 1 , wherein the identified minimum number of test cases are displayed in the graphical user interface as recommended test cases to be executed. 10. The method of claim 1 , wherein identifying the minimum number of test cases comprises identifying that a first test case, of the plurality of available test cases, and a second test case, of the plurality of available test cases, are implicated by the identified methods having changes in the code base, and wherein executing the identified minimum number of test cases comprises executing the identified first test case and the identified second test case. 11. A system comprising: at least one data processor; and memory storing instructions which, when executed by the at least one data processor, result in operations comprising: parsing a code base to identify methods having changes in a code base since a last code commit; traversing a single call graph of connected nodes representing control flow relationships amongst each of the methods in the code base to identify a minimum number of test cases, wherein the minimum number of test cases are only those test cases that are implicated by the identified methods having changes in the code base; causing data characterizing the identified minimum number of test cases to be displayed in a graphical user interface; and executing the identified minimum number of test cases; wherein: the single call graph is a directed call graph comprising a plurality of connected nodes; a first subset of the connected nodes are method nodes representing each method in the code base in which unidirectional edges connecting method nodes correspond to invocations by a calling method to a callee method; a second subset of the connected nodes are test case nodes representing each of a plurality of available test cases to test the code base, the test case nodes are each coupled to one or more method nodes, of the first subset, by unidirectional edges that correspond to coverage of the method by the test case corresponding to the connected test case node; the single call graph is traversed from each method node corresponding to the identified methods changed in the code base to identify test cases covering such methods. 12. The system of claim 11 , the operations further comprising: providing data characterizing the identified minimum number of test cases, wherein the providing data characterizing the identified minimum number of test cases comprises: loading the data characterizing the identified minimum number of test cases into memory, storing data characterizing the identified minimum number of test cases in physical persistence, or transmitting the data characterizing the identified minimum number of test cases to a remote computing device. 13. The system of claim 11 , wherein the single call graph is stored in a graph database, and the operations further comprise: polling the graph database to obtain the single call graph prior to the traversing. 14. The system of claim 11 , wherein the parsing comprises: generating a first abstract syntax tree representation of the code base at the time of the last code commit; generating a second abstract syntax tree representation of the code base including the changes since the last code commit; and comparing the first abstract syntax tree representation of the code to the second abstract syntax tree representation of the code. 15. The system of claim 11 , wherein the parsing comprising: comparing source code of the code base at the time of the commit to the source code of the code base after the changes. 16. The system of claim 11 , wherein the parsing comprises: analyzing a subsequent commit sent to the code repository characterizing changes to the code base since the last commit. 17. The system of claim 16 , wherein the subsequent commit comprises which methods were changed since the last commit. 18. The system of claim 11 , wherein the identified minimum number of test cases are displayed in the graphical user interface as recommended test cases to be executed. 19. A non-transitory computer program product storing instructions which, when executed by the at least one computing device, result in operations comprising: parsing a code base to identify methods having c

Assignees

Inventors

Classifications

  • Structural analysis for program understanding · CPC title

  • G06F11/368Primary

    for test version control, e.g. updating test cases to a new software version · CPC title

  • for test execution, e.g. scheduling of test suites · CPC title

  • Version control (security arrangements therefor G06F21/57); Configuration management · CPC title

  • Internal representations for queries · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11487645B2 cover?
A code base is parsed to identify methods having changes in a code base since a last code commit. Thereafter, a call graph is traversed to identify test cases implicated by the identified methods having changes in the code base. The call graph can be a directed call graph comprising a plurality of connected nodes in which a first subset of the connected nodes are method nodes representing each …
Who is the assignee on this patent?
Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F11/368. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 01 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 5 related publications on this page (citations in our corpus or others sharing the same primary CPC).