Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Method for determining code coverage of an application

IP.com Disclosure Number: IPCOM000217053D
Publication Date: 2012-Apr-30
Document File: 3 page(s) / 62K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed are a system and method for code coverage capture in places where instrumented programs are too slow. This invention uses a debugger to capture code coverage information, and then the debugger removes itself for statements that are already executed.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 01 of 3

Method for determining code coverage of an application

Software testing is an important aspect of application development. One metric that helps to determine the effectiveness of testing is a measure of how much of the application or program code the testers actually executed during the test runs. Most code coverage tools require instrumentation of the program executable. The process of instrumentation involves the insertion of a call (either internal or external) at each statement in the user's program. During the execution of the program, the inserted calls record the user's executed statements. Testers can perform instrumentation either by inserting call statements in the program's source or by inserting machine instructions in the executable.

Most code coverage tools gather the information recorded by the instrumented calls to generate a report that includes statistics on percentage of statements executed vs. not executed. There are several drawbacks to the instrumentation approach:


• Instrumentation involves modifying the user's program by either the source or the executable


• The program built to run code coverage testing cannot be shipped to customers. This implies that a special build is required to gather code coverage statistics.


• Instrumentation can add significant overhead to the execution of the program limiting where instrumented programs can be used


• The problem of overhead is especially acute where program code is executed many times; the instrumented repeat-execute, adding to the overhead.

The approach outlined in this invention allows code coverage capture in places where instrumented programs are too slow. One example is nightly testing where hundreds of thousands of repetitive test cases run and cannot finish in a timely manner with instrumented code coverage programs.

This invention describes:


• The use of a debugger to capture code coverage information


• The method a debugger uses to capture code coverage information and then remove itself for statements that are already executed

The advantage of this invention over previous approaches is that the program does not require modification to capture code coverage information. The...