System and method for generating coverage reports for software unit tests

US9280442B1 · US · B1

Patent metadata
FieldValue
Publication numberUS-9280442-B1
Application numberUS-201113216401-A
CountryUS
Kind codeB1
Filing dateAug 24, 2011
Priority dateJan 27, 2011
Publication dateMar 8, 2016
Grant dateMar 8, 2016

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 unit test coverage report system and method may generate a coverage report to indicate the success or failure of current unit tests and the amount of further testing that is required to fully test an application undergoing development. The system or method may receive a source code file including a plurality of source code units, wherein each source code unit corresponds to one of a plurality of comments sections. The system or method may then parse the plurality of comments sections and extract an identification of each source code unit from the plurality of comments sections. The identification may then be compared to a list of tested source code units and the comparison added to a unit test coverage report.

First claim

Opening claim text (preview).

I claim: 1. A computer-implemented method for generating unit test coverage report, comprising: receiving a source code file including a plurality of source code units, wherein each source code unit of the plurality of source code units corresponds to one of a plurality of comments sections; parsing the plurality of comments sections; extracting to a first list, identification information for each source code unit from the corresponding comments section; extracting a unit description for each source code unit from the corresponding comments section, wherein at least one unit description from the comments section includes an executable portion of code; determining a function type corresponding to each unit description, wherein the function type is at least one of a function that establishes a value or a function that retrieves a value; automatically generating a set of unit tests for each source code unit based on the unit description within the corresponding comments section and the determined function type, wherein the set of unit tests includes at least one unit test based on the determined function type and a unit test that includes the executable portion of code, wherein generating the set of unit tests includes copying the unit description including the executable portion of code to a unit test stub corresponding to a source code unit type, and transforming each unit test stub into a corresponding one of a plurality of unit tests; and executing the set of unit tests, wherein executing the unit test that includes the executable portion of code includes executing the executable portion of code; generating a test result indication for each source code unit based on the execution of the set of unit tests, wherein the generated test result indication includes at least one of a pass result, fail result, and follow-up result; storing the test result indication and the identification information for each source code unit in a list of tested source code units; comparing the identification information for each source code unit in the first list to the list of tested source code units; and based on the comparing, adding the identification information for each source code unit and the test result indication for each source code unit to the unit test coverage report. 2. The computer-implemented method of claim 1 , wherein the unit test coverage report consisting of passed tested source code units indicates how many source code units within the tested source code units are covered by unit tests that pass. 3. The computer-implemented method of claim 1 , wherein each member of the list of tested source code units corresponds to a unit test for each of the plurality of source code units. 4. A non-transitory computer-readable medium storing instructions, the instructions when executed by a processor generate a unit test coverage report by causing the processor to: receive a source code file including a plurality of source code units, wherein each source code unit of the plurality of source code units corresponds to one of a plurality of comments sections; parse the plurality of comments sections; extract, to a first list, identification information for each source code unit from the corresponding comments section; extract a unit description for each source code unit from the corresponding comments section, wherein at least one unit description from the comments section includes an executable portion of code; determine a function type corresponding to each unit description, wherein the function type is at least one of a function that establishes a value or a function that retrieves a value; automatically generate a set of unit tests for each source code unit based on the unit description within the corresponding comments section and the determined function type, wherein the set of unit tests includes at least one unit test based on the determined function type a unit test that includes the executable portion of code, wherein generating a set of unit tests includes copying the unit description including the executable portion of code to a unit test stub corresponding to a source code unit, and transforming each unit test stub into a corresponding one of a plurality of unit tests; execute the set of unit tests, wherein the executable portion of code is executed; generate a test result indication for each source code unit based on the execution of the set of unit tests, wherein the generated test result indication includes at least one of a pass result, fail result, and follow-up result; store the test result indication and the identification information for each source code unit in a list of tested source code units; compare the identification information for each source code unit in the first list to the list of tested source code units; and based on the comparison of the identification information for each source code unit in the first list to the list of tested source code units, add the identification information for each source code unit and the test result indication for each source code unit to the unit test coverage report. 5. The non-transitory computer-readable medium of claim 4 , wherein the unit test coverage report indicates how many source code units within the tested source code units are covered by unit tests that pass. 6. The non-transitory computer-readable medium of claim 4 , wherein each member of the list of tested source code units corresponds to a unit test for each of the plurality of source code units. 7. A computer system for generating a unit test coverage report, the system comprising: a processor; and memory, wherein the memory includes instructions that when executed by the processor are operable to: store in a database a plurality of source code files, each source code file including a plurality of source code units, wherein each source code unit corresponds to one of a plurality of comments sections; extract a unit description for each source code unit from the corresponding comments section, where at least one unit description from the comments section includes an executable portion of code; determine a function type corresponding to each unit description, wherein the function type is at least one of a function that establishes a value or a function that retrieves a value; automatically generate a set of unit tests for each source code unit based on the unit description within the corresponding comments section and the determined function type, wherein the set of unit tests includes at least one unit test based on the determined function type and a unit test that includes the executable portion of code, wherein generating a set of unit tests includes copying the unit description including the executable portion of code to a unit test stub corresponding to a source code unit type, and transforming each unit test stub into a corresponding one of a plurality of unit tests; execute the set of unit tests; generate a test result indication for each source code unit based on the execution of the set of unit tests, wherein the generated test result indication includes at least one of a pass result, fail result, and follow-up result; store the test result indication and identification information for each source code unit in a list of tested source code units; read the plurality of comments sections; parse the plurality of comments sections; extract to a first list, the identification information of each source code unit from the corresponding comments section; compare the identification information for each source code unit in the first list to the list of tested source code units indicating a test result of each source code unit; and based on the comparison, add the test result indication to the unit test coverage report, w

Assignees

Inventors

Classifications

  • for test results analysis · CPC title

  • Environments for analysis, debugging or testing of software · CPC title

  • Software design · CPC title

  • Analysis of software for verifying properties of programs (testing of software G06F11/3668) · CPC title

  • Test management · 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 US9280442B1 cover?
A unit test coverage report system and method may generate a coverage report to indicate the success or failure of current unit tests and the amount of further testing that is required to fully test an application undergoing development. The system or method may receive a source code file including a plurality of source code units, wherein each source code unit corresponds to one of a plurality…
Who is the assignee on this patent?
Nicolo Simone, Trimble Navigation Ltd
What technology area does this patent fall under?
Primary CPC classification G06F11/3692. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 08 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B1). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).