Abstract:
The testing of a series of commands is enhanced using a multilevel approach that employs orthogonal arrays within orthogonal arrays. Specifically, an Orthogonal Array (OA) is applied within each operation and then re-applied across the different operations. Thus, the process initially applies an OA to an intra-operation covering the different combinations of command parameters associated with an operation. The process applies an OA to an inter-operations OA covering the combinations of all command parameters.

Description:
FIELD OF THE INVENTION 
     The invention relates to generating test cases to test a set of commands, and particularly relates to using orthogonal arrays to generate the test cases. 
     BACKGROUND OF THE INVENTION 
     One important aspect of testing a particular system function, e.g., a computer function, is the order in which a set of commands characterizing the function should be executed. For example, if the set is composed of I commands, i=1, 2, . . . , I, (Cmd, Cmd 2 , . . . , Cmd i ), then the number of different sequences of such commands would be equal to I factorials (I|). Any problem that may arise as a result of such testing could be compounded by the number of parameters associated with each command that will be executed. That is, if the number of such commands equals four (I=4) and each command has three (n i  =3) parameters (P ij ) in which each parameter may assume either of two settings (m ij  =2), then each command has 2**3=8 possible parameter combinations. Moreover, since there are four different commands, then the number of different command/parameter combinations equals 8**4=4,096. Also, considering that the four commands may provide different combinations of command scenarios, then there will be 4|*4096=98,304 different scenarios of commands, in which each command scenario represents a specific sequence of commands that may be executed with particular parameter settings. 
     It may be appreciated from the foregoing that it would be very time consuming and labor intensive to test each of the 98,304 command scenarios to determine which scenarios are the most effective. 
     SUMMARY OF THE INVENTION 
     The foregoing problem is dealt with using a multilevel approach that employs, in accord with an aspect of the invention, orthogonal arrays within orthogonal arrays. Specifically, we apply an Orthogonal Array (hereinafter, also OA) within each operation and then apply an OA across the different operations (commands). The process thus applies an OA to an intra-operation to obtain the different combinations of command parameters associated with an operation, and then applies an OA to an inter-operations process covering the combinations of all command parameters. 
     This and other aspects of the invention will become apparent from the following detailed description and drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the drawing: 
     FIG. 1 illustrates the use of orthogonal arrays at a first level operation (intra-operation) in the generating of a reduced set of command sequences; 
     FIG. 2 is an example of one example of an orthogonal array that may be used in the inter-operation of generating a reduced set of command sequences; 
     FIG. 3 is an example of employing the orthogonal arrays of FIG. 1 in the orthogonal array of FIG. 2; 
     FIG. 4 shows a computer system in which the principles of the invention may be practiced; 
     FIG. 5 illustrates one way in which a user may enter commands in the system of FIG. 4; 
     FIG. 6 illustrates the command sequences that are generated, in accord with the principles of invention, for a particular set of commands each having a predetermined number of parameters; and 
     FIGS. 7 and 8 illustrate in flow chart form the program which implements the principles of the invention in the system of FIG. 4. 
    
    
     DETAILED DESCRIPTION 
     An illustrative embodiment of the claimed invention will be discussed in the context of an arbitrary set of commands Cmd 1 , Cmd 2 , Cmd 3  and Cmd 4  respectively corresponding to a particular function, for example, a telecommunications network operations system function such as alarm monitoring, including alarm alerting, alarm processing and retrieving archived alarms, etc. However, it is to be understood that the invention is equally applicable to a case involving a different function characterized by either more or less commands as it will be readily appreciated from the following. 
     Accordingly, for each command Cmd i  having n i  number of parameters, with each parameter, P ij , taking on mij settings (or levels), an orthogonal array may be specified to generate an appropriate number of test cases that cover the different combinations of parameters associated with a particular Cmd i . For example, if n i  =3 (i.e., 3 parameters), and m ij  =2 (i.e., each parameter has 2 settings), then the well-known L 4  (2 3 ) orthogonal array may be selected in a conventional manner to specify four different parameter combinations for Cmd i  as shown, for example, for array 25-1 in FIG. 1. Assuming for the sake of clarity and simplicity that the same number of parameters and settings (e.g., 3, 2) are applicable to the four parameter combinations, then the L 4  array may be used to generate operational profiles for each of the four operations which is defined herein as an intra-operation application, as shown in FIG. 1, since it relates to the derivation of parameter combinations for individual commands. 
     It is seen from the FIG. that OAs 25-1 through 25-4 are identical, which is the result of assuming that each command has the same number of parameters and settings. It is also seen from that FIG. that Cmd 1  through Cmd 4  each have 4 parameter combinations resulting from their OAs. In FIG. 1, each row of the intra-command OA maps to a specific parameter settings associated with Cmd i . 
     Following the completion of the foregoing intra-command process, an inter-command process is invoked to select an Orthogonal Array (OA) to generate so-called inter-command combinations (i.e., different combinations of command parameter combinations). Thus, the results of applying OAs during the intra-command process are used to specify the OA during the inter-command process. 
     To apply an OA to inter-commands, a system function is defined by I commands, i=1,2, . . . , I, such that each Cmd i  corresponds to a parameter, P i , with m i  distinct levels, reflecting different command parameter combinations. These m i  parameter combinations for Cmd i  come from the rows of each Cmd i  &#39;s intraoperation OA as illustrated in FIG. 1. In the above illustrative example with I=4 commands, OAs 25-1 through 25-4 indicate m i  =4 intra-command parameter combinations for all I=4 commands. Then, as shown by way of FIG. 2, a single inter-command OA, a so-called L 16  (4 5 ) OA, is selected, in a conventional manner, to specify all pairwise combinations of factor settings for 4 factors (commands Cmd 1 , Cmd 2 , Cmd 3  Cmd 4 ) with 4 levels each. This L 16  (4 5 ) inter-command OA indicates 16 different combinations of command parameter combination may be obtained as illustrated in FIG. 3. (Note that although this L 16  (4 5 ) array supports more than the needed number of parameters (i.e., it includes more columns than needed, the unneeded columns may be removed from the array, and, as is well-known, the array will still continue to be an Orthogonal Array.) In particular, FIG. 3 illustrates that the testing of an illustrative operations system functionality (e.g., alarm monitoring) may be reduced from 4096 tests to 16 tests. 
     Although the foregoing appears to be somewhat complex, all that a user needs to do to achieve similar results is to identify the (a) commands that need to be tested, (b) number of parameters associated with each such command and (c) number of levels of each such parameter and then supply the identified information to the system of FIG. 4. 
     Turning then to FIG. 4, computer 10 is arranged to automatically select the appropriate orthogonal arrays for the test information that a user enters via terminal keyboard 15. Computer 10 then generates the command permutations and applies the permutation to the contents of the orthogonal array selected for the inter-operation process to identify/output the most effective command scenarios. In an illustrative embodiment of the invention, computer 10 may be, for example, the HP 9000/860 computer available from the Hewlett-Packard company and operating under the well-known UNIX operating system. Alternatively, computer 10 may be a personal computer or a workstation. 
     To enter the identified commands, the user first invokes a command processing tool which runs on computer 10. The user may do this by entering via keyboard 15 a command identifying the tool, the command being, for example, OATS (i.e., Orthogonal Array Test System). The user may then proceed to enter (a) each command that will form the various scenarios, (b) the parameters associated with the entered command, and (c) the levels for each such parameter, as shown in FIG. 5 for the above case of four commands. 
     Specifically, the user enters the term &#34;command&#34; followed by a &#34;carriage return&#34;. At the next prompt, the user enters a &#34;tab&#34; (represented by the solid line) followed by &#34;name&#34; followed by a &#34;tab&#34; and then by the name of the command. The user then enters a carriage return. At the next prompt (&gt;) the user identifies the command type by entering a &#34;tab&#34; and then the word &#34;type&#34; followed by another &#34;tab&#34; and then the word &#34;main&#34; to identify the command type. The user then enters a &#34;carriage return&#34; to then specify the parameters for the identified command at the next prompt. The user does this by entering the term &#34;parameter&#34; followed by a &#34;carriage return&#34;. The user then enters a &#34;tab&#34; at the next prompt followed by the word &#34;name&#34;. The user then enters another &#34;tab&#34; and then the name of the command parameter followed by &#34;carriage return&#34;, as shown for first parameter associated with Cmd 1 . The user then enters the order and levels associated with the identified parameter. As mentioned above, it is assumed that each such parameter has two levels of values at each level. 
     In particular, at the next prompt, the user enters a &#34;tab&#34; followed by the word &#34;order&#34; followed by another &#34;tab&#34; and then a numeral, e.g., a one, to denote the command&#39;s jth parameter number, as shown in the FIG. The user then enters by a &#34;carriage return&#34;. At the next prompt, the user enters a &#34;tab&#34;, then the word &#34;levels&#34; and then a &#34;carriage return&#34;. At the next prompt, and for the first level, the user enters a &#34;tab&#34; followed by another &#34;tab&#34; followed by the first value of the level (starting at &#34;0&#34;) followed by a tab followed by the second value (a one) for the specified level. The user then enters a &#34;carriage return&#34; to complete the entering of the first parameter associated with the first command. The user proceeds in a similar manner to enter the remaining parameters associated with the first command and to enter the remaining commands and their associated parameters and parameter levels, as represented in the FIG. for the entries for Cmd 4 . 
     Next consider the problem in which command scenarios (permutations) need to be selected for the commands whose command parameter combinations are specified by the intra-operation OAs illustrated in FIG. 1. That is, for I commands, there is a need to select (identify) the least number of command permutations that cover all possible contiguous pairs of commands. For example, if there were only one command, Cmd 1 , then there are no command pairs and the only command scenario would also be (Cmd 1 ). Additionally, if there were only two commands, Cmd.sub. 1 and Cmd 2 , then the only command pairs (and the only command scenarios) would be (Cmd 1 , Cmd 2 ), and (Cmd 2 , Cmd 1 ). In all other cases, there will be an even number of command permutations based on the number of commands (either I or I+1). Therefore, if there are four commands, Cmd 1 , Cmd 2 , Cmd.sub. 3 and Cmd 4  (as noted above), then there will also be four command permutations. These permutations must cover all possible command pairs, as shown by the following combinations. 
     (Cmd 1  Cmd 2 ) (Cmd 2  Cmd 3 ) (Cmd 3  Cmd 4 ) (Cmd 4  Cmd 1 ) 
     (Cmd 1  Cmd 3 ) (Cmd 2  Cmd 4 ) (Cmd 3  Cmd 1 ) (Cmd 4  Cmd 2 ) 
     (Cmd 1  Cmd 4 ) (Cmd 2  Cmd 1 ) (Cmd 3  Cmd 2 ) (Cmd 4  Cmd 3 ) 
     Since the first permutation will simply be: 
     (Cmd 1  Cmd 2  Cmd 3  Cmd 4 ) 
     then the second permutation is obtained by splitting the first permutation into two halves, as follows: 
     (Cmd 1  Cmd 2 ) (Cmd 3  Cmd 4 ) 
     Commands are then alternately selected from each half of the above, starting with the last command in each half and working backwards as follows: 
     (Cmd 2  Cmd 4  Cmd 1  Cmd 3 ) 
     This process is continued until the following four permutations are constructed: 
     (Cmd 1  Cmd 2  Cmd 3  Cmd 4 ) 
     (Cmd 2  Cmd 4  Cmd 1  Cmd 3 ) 
     (Cmd 4  Cmd 3  Cmd 2  Cmd 1 ) 
     (Cmd 3  Cmd 1  Cmd 4  Cmd 2 ) 
     Note that, when there are only three commands, the same set of four command permutations would be created. However, since the fourth command in the permutations would not exist, it is ignored, ostensibly yielding a set of command permutations that would be viewed as follows: 
     (Cmd 1  Cmd 2  Cmd 3 ) 
     (Cmd 2  Cmd 1  Cmd 3 ) 
     (Cmd 3  Cmd 2  Cmd 1 ) 
     (Cmd 3  Cmd 1  Cmd 2 ) 
     which covers the following possible command pairs: 
     (Cmd 1  Cmd 2 ) (Cmd 2  Cmd 3 ) (Cmd 3  Cmd 1 ) 
     (Cmd 1  Cmd 3 ) (Cmd 2  Cmd 1 ) (Cmd 3  Cmd 2 ) 
     The final step in the overall process is to apply the command permutations to the selected inter-command orthogonal array to effectively reduce the number of command scenarios that need to be tested, and thus greatly increase the efficiency of the testing procedure. The resulting command scenarios are shown in FIG. 6 and are generated by applying each of the above four command permutations to each row or combination of command parameter combinations specified by the inter-command OA shown in FIG. 3. For example, it is seen from the illustrative example of FIG. 6, that test case 1 includes four scenarios respectively formed from the contents of row 1 of OA 50 and each of the four permutations. Similarly, test case 2 also includes four scenarios respectively formed from the contents of row 2 of OA 50 and each of the four permutations, and so on for rows 3 through 15 and ending in test case 16 which similarly includes four scenarios respectively formed from the contents of row 16 of OA 50 and each of the four permutations. 
     Once the user has completed the foregoing, computer 10, in accord with the program that implements the inventive tool therein (discussed below), parses the user&#39;s input and converts it into an internal representation suitable for determining which of a plurality of OAs forming a library is most optimally suited for generating the reduced set of command scenarios (sequences). Selection of optimal OA may be done in accord with the teaching of U.S. Pat. No. 5,159,600 issued Oct. 27, 1992 to A. P. Chintapalli et al, which is incorporated herein by reference. Computer 10, using the entered commands, associated parameter names as well as the level specified for those parameters assigns factors to the selected OAs. The computer 10 tool, then, in the manner discussed above, (a) generates a reduced set of command permutations satisfying the contiguous pairwise property, (b) generates the parameter combinations for each individual command based on a selected intra-operation OA, (c) redefines the number of levels (settings) for each command equal to the number of parameter combinations generated by the intra-command OA for that command, and (d) during the inter-command process, applies a final OA to generate combinations of command parameter combinations. For each commands (command scenarios) are also indicated. This is illustrated in FIG. 4 which shows the reduced set of command scenarios that the computer 10 tool generates and outputs for display on display 20, as discussed above. 
     The program which implements the principles of the invention in computer 10 is illustrated in FIG. 7. Specifically, the program is entered responsive to the user having entered a list of commands, parameters for each command and the number of levels for each such parameter. The program (block 602) obtains the list and then (block 602) generates, in the manner discussed above, the minimum set of J command permutations that cover all possible contiguous command pairs. The program (block 603) then sets a variable i to a value of one and then enters a loop to perform the intra-command process. In particular, for each command in the list, the program (block 604) selects, in a conventional manner, an intra-command OA for the command to generate a minimum set of command i parameter combinations that cover, in a pairwise fashion, combinations of the parameters for that command, i.e., command I. The program (block 605) increments the variable i and then (block 606) checks to see if it has completed the intra-command process for all of the entered commands. If not, then the program processes the next command (block 604). If so, then the program (block 607) begins the inter-command processing. Specifically, the program (block 607) selects, in a conventional manner, an OA that may be used to generate the minimal number, K, of combinations of command parameter combinations that provide pairwise coverage of the parameter combinations settings selected for the entered commands. 
     Following the foregoing, for each combination of commands parameter combinations specified by the inter-command OA, the program applies each permutation of commands. The program (block 608) then sets each of the variables k and j to a value of one and then begins (blocks 609, 610, 611 and 612) combining each of the j permutations with a particular (row) combination of command parameter combinations specified by the inter-command OA. In doing so, the program outputs (e.g., FIG. 4) each such result (block 610) and then increments j (block 611). The program continues forming such combinations until the value of j exceed the value of J (block 612). At that point, the program (block 613) increments k and initializes j, and returns to forming the next combination (row) of command parameter combinations with each permutation j if the value of k does not exceed K (block 614). Otherwise, the program exits (block 615) as a result of having completed its task. 
     An expanded version of block 602 is illustrated in FIG. 8. Specifically, the minimum number of command permutations, J, is determined (block 801). If the number of commands, I, is an even number, or is equal to one, then the number of command permutations, J, will be equal to I. Otherwise, J will equal I+1. The program then sets the first permutation to the ascending sequence of integers starting with one and ending with J (block 802). If there is only one command permutation (block 803), then the program proceeds to block 603. Otherwise, if there are only two command permutations (block 804), then the program sets the second permutation to the descending sequence of integers starting with two and ending with one (block 805), and then exits by proceeding to block 603. 
     In all other cases, the program iterates over the command permutations one at a time starting with the second permutation, j=2 (blocks 806 through 812). Each of these command permutations contains an even number of integers and is generated from the previous command permutation. Within each command permutation, the program iterates over the elements of the permutation two at a time starting with the first two elements, p=2 (blocks 807 through 810). The first element of the second permutation is set to the value of the last element of the first half of the first permutation, whereas the second element of the second permutation is set to the value of the last element of the second half of the first permutation (block 808). The program proceeds to the next two elements in the permutation, p=4 (block 809) since J is not less than four (block 810). The third element of the second permutation is set to the value of the next-to-last element of the first half of the first permutation, whereas the fourth element of the second permutation is set to the value of the next-to-last element of the second half of the first permutation (block 808 again). This iteration over elements continues until the second permutation is completed. At this point, p is incremented by two (block 809) and is now greater than J (block 810). The program proceeds to the third command permutation, j=3 (block 811). Each ensuing permutation is constructed in the same manner as the second permutation. Once the last permutation is built, j is incremented by one (block 811) and is now greater than J (block 812). The program then exits to block 603. 
     The foregoing is merely illustrative of the principles of the invention. Those skilled in the art will be able to devise numerous arrangements, which, although not explicitly shown or described herein, nevertheless embody those principles that are within the spirit and scope of the invention.