Abstract:
An apparatus for conducting a test for various functions in a device using test programs that are created based on test items includes a storage unit that stores program information that includes information on the test programs and commands necessary for executing the test programs, and command information that indicates whether the device supports the commands; and a determining unit that determines, based on the program information and the command information, whether the test can be conducted on the device using the test programs. The test is conducted on the device using the test programs when the determining unit determines that the test can be conducted.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1) Field of the Invention  
         [0002]     The present invention relates to a technology for conducting a test for various functions in a device.  
         [0003]     2) Description of the Related Art  
         [0004]     Conventionally, a test conducting apparatus has been devised to test various functions in a device. The test conducting apparatus checks the functions by executing commands on the device using a test program.  
         [0005]     However, if there is even a single command that is not supported by a target device to be tested in the commands, a process is halted during a test. In that case, cost and time, which is spent for calculation until the process is halted, are wasted, and efficiency of the test is low.  
         [0006]     To solve such problems of wasting the cost and the time, a system for automatically selecting test items is disclosed in Japanese Patent Application Laid-Open No. H1-295339. In the system, support status of each of commands in the target device is checked in advance, and only test programs that execute commands that are supported by the target device are selected to conduct a test.  
         [0007]     However, in the conventional technology, it is difficult to check all commands supported by the tested device, and the test programs cannot be efficiently executed.  
         [0008]     Because a number of test programs used in the test is voluminous, it is difficult to check the support status for commands of all the test programs. If the support status is not completely checked in a device, an inefficient test is conducted on the device.  
       SUMMARY OF THE INVENTION  
       [0009]     It is an object of the present invention to solve at least the above problems in the conventional technology.  
         [0010]     An apparatus for conducting a test for various functions in a device using test programs that are created based on test items according to one aspect of the present invention includes a storage unit that stores program information that includes information on the test programs and commands necessary for executing the test programs, and command information that indicates whether the device supports the commands; and a determining unit that determines, based on the program information and the command information, whether the test can be conducted on the device using the test programs, wherein the test is conducted on the device using the test programs when the determining unit determines that the test can be conducted.  
         [0011]     A method for conducting a test for various functions in a device using test programs that are created based on test items according to another aspect of the present invention includes retrieving program information that includes information on commands necessary for executing the test programs, and command information that indicates whether the device supports the commands, when the device is tested using the test programs; and determining, based on the test program information and the command information retrieved, whether the test can be conducted on the device. When the determining determines that the test can be conducted, the test is conducted on the device using the test programs.  
         [0012]     A computer program product according to still another aspect of the present invention realizes a method according to the above aspect.  
         [0013]     A computer-readable recording medium according to still another aspect of the present invention stores a computer program product for realizing a method according to the above aspect.  
         [0014]     The other objects, features, and advantages of the present invention are specifically set forth in or will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0015]      FIG. 1  is a block diagram of a test conducting apparatus according to an embodiment;  
         [0016]      FIG. 2  is a command support table;  
         [0017]      FIG. 3  is an explanatory diagram for explaining update of the command support table;  
         [0018]      FIG. 4  is a test item table; and  
         [0019]      FIG. 5  is a flowchart of a test conducting process.  
     
    
     DETAILED DESCRIPTION  
       [0020]     Exemplary embodiments of an apparatus and a method for conducting a test and a computer product will be explained in detail with reference to the accompanying drawings.  
         [0021]      FIG. 1  is a block diagram of the test conducting apparatus according to an embodiment. As shown in  FIG. 1 , a test conducting apparatus  100  is connected to an input device  200  such as a keyboard and a mouse. The test conducting apparatus  100  includes a target unit  110  that undergoes a test and a test unit  120 . The target unit  110  includes programs that are tested.  
         [0022]     The test unit  120  tests the programs in the target unit  110 . The test unit includes an interface unit  130 , a control device  140 , and a storage device  150 . The interface unit  130  is a processor that transmits/receives data to/from the target unit  110 .  
         [0023]     The control device  140  includes a table updating unit  140   a,  a test-item conducting unit  140   b,  and a determining unit  140   c.  The table updating unit  140   a  updates a command support table  150   a  that is stored in the storage device  150 .  
         [0024]      FIG. 2  is a command support table. As shown in  FIG. 2 , the command support table  150   a  includes information on a “command” and a “support”. The “command” represents instructions to make the target unit  110  execute a predetermined process, and the “support” represents support status of the target unit  110  for a predetermined command.  
         [0025]     A character “s” shown in a support column in  FIG. 2  indicates that the target unit  110  supports a command, a character “n” represents that the target unit  110  does not support a command, and a mark “?” indicates that whether the target unit  110  supports a command is unknown.  
         [0026]     For example, in the command support table  150   a  shown in  FIG. 2 , a support status for a command “A” is “s”, a support status for a command “B” is “n”, and a support status for a command “T” is “?”.  
         [0027]     The table updating unit  140   a  accepts initial setting information relating to the command support table  150   a  from the input device  200 . The table updating unit  140   a  initializes the command support table  150   a  based on the initial setting information. The initial setting information includes information on commands and support status for the commands.  
         [0028]     The table updating unit  140   a  receives, from the test-item conducting unit  140   b,  information on commands that are used in a test conducted and support status for the commands. The table updating unit  140   a  updates the command support table  150   a  based on the information received.  
         [0029]     For example, the command support table initialized is set as shown in a command support table  151  in  FIG. 3 . When the table updating unit  140   a  receives, from the test-item conducting unit  140   b,  information that a command “B” is not supported after, the table updating unit  140   a  updates a support status corresponding to the command “B” to “n” as shown in a command support table  152 .  
         [0030]     The test-item conducting unit  140   b  tests the target unit  110  based on a test item table  150   b  and the determining unit  140   c.    
         [0031]      FIG. 4  is a test item table. As shown in  FIG. 4 , the test item table  150   b  includes information on a “test item”, a “test program”, and a “necessary command”. The “test item” is for classifying the test programs, the “test program” is a program that is executed by the test-item conducting unit  140   b,  and the “necessary command” is a command that is necessary for conducting a test by a corresponding test program.  
         [0032]     For example, in the test item table  150   b  shown in  FIG. 4 , for a test item “test 1”, the test program is “TP1” and the necessary commands are “A and B”, and for a test item “test 2”, the test program is “TP2” and the necessary commands are “B and D”, and for a test item “test 3”, the test program is “TP3”, and the necessary commands are “A, C, and D”. The test-item conducting unit  140   b  conducts the test  1 , the test  2 , and the test  3  in this order.  
         [0033]     The test-item conducting unit  140   b  selects a test item from the test item table  150   b,  and inquires the determining unit  140   c  whether a test of the test item selected can be conducted on the target unit  110 .  
         [0034]     When the test-item conducting unit  140   b  receives, from the determining unit  140   c,  information that the test can be conducted, the test-item conducting unit  140   b  executes a test program that corresponds the test item to test the target unit  110 . After the test, the test-item conducting unit  140   b  notifies the table updating unit  140   a  of a support status of commands for the test program.  
         [0035]     When the test-item conducting unit  140   b  receives information that the test cannot be conducted from the determining unit  140   c,  it does not conduct the test related with the selected test item, but selects a next test item and inquires the determining unit  140   c  whether the test can be conducted.  
         [0036]     The determining unit  140   c  determines whether the test can be conducted based on the information received from the test-item conducting unit  140   b,  the command support table  150   a,  and the test item table  150   b.  The determining unit  140   c  notifies a result of the determination to the test-item conducting unit  140   b.    
         [0037]     The determining unit  140   c  receives information on the test item, for example, “test 1”, from the test-item conducting unit  140   b.  The determining unit  140   c  retrieves the commands “A and B” corresponding to the test item “test 1” based on the information received and the test item table  150   b.    
         [0038]     The determining unit  140   c  determines whether the target unit  110  supports the commands based on the command support table  150   a.  When the target unit  110  supports all the commands retrieved or when the support status is unknown, the determining unit  140   c  determines that the test can be conducted.  
         [0039]     On the other hand, when the commands retrieved include even a single command that is not supported by the target unit  110 , the determining unit  140   c  determines that the test cannot be conducted.  
         [0040]     For example, when the commands retrieved by the determining unit  140   c  are “A and B” and the command support table  150   a  is set as shown in  FIG. 2 , the support status for the command “A” is “s (supported)”, but the support status for the command “B” is “n (no supported)”. Therefore, the determining unit  140   c  determines that the test cannot be conducted.  
         [0041]     Since the determining unit  140   c  determines whether the test can be conducted and notifies a result of the determination to the test-item conducting unit  140   b  in advance of conducting the test, the test-item conducting unit  140   b  can test the target unit  110  efficiently.  
         [0042]      FIG. 5  is a flowchart of the test conducting process. The test-item conducting unit  140   b  selects a test item that is listed first in the test item table  150   b  (step S 101 ). The determining unit  140   c  determines whether the test item selected can be conducted (step S 102 ).  
         [0043]     When the determining unit  140   c  determines that the test item cannot be conducted (“NO” at step S 102 ), the test-item conducting unit  140   b  determines whether all the test items have been processed (step S 103 ). When not all the test items have been processed (“NO” at step S 103 ), the test-item conducting unit  140   b  selects a next test item (step S 104 ). When all the test items have been processed (“YES” at step S 103 ), the test conducting process is finished.  
         [0044]     On the other hand, when the determining unit  140   c  determines that the test item can be conducted (“YES” at step S 102 ), the test-item conducting unit  140   b  conducts the test item (step S 105 ). The test-item conducting unit  140   b  makes the table updating unit  140   a  update the command support table  150   a  (step S 106 ), and determines whether all the test items have been processed (step S 107 ).  
         [0045]     When not all the test items have been processed (“NO” at step S 107 ), the process proceeds to step S 104 , and when all the test items have been processed (“YES” at step S 107 ), the test conducting process is finished.  
         [0046]     The determining unit  140   c  determines whether the target unit  110  supports commands based on the command support table  150   a,  and when all the commands are supported, the determining unit  140   c  notifies that the test can be conducted to the test-item conducting unit  140   b.  Then, the test-item conducting unit  140   b  conducts a test on the target unit  110 . Therefore, in the apparatus  100  according to the present embodiment, it is possible to prevent from conducting a test in vain, and thus, a test can be efficiently conducted.  
         [0047]     Moreover, in the test conducting apparatus  100 , since the determining unit  140   c  conducts a test excluding test items that cannot be conducted, cost required for calculation for the test can be reduced.  
         [0048]     While in the present embodiment, a test is conducted on a target unit in a test conducting apparatus, it is not limited to this case, and the present invention can be applied similarly to an external device to be tested, by determining whether commands are supported by the external device, and by selecting test programs executable to test the external device.  
         [0049]     According to the present invention, it is possible to efficiently conduct a test eliminating time that is spent wastefully for calculation.  
         [0050]     According to the present invention, it is not necessary to check command conditions of a target device in advance of conducting a test, and thus, a load on a user can be reduced.  
         [0051]     Although the invention has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth.