System for determining the code coverage of a tested program based upon static and dynamic analysis recordings
First Claim
1. A method of measuring the ratio between the number of functions executed in a computer program during testing of said computer program with a test program, and the total number of functions in said program to be tested, comprising:
- executing said test program in said computer where said number of functions are executed;
determining from each instruction address of said computer program which is called for during execution of said test program a dynamic instruction flow indicator pattern, based on the address of a current and previous executed instruction, said pattern identifying;
(a) no branch instruction, NBR;
(b) branch instruction, BR;
(c) sequential instruction, SE;
(d) non-sequential instruction, NSE;
logging said dynamic instruction flow indicator patterns as they are developed in a logging device, each pattern representing an address of an instruction which produced said pattern;
determining a static instruction flow indicator pattern for each called instruction during testing from an operational code of said called instruction, said static instruction flow indicator pattern indicating whether said instruction is;
(a) no branch instruction, NBR;
(b) branch instruction, BR;
(c) instruction reached by an internal entry (ILBL);
(d) instruction reached by an external entry (ELBL); and
comparing said static instruction flow indicator pattern with said dynamic instruction flow indicator pattern to determine a portion of all instructions of said computer program which have been tested.
1 Assignment
0 Petitions
Accused Products
Abstract
System for analyzing programs by measuring the degree of code coverage of a program being tested during specific test phases. A correlation and comparison of results obtained from both a static and dynamic analysis recording is made. The introduction of a static and dynamic instruction flow indicator permits a determination of the test cover results by correlating the data of the static and dynamic instruction flow indicators. Thus, the number of untested functions can be determined during a test phase of a computer program before sending the data processing system to the field.
-
Citations
9 Claims
-
1. A method of measuring the ratio between the number of functions executed in a computer program during testing of said computer program with a test program, and the total number of functions in said program to be tested, comprising:
-
executing said test program in said computer where said number of functions are executed; determining from each instruction address of said computer program which is called for during execution of said test program a dynamic instruction flow indicator pattern, based on the address of a current and previous executed instruction, said pattern identifying; (a) no branch instruction, NBR; (b) branch instruction, BR; (c) sequential instruction, SE; (d) non-sequential instruction, NSE; logging said dynamic instruction flow indicator patterns as they are developed in a logging device, each pattern representing an address of an instruction which produced said pattern; determining a static instruction flow indicator pattern for each called instruction during testing from an operational code of said called instruction, said static instruction flow indicator pattern indicating whether said instruction is; (a) no branch instruction, NBR; (b) branch instruction, BR; (c) instruction reached by an internal entry (ILBL); (d) instruction reached by an external entry (ELBL); and comparing said static instruction flow indicator pattern with said dynamic instruction flow indicator pattern to determine a portion of all instructions of said computer program which have been tested. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A device for generating a dynamic instruction flow indicator pattern comprising:
-
a dynamic instruction flow indicator connected to an instruction address line, and to a clock line of a computer being run by a computer program being tested, said indicator comprising; a first register for storing a current instruction address of said computer program being tested; a second register, serially connected with said first register, for storing a previous instruction address of said computer program being tested; means connected to said clock line for generating first and second clock signals, said first clock signal transferring the contents of said first register to said second register, and said second clock signal which is delayed with respect to said first clock signal transferring the instruction address from said address line to said first register; a difference circuit connected to said first and second registers which generates a difference signal representative of whether said current and previous instructions are a no branch instruction (NBR) or a branch instruction (BR); a third register connected to said difference circuit and controlled by a third clock signal which is delayed from said first clock signal for generating binary signals NBR and BR, wherein NBR=1 and BR=0, when said difference signal indicates a NO BRANCH instruction, and NBR=0 and BR=1 when said difference signal indicates a BRANCH instruction; and
,a fourth register controlled by said first clock signal and receiving said binary NBR and binary BR signals, said fourth register generating additional binary signals SE and NSE, said binary signal SE=1 and NSE=0 when signal BR=1, and said signals SE=0 and NSE=1 when said signal NBR=1, whereby the binary signal value of NBR, BR, SE, and NSE constitute a dynamic instruction flow indicator pattern. - View Dependent Claims (9)
-
Specification