Abstract:
A method for automatically simulating manual testing of a computer after the computer is powered on includes the steps of: (a) connecting the computer to an external storage device having a script recorded thereon that corresponds to a manual testing operation; and (b) after the computer is powered on, enabling the computer to access the script of the external storage device for performing the manual testing operation. By providing automatic simulation of manual testing of a computer after the computer is powered on, time and labor costs incurred in a conventional method of manually inputting instructions required for the manual testing operation in the computer are saved.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application claims priority of Taiwanese application no. 097120925, filed on Jun. 5, 2008. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    This invention relates to a self-testing method for a computer and a device used for performing the method, more particularly to a method for automatically simulating manual testing of a computer after the computer is powered on, a testing system, and an external storage device used for performing the method. 
         [0004]    2. Description of the Related Art 
         [0005]    Before a new computer leaves the factory, there is often a need to perform a series of hardware, software, and/or firmware tests in order to ensure quality. Firmware testing, in particular, frequently calls for a manual testing operation in which instructions must be manually input in each computer. Clearly, the manual testing operation is time consuming and impedes efficient computer production. Moreover, it is difficult to ascertain completeness of the manual testing operation. The aforesaid drawbacks of the manual testing operation also impact computer repair. If, for example, firmware in a number of computers has a similar problem, the manual testing operation impedes rapid testing and repair. In addition, conventional WISE or ICE testing devices, commonly used for testing individual computers in a laboratory setting, are costly, and are moreover incapable of performing testing on a large volume of computers. 
         [0006]    The aforesaid drawbacks have not been adequately addressed by current computer testing technologies. For example, in Taiwanese Patent Application No. 93139762, use of a computer to detect automatically an error of a peripheral device connected thereto is disclosed, yet the aforesaid application is not suitable for automatic testing of components inside the computer. In contrast, Taiwanese Patent Application No. 94135316 discloses a method for determining an address of a program module in which an error has occurred when a computer crashes. In sum, the abovementioned patent applications do not provide a way of automating the manual testing operation. 
       SUMMARY OF THE INVENTION 
       [0007]    Therefore, the object of the present invention is to provide a method for automatically simulating manual testing of a computer after the computer is powered on, a testing system, and an external storage device that save time and labor costs. 
         [0008]    According to the present invention, there is provided a method for automatically simulating manual testing of a computer after the computer is powered on. The method for automatically simulating manual testing of a computer after the computer is powered on comprises the steps of: 
         [0009]    (a) connecting the computer to an external storage device having a script recorded thereon that corresponds to a manual testing operation; and 
         [0010]    (b) after the computer is powered on, enabling the computer to access the script of the external storage device for performing the manual testing operation. 
         [0011]    In an embodiment of the invention, step (b) further includes the sub-step of: 
         [0012]    (b-1) when the computer is in a power on self-test stage, enabling the computer to determine whether the script has a conforming checkpoint code, and if it is determined that the script has the conforming checkpoint code, enabling the computer to perform a test procedure corresponding to the checkpoint code and to store a test result. 
         [0013]    In an embodiment of the invention, step (b) further includes the sub-step of: 
         [0014]    (b-2) when the computer is in a runtime stage, and after at least one event has been run, enabling the computer to determine whether the script has a conforming event code, and 
         [0015]    if it is determined that the script has the conforming event code, enabling the computer to perform a test procedure corresponding to the event code and to store a test result. 
         [0016]    According to another aspect of the present invention, there is provided an external storage device for enabling a computer to automatically simulate manual testing after the computer is powered on. The external storage device comprises a script recorded thereon that corresponds to a manual testing operation. The script is provided to the computer for performing the manual testing operation after the external storage device is initialized by the computer. The script is provided with a plurality of batch procedures. Each of the batch procedures is used to simulate instructions necessary for performing the manual testing operation. 
         [0017]    In an embodiment of the invention, the script includes a power on self-test checkpoint processing table. The power on self-test checkpoint processing table is provided with a power on self-test checkpoint processing header, a checkpoint code, an action type, a test parameter and a test result. 
         [0018]    In an embodiment of the invention, the script includes a runtime event processing table. The runtime event processing table is provided with a runtime event processing header, an event code, an action type, a test parameter and a test result. 
         [0019]    According to yet another aspect of the present invention, there is provided a testing system for automatically simulating manual testing of a computer after the computer is powered on. The testing system for automatically simulating manual testing of a computer after the computer is powered on comprises an external storage device and a computer-under-test. The external storage device has a script recorded thereon that corresponds to a manual testing operation. The computer-under-test is connected to the external storage device. The computer-under-test accesses the script of the external storage device for performing the manual testing operation after the computer-under-test is powered on. 
         [0020]    Since the conventional method of manually inputting instructions necessary for performing the manual testing operation in each computer is time consuming, the method for automatically simulating manual testing of a computer after the computer is powered on of the present invention is proposed as a substitute capable of saving time and labor costs. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0021]    Other features and advantages of the present invention will become apparent in the following detailed description of the preferred embodiment with reference to the accompanying drawings, of which: 
           [0022]      FIG. 1  is a schematic diagram of a preferred embodiment of a testing system for automatically simulating manual testing of a computer after the computer is powered on according to the present invention; 
           [0023]      FIG. 2  is a schematic circuit block diagram to illustrate components of the preferred embodiment; 
           [0024]      FIG. 3  is a flow chart of a preferred embodiment of a method for automatically simulating manual testing of a computer after the computer is powered on according to the present invention; 
           [0025]      FIG. 4  is a schematic diagram to illustrate format of a script of the preferred embodiment; 
           [0026]      FIG. 5  is a schematic diagram to illustrate exemplary content of the script of the preferred embodiment; and 
           [0027]      FIG. 6  is a flow chart to illustrate a power on self-test checkpoint processing phase and a runtime event processing phase of the method of the preferred embodiment. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0028]      FIGS. 1 and 2  illustrate a preferred embodiment of a testing system for automatically simulating manual testing of a computer after the computer is powered on according to the present invention. The testing system includes a USB storage device  3  and a computer-under-test  1 . The testing system is suitable for testing a newly manufactured computer or a computer in need of repair. The USB storage device  3  includes a script  31  recorded thereon that corresponds to a manual testing operation. In this embodiment, the USB storage device  3  is provided with a plurality of batch procedures. Each of the batch procedures is used to simulate instructions necessary for performing the manual testing operation. 
         [0029]    The computer  1  is connected to the USB storage device  3  for accessing the script  31  and performing the manual testing operation after the computer  1  is powered on. In this embodiment, the computer  1  is provided with a central processing unit  10 , a Flash ROM  11  loaded with a basic input/output system (BIOS) program  111 , a USB peripheral controller  12 , an input device  13  and a display device  14 . The USB peripheral controller  12  is for connecting to the USB storage device  3 . 
         [0030]    Referring to  FIG. 3 , the preferred embodiment of a method for automatically simulating testing of a computer after the computer is powered on according to the present invention, as performed by the testing system, is shown to comprise the following steps: 
         [0031]    In step  101 , the computer  1  is powered on. 
         [0032]    In step  102 , the computer  1  initializes the USB peripheral controller  12 . 
         [0033]    In step  103 , the computer  1  determines whether the USB storage device  3  is connected. If it is determined that the USB storage device  3  is connected, the flow proceeds to step  104 . Otherwise, the flow proceeds to step  109 , wherein a batch processing procedure is ended. In step  104 , the computer  1  determines whether the USB storage device  3  has the script  31 . If it is determined that the USB storage device  3  has the script  31 , the flow proceeds to step  105 . Otherwise, the flow proceeds to step  109 , wherein the batch processing procedure is ended. 
         [0034]    In step  105 , the computer  1  determines a count of entries of data to be processed in the batch processing procedure of the script  31 . The flow then proceeds to step  106 . 
         [0035]    In step  106 , the computer  1  accesses the entries of data to be processed in sequence. The flow then proceeds to step  107 . 
         [0036]    In step  107 , the computer  1  determines whether a last one of the entries of data to be processed has been accessed. If it is determined that the last one of the entries of data to be processed has been accessed, the flow proceeds to step  109 , wherein the batch processing procedure is ended. Otherwise, the flow proceeds to step  108 . 
         [0037]    In step  108 , the computer  1  proceeds to access a next one of the entries of data to be processed. The flow then returns to step  106 . 
         [0038]    Referring to  FIG. 4 , in this embodiment, the script  31  (see  FIG. 2 ) is USB header data  2 . The format of the USB header data  2  includes a batch processing signature  20 , a power on self-test checkpoint processing table  21 , a runtime event processing table  22 , a BIOS debug log  23 , and log data  24 . 
         [0039]    In this embodiment, the manual testing operation to be automatically simulated can be roughly divided into two phases: a power on self-test checkpoint processing phase and a runtime event processing phase. The power on self-test checkpoint processing phase refers to a period in which the computer  1  accesses the power on self-test checkpoint processing table  21  for performing sequentially test procedures corresponding to distinct codes of the power on self-test checkpoint processing table  21 . The runtime event processing phase refers to a period subsequent to the power on self-test checkpoint processing phase, in which the computer  1  accesses the runtime event processing table  22  for performing test procedures corresponding to distinct codes of the runtime event processing table  22 . 
         [0040]    It is noted that the BIOS program  111  is capable of accessing and analyzing the power on self-test checkpoint processing table  21  and the runtime event processing table  22  of the script  31 , and that portions of the method of the present invention can be performed by a routine of the BIOS program  111 . 
         [0041]    In this embodiment, the power on self-test checkpoint processing table  21  is provided with a power on self-test checkpoint processing header  210 , a checkpoint code  211 , an action type  212 , a test parameter  213  and a test result  214 . The power on self-test checkpoint processing header  210  is provided with a power on self-test batch processing signature and a checksum. The power on self-test batch processing signature indicates a power on self-test batch processing procedure to be performed. The checksum indicates a count of entries of data to be processed in the power on self-test batch processing procedure. Referring to exemplary content of the power on self-test checkpoint processing table  21  shown in  FIG. 5 , the POST batch processing signature is W!POSTCK, and the checksum is 00000002, indicating that there are two entries of data to be processed in the power on self-test batch processing procedure. The checkpoint code  211  is a code indicating a test procedure to be performed on a hardware component of the computer  1 . 
         [0042]    Similarly, the runtime event processing table  22  is provided with a runtime event processing header  220 , an event code  221 , an action type  222 , a test parameter  223  and a test result  224 . The runtime event processing header  220  is provided with a runtime batch processing signature and a checksum. The runtime batch processing signature indicates a runtime batch processing procedure to be performed, and the checksum indicates a count of entries of data to be processed in the runtime batch processing procedure. Referring to exemplary content of the runtime event processing table  22  shown in  FIG. 5 , the runtime batch processing signature is W!RunTTB, and the checksum is 00000001, indicating that there is one entry of data to be processed in the runtime batch processing procedure. The event code  221  is a code indicating a test procedure to be performed on a predetermined event of the computer  1 . 
         [0043]    What is referred to herein as ‘runtime’ can be an entry into Windows, DOS, or any phase of operation that a particular operating system defines as runtime. What is referred to herein as an ‘event’ is an event which, under a particular operating system environment, is related to hardware operation. Examples of an event include a central processing unit speed and a keyboard input. An ‘event’ can also be that which is categorized as such according to ACPI SPEC specifications. 
         [0044]    Referring again to  FIG. 5 , the exemplary content of the power on self-test checkpoint processing table  21  includes entries for test procedures performed on CMOS and PCI bus register hardware components, and is interpreted as follows: 
         [0045]    The checkpoint code  211  corresponding to the test procedure performed on the CMOS is ‘3Ah’; the action type  212  of ‘CMOS_R’ indicates a read operation; the test parameter  213  of ‘72h’ specifies the address accessed for the read operation; and the test result  214  of ‘Abh’ is a value accessed through the read operation. 
         [0046]    The checkpoint code  211  corresponding to the test procedure performed on the PCI bus register is ‘49h’; the action type  212  of ‘PCI_W’ indicates a write operation; the test parameter  213  of ‘Efh’ specifies the address accessed for the write operation; and the test result  214  of ‘success’ indicates successful completion of the write operation. 
         [0047]    The exemplary content of the runtime event processing table  22  includes an entry for a test procedure for accessing a GPIO value, and is interpreted as follows: The event code  221  corresponding to the test procedure is ‘A_SLP’; the action type  222  of ‘GPIO_R’ specifies a read operation; the test parameter  223  of ‘23h’ specifies an address accessed for the read operation; and the test result  224  of ‘1’ is a value accessed through the read operation. 
         [0048]    Referring to  FIG. 6 , and comparing  FIG. 6  to  FIG. 3 , the power on self-test checkpoint processing phase and the runtime event processing phase of the method of the preferred embodiment are shown to comprise the following steps: 
         [0049]    In step  301 , the computer  1  begins a power on self-test. In the process of performing the power on self-test, that is, in the power on self-test stage, the computer  1  initializes the USB storage device  3  and accesses the script  31 . 
         [0050]    In step  302 , the computer  1  determines whether the script  31  has a conforming checkpoint code. If it is determined that the script  31  has the conforming checkpoint code, the flow proceeds to step  303 . Otherwise, the flow proceeds to step  304 . 
         [0051]    In step  303 , the computer  1  performs a test procedure corresponding to the checkpoint code and stores a test result. The flow then proceeds to step  304 . 
         [0052]    In step  304 , the computer  1  determines whether the power on self-test is complete. If it is determined that the power on self-test is complete, the computer  1  enters a runtime stage. Otherwise, the flow proceeds to step  305 . 
         [0053]    In step  305 , the computer  1  continues performing the power on self-test, and subsequently, the flow returns to step  302 . 
         [0054]    In step  306 , the computer  1  is in the runtime stage, and an event is run. The flow then proceeds to step  307 . 
         [0055]    In step  307 , it is determined whether the script  31  has a conforming event code. If it is determined that the script  31  has the conforming event code, the flow proceeds to step  308 . Otherwise, the flow returns to step  306 . 
         [0056]    In step  308 , the computer  1  performs a test procedure corresponding to the event code and stores a test result. The flow then returns to step  306 . 
         [0057]    In sum, the method for automatically simulating manual testing of a computer after the computer is powered on according to the present invention, when performed on a newly manufactured computer or a computer under repair, is capable of automatically simulating the manual testing operation for an individual computer. The method of the present invention saves time, and thus promotes efficient computer production and repair. In addition, the USB storage device  3  can substitute for costly WISE or ICE testing devices, and can be repeatedly used for testing large volumes of computers. While the present invention has been described in connection with what is considered the most practical and preferred embodiment, it is understood that this invention is not limited to the disclosed embodiment but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.