Abstract:
A test method for an electronic device is provided. The method includes the following steps. A test file is obtained from a main server. The electronic device is tested according to the test file and a test result is generated. The test result is output to an interface of the electronic device that can be accessed by the main server. The main server polls the test result from the interface of the electronic device each time a predetermined time duration elapses. An electronic device with testing function and a test system are also provided.

Description:
FIELD 
       [0001]    The present disclosure relates to a test method, a test system, and an electronic device employing the same. 
       BACKGROUND 
       [0002]    Electronic devices that need to be tested are connected to a main server. During the test process, data is transmitted between the main server and the electronic device via the Internet. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0003]    The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the present disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts or sections throughout the drawings. 
           [0004]      FIG. 1  illustrates an environment of a test system in accordance with an embodiment of the present disclosure. 
           [0005]      FIG. 2  is a block diagram of the test system of  FIG. 1 , in accordance with the embodiment of the present disclosure. 
           [0006]      FIG. 3  is a flowchart of a test method in accordance with an embodiment of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0007]    The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one”. The references “a plurality of” and “a number of” mean “at least two.” 
         [0008]      FIG. 1  illustrates an application environment of a test system  2  in accordance with an embodiment of the present disclosure. The test system  2  can run on at least one electronic device  11  and a main server  12 . The electronic device  11  can be a tablet personal computer, a telephone, an e-reader, for example. The main server  12  can be a computer host, a server, a personal computer, for example. 
         [0009]    Each electronic device  11  can include a first communication unit  111  and a first processor  112 . The main server  12  can include a second communication unit  121 , a storage unit  122  and a second processor  123  and a time unit  124 . The main server  12  can be coupled to each electronic device  11  via the second communication unit  121 . The storage unit  122  can store a number of test files for testing each electronic device  11 . 
         [0010]      FIG. 2  illustrates a block diagram of the test system of  FIG. 1 . The test system  2  can include a number of function modules, a portion of which run on the electronic devices  11 , and a portion of which run on the main server  12 . 
         [0011]    In the embodiment, the function modules can further include a command creating module  21 , a first communication control module  22 , a testing module  23 , and an outputting module  24  which are executable by the first processor  112  of the each of the electronic devices  11 . The function modules of the test system  2  can further include a second communication control module  25 , a file obtaining module  26 , and a polling module  27  which are executable by the second processor  123  of the main server  12 . In other embodiments, the function modules of the test system  1  may be a collection of software instructions, executable by the first processor  112  of each electronic device  11  and the second processor  123  of the main server  12 . 
         [0012]    When the main server  12  is coupled to one of the electronic devices  11  without a test file (hereinafter “the requesting electronic device  11 ”), the command creating module  21  can control the requesting electronic device  11  to create a command for obtaining a test file for testing the requesting electronic device  11 . The test file can include all the files that are needed for testing the requesting electronic device  11 . 
         [0013]    The first communication control module  22  can be used for controlling the first communication unit  111  to transmit the command created by the command creating module  21  to the main server  12 . 
         [0014]    The file obtaining module  26  can be used for controlling the main server  12  to obtain the test file from the storage unit  122  when the command is received. 
         [0015]    The second communication control module  25  can be further used for controlling the second communication unit  121  of the main server  12  to transmit the test file to the requesting electronic device  11 . 
         [0016]    The testing module  23  can be used for controlling the first processor  112  of the requesting electronic device  11  to test the requesting electronic device  11  according to the test file and generating a test result when the test file is received. In at least one embodiment, the testing module  23  can test whether the configuration of the requesting electronic device  11  is correct. The testing module  23  can also test whether the performance of the electronic device has reached a pre set standard. For example, if a given capacity of the requesting electronic device  11  is 500 G, and the actual tested capacity of the requesting electronic device  11  is 200 G, the testing module  23  determines that the configuration of the requesting electronic device  11  is not correct. In another example, if a given processing speed of the requesting electronic device  11  is 1 GHZ/s, and the actual tested processing speed of the first processor  112  of the requesting electronic device  11  is 1 MHZ/s, the testing module  23  determines that the performance of the first processor  112  is not eligible. 
         [0017]    The outputting module  24  can be used for controlling the requesting electronic device  11  to transmit the test result to an interface such as a web service of the requesting electronic device  11 . The interface is an external interface that can be accessed by the main server  12 . 
         [0018]    The polling module  27  can be used for controlling the main server  12  to poll the interface of the each of the electronic device  11  to obtain the test results when the time unit  124  has timed to a predetermined time duration. 
         [0019]      FIG. 3  illustrates a flowchart of a method for testing one or more electronic devices. 
         [0020]    In block  310 , the command creating module can control the requesting electronic device to create a command for obtaining a test file for testing the requesting electronic device. 
         [0021]    In block  320 , the first communication control module can control the first communication unit of the requesting electronic device to transmit the created command to the main server. 
         [0022]    In block  330 , the file obtaining module controls the main server to obtain a test file from the storage unit according to the created command when the created command is received In at least one embodiment, the test file can include all the files that are needed for testing the requesting electronic device. 
         [0023]    In block  340 , the second communication control module can control the second communication unit to transmit the test file to the requesting electronic device. 
         [0024]    In block  350 , the testing module can control the first processor of the requesting electronic device to test the requesting electronic device according to the test file and generate a test result when the test file is received. 
         [0025]    In block  360 , the outputting module can control the requesting electronic device to output the test result to an interface of the requesting electronic device such as a web service that can be accessed by the main server. 
         [0026]    In block  370 , the polling module can control the main server to poll the interface of the each electronic device to obtain the test results when the time unit has timed a predetermined time duration. 
         [0027]    Although the present disclosure has been specifically described on the basis of various embodiments thereof, the disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the embodiments without departing from the scope and spirit of the disclosure.