Browse Prior Art Database

Automatic Unit Text Matrix Generation

IP.com Disclosure Number: IPCOM000112736D
Original Publication Date: 1994-Jun-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 34K

Publishing Venue

IBM

Related People

Sheffield, DW: AUTHOR

Abstract

Disclosed is a method for automatic unit test matrix generation and unit test tracking using the source code under test.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 93% of the total text.

Automatic Unit Text Matrix Generation

      Disclosed is a method for automatic unit test matrix generation
and unit test tracking using the source code under test.

      The goal of unit test is to test some percentage (a
predetermined target) of all of a program's code paths.  There are
various tools available for measuring the code coverage as tests are
executed.  What is missing is automatic generation of the unit test
matrix itself.

      This method embeds the unit test matrix within the source code,
using comments.  Each line of the matrix begins with a special
character sequence so the matrix can be easily separated from the
source code to create a separate test matrix.  As tests are executed,
each line of the matrix that is executed is marked as such.  This
provides not only an indication of how many paths were executed by a
given test, but also which specific paths.  As the matrix is updated
during all testing, it will be clear which paths have not been
tested, and therefore what additional tests are needed to reach the
target percentage of code coverage.

      For some code, such as kernel routines or device drivers, many
code paths can not be tested by automatic tests.  To execute these
paths requires manual intervention with a symbolic or low-level
kernel debugger.  Executing these paths may halt the machine.  This
sort of behavior prevents automatic tracking of the code coverage.
With the test matrix embedded in the source code, the...