Software testing by groups
First Claim
1. A method of testing a program having statements, said method comprising:
- 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 the ones of the groups that are executed when said program is executed while testing said program;
indicating unexecuted ones of the groups based on the ones of the groups that were determined in to have been executed in determining the ones of the groups that are executed when said program is executed while testing said program;
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; and
inserting an extra statement in each of said groups, wherein execution of such an extra statement enables to identifying an executed one of the groups corresponding to said extra statement in the ones of the groups that are executed when said program is executed while testing said program.
1 Assignment
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.
16 Citations
20 Claims
-
1. A method of testing a program having statements, said method comprising:
-
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 the ones of the groups that are executed when said program is executed while testing said program; indicating unexecuted ones of the groups based on the ones of the groups that were determined in to have been executed in determining the ones of the groups that are executed when said program is executed while testing said program; 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; and inserting an extra statement in each of said groups, wherein execution of such an extra statement enables to identifying an executed one of the groups corresponding to said extra statement in the ones of the groups that are executed when said program is executed while testing said program. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer system comprising:
-
a processor; and a storage device connected to the processor, wherein the storage device has stored thereon a testing program for controlling the processor, and wherein the processor is operative to execute instructions of the program to implement a method comprising; 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 to have been executed in determining the ones of the groups that are executed when said program is executed while testing said program; 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; and e) inserting an extra statement in each of said groups, wherein execution of such an extra statement enables identifying an executed one of the groups corresponding to said extra statement in determining the ones of the groups that are executed when said program is executed while testing said program. - View Dependent Claims (8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 20)
-
-
14. A computer program product, stored on a computer readable medium, for testing a target program, the computer program product having instructions for execution by a computer, wherein the instructions, when executed by the computer, cause the computer to implement a method comprising:
-
dividing said target program into a plurality of groups such that every statement in the target 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 target program is executed; determining the ones of the groups that are executed when said target program is executed while testing said target program; indicating unexecuted ones of the groups based on the ones of the groups that were determined to have been executed in determining the ones of the groups that are executed when said target program is executed while testing said target program; enabling a tester to execute said unexecuted groups such that said tester can ensure that all statements in said target program are executed at least once; and inserting an extra statement in each of said groups, wherein execution of such an extra statement enables identifying an executed one of the groups corresponding to said extra statement in determining the ones of the groups that are executed when said target program is executed while testing said target program.
-
-
19. The computer program product of 11, wherein the method implemented by the computer executing the instructions of the computer program product comprises:
-
enabling said tester to instantiate said instance of said object; enabling said tester to assign a name to said instance and enter said name to provide said instance as an argument value.
-
Specification