Software testing
First Claim
1. A method of testing a program having statements, said method comprising the steps of:
- a) dividing said program into a plurality of groups such that every statement in the program belongs to at least one of the groups, wherein each of said groups contains a respective sequence of ones of the statements such that all the statements of such a group are executed if at least one statement of said group is executed, and wherein such a group is deemed to be executed if at least one of the statements of the group is executed when the program is executed;
b) determining the ones of the groups that are executed when said program is executed while testing said program;
c) indicating unexecuted ones of the groups based on the ones of the groups that were determined in step b) to have been executed;
d) enabling a tester to execute said unexecuted groups such that said tester can ensure that all statements in said program are executed at least once;
e) including an extra statement in each of said groups, wherein execution of such an extra statement enables said determining in step b) to identify an executed one of the groups corresponding to said extra statement, wherein said program is contained in a plurality of programs which in turn are contained in a class of an object oriented environment;
f) enabling said tester to define a macro containing a plurality of program lines;
storing said macro in a database; and
g) enabling said tester to execute said macro in the middle of testing said plurality of programs.
2 Assignments
0 Petitions
Accused Products
Abstract
A testing tool allowing convenient testing of programs and also classes in general. The tool automatically divides each program into many groups such that if one line (or statement) is executed it may reasonably be assumed that all the lines in the group are also executed. A tester is provided the ability to provide desired arguments (including class instances) and cause all groups to be executed such that all lines of code in the programs of a class are executed at least once. The groups are conveniently further logically combined into hierarchical blocks, with each block at a higher level corresponding to a logical structure such as if structure, for structure, while structure, etc. The blocks at the lowest level may contain a single group. Due to such hierarchy, a tester may visually easily identify the unexecuted blocks/groups. The tester may further define and execute small pieces of code (macros) in the middle of testing.
22 Citations
36 Claims
-
1. A method of testing a program having statements, said method comprising the steps of:
-
a) dividing said program into a plurality of groups such that every statement in the program belongs to at least one of the groups, wherein each of said groups contains a respective sequence of ones of the statements such that all the statements of such a group are executed if at least one statement of said group is executed, and wherein such a group is deemed to be executed if at least one of the statements of the group is executed when the program is executed; b) determining the ones of the groups that are executed when said program is executed while testing said program; c) indicating unexecuted ones of the groups based on the ones of the groups that were determined in step b) to have been executed; d) enabling a tester to execute said unexecuted groups such that said tester can ensure that all statements in said program are executed at least once; e) including an extra statement in each of said groups, wherein execution of such an extra statement enables said determining in step b) to identify an executed one of the groups corresponding to said extra statement, wherein said program is contained in a plurality of programs which in turn are contained in a class of an object oriented environment; f) enabling said tester to define a macro containing a plurality of program lines; storing said macro in a database; and g) enabling said tester to execute said macro in the middle of testing said plurality of programs. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A computer program product for use with a computer system, said computer program product comprising a computer usable medium having computer readable program code means embodied in said computer usable medium, said computer readable program code means enabling testing of a program having statements, said computer readable program code means comprising:
-
dividing means for dividing said program into a plurality of groups such that every statement in the program belongs to at least one of the groups, wherein each of said groups contains a respective sequence of ones of the statements such that all the statements of such a group are executed if at least one statement of said group is executed, and wherein such a group is deemed to be executed if at least one of the statements of the group is executed when the program is executed; determining means for determining the ones of the groups that are executed when said program is executed while testing said program; indicating means for indicating unexecuted ones of the groups based on said determining; first enabling means for enabling a tester to execute said unexecuted groups such that said tester can ensure that all statements in said program are executed at least once; means for including an extra statement in each of said groups, wherein execution of such an extra statement enables said determining means to identify an executed one of the groups corresponding to said extra statement, wherein said program is contained in a plurality of programs which in turn are contained in a class of an object oriented environment; second enabling means for enabling said tester to define a macro containing a plurality of pro gram lines; storing means for storing said macro; and third enabling means for enabling said tester to execute said macro in the middle of testing said plurality of programs. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A system enabling a tester to test a program having statements, said computer system comprising:
-
a random access memory (RAM); a display unit containing a display screen; an input interface; a processor dividing said program into a plurality of groups such that every statement in the program belongs to at least one of the groups, wherein each of said groups contains a respective sequence of ones of the statements such that all the statements of such a group are executed if at least one statement of said group is executed, and wherein such a group is deemed to be executed if at least one of the statements of the group is executed when the program is executed, said processor executing said program in response to instructions received from said input interface; said processor determining the ones of the groups that are executed when said program is executed; said processor causing a display to be generated on said display unit, said display indicating unexecuted ones of the groups based on the ones of the groups that were determined to have been executed; said processor enabling said tester to execute said unexecuted groups such that said tester can ensure that all statements in said program are executed at least once, wherein said processor includes an extra statement in each of said groups, wherein execution of such an extra statement enables said processor to identify an executed one of the groups corresponding to said extra; and wherein said computer system further comprises a secondary storage, wherein said processor stores said program including said extra statement on said secondary storage, wherein said program is contained in a plurality of programs which in turn are contained in a class of an object oriented environment, wherein said processor receives a plurality of program lines representing a macro, said processor storing said macro in a database, and said processor executing said macro in response to receiving an instruction to execute said macro. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
Specification