Equipment testing methods, apparatus, storage media and electronic devices
By using different testing sequences for the target device and other devices, and running the configuration check program with shorter testing time first, the problem of batch device errors was solved, and testing efficiency and productivity were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2023-05-26
- Publication Date
- 2026-06-30
AI Technical Summary
During server equipment testing, the configuration check section of the customer-customized diagnostic program is prone to errors, leading to batch errors in the equipment and affecting testing efficiency and productivity.
Different test sequences are used to test the target device and other devices. The target device runs the configuration check program (first test instruction) with a shorter time first, and the other devices run the first test instruction after the target device runs the second test instruction. If the target device fails, the first test instruction of the other devices is stopped.
This avoids batch errors in equipment, improves testing efficiency and productivity, and reduces equipment failures caused by configuration check program errors.
Smart Images

Figure CN116627740B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more specifically, to a device testing method, apparatus, storage medium, and electronic device. Background Technology
[0002] During the server manufacturing process, customers incorporate their own diagnostic programs, including customized diagnostic programs, primarily for configuration checks and performance stress tests to ensure the servers meet their expectations. The configuration check portion of these customized diagnostic programs has stringent requirements regarding various server configuration details. Often, inaccuracies or incompleteness in the program's configuration check files can cause the entire diagnostic program to fail, impacting diagnostic efficiency and consequently affecting production capacity and delivery schedules. Therefore, the configuration check portion of the customized diagnostic program needs to be verified and screened before deployment to ensure its accuracy and completeness; currently, manual comparison and screening are commonly used. However, some inaccuracies in the configuration check files only become apparent when the customized diagnostic program is actually run on the device. For example, code logic issues might prevent hard drive information from being read, or a tool might be unusable on the factory's system due to missing library files. When testing multiple devices in the same order, if problems occur when running the customized diagnostic program, it can cause batch errors, reducing testing efficiency and production capacity. Therefore, related technologies exhibit the problem of multiple devices experiencing batch errors during testing.
[0003] There is currently no effective solution to the problem of multiple devices reporting batch errors during testing in related technologies. Summary of the Invention
[0004] This invention provides a device testing method, apparatus, storage medium, and electronic device to at least solve the problem of multiple devices reporting batch errors during testing in related technologies.
[0005] According to an embodiment of the present invention, a device testing method is provided, comprising: determining a target device among the plurality of devices when testing a plurality of devices; testing the target device according to a first testing order, wherein the first testing order includes: running a second testing instruction after the target device runs a first testing instruction, the duration of the second testing instruction being longer than the duration of the first testing instruction; testing other devices among the plurality of devices other than the target device according to a second testing order, wherein the second testing order includes: running the first testing instruction after the target device runs the second testing instruction; and controlling the other devices to stop running the first testing instruction after running the second testing instruction if the target device fails to run the first testing instruction.
[0006] In one exemplary embodiment, the above-described testing of the target device according to the first test sequence includes: controlling the target device to run the first test instruction; if the target device fails to run the first test instruction, controlling the target device to run the second test instruction; and if the target device successfully runs the first test instruction, controlling the target device to run the second test instruction.
[0007] In an exemplary embodiment, after controlling the target device to run the second test instruction in the event that the target device fails to run the first test instruction, the method further includes: obtaining a third test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and controlling the target device to run the third test instruction.
[0008] In one exemplary embodiment, the above-described testing of the target device according to the first test order further includes: controlling the target device to run the first test instruction; if the target device fails to run the first test instruction, obtaining a third test instruction and controlling the target device to run the third test instruction, wherein the third test instruction is obtained by modifying the first test instruction; and if the target device successfully runs the third test instruction, controlling the target device to run the second test instruction.
[0009] In one exemplary embodiment, if the target device fails to execute the third test instruction, a fourth test instruction is obtained and the target device is controlled to execute the fourth test instruction, wherein the fourth test instruction is obtained by modifying the third test instruction; if the target device successfully executes the fourth test instruction, the target device is controlled to execute the second test instruction.
[0010] In one exemplary embodiment, testing the other devices among the plurality of devices, excluding the target device, according to a second test order includes: if the target device successfully executes the first test instruction, then after the other devices have completed executing the second test instruction, controlling the other devices to execute the first test instruction.
[0011] In one exemplary embodiment, the method further includes: if the target device fails to execute the first test instruction, obtaining a third test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and controlling the other device to execute the third test instruction after the other device has completed executing the second test instruction.
[0012] In one exemplary embodiment, the method further includes: obtaining a test request sent by a first device among the plurality of devices; determining whether the first device is the target device based on the device information of the first device; if the first device is the target device, testing the first device according to the first test order; and if the first device is one of the other devices, testing the first device according to the second test order.
[0013] In one exemplary embodiment, determining whether the first device is the target device based on the device information of the first device includes: querying a target list to see if the device information of the first device exists, wherein the target list records the device information of multiple target devices, and each of the multiple target devices is a device determined in an order corresponding to that target device; if the device information of the first device exists in the target list, determining that the first device is the target device; if the device information of the first device does not exist in the target list, determining that the first device is one of the other devices.
[0014] According to another embodiment of the present invention, a device testing apparatus is also provided, comprising:
[0015] The determination module is used to identify the target device among multiple devices when testing multiple devices;
[0016] The first test module is used to test the target device according to a first test sequence, wherein the first test sequence includes: running a second test instruction after the target device runs a first test instruction, and the duration of the target device running the second test instruction is longer than the duration of the target device running the first test instruction.
[0017] The second test module is used to test other devices among the plurality of devices except the target device in accordance with a second test order, wherein the second test order includes: running the first test instruction after the target device runs the second test instruction;
[0018] The target control module is used to control the other devices to stop running the first test instruction after running the second test instruction if the target device fails to run the first test instruction.
[0019] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0020] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0021] This invention addresses the issue of batch error reporting when testing multiple devices. A target device is tested according to a first testing order, while other devices are tested according to a second testing order. The target device runs a shorter first test instruction before the other devices run their second test instructions, thus obtaining the result of the first test instruction. After the other devices complete their second test instructions, the result of the first test instruction is used to determine whether they should run the first test instruction. Specifically, if the target device fails to run the first test instruction, the other devices stop running it, preventing errors from occurring. Therefore, when testing multiple devices, if a problem occurs with the first test instruction, only the target device will report an error; other devices will not. This solves the problem of batch errors during testing of multiple devices, effectively preventing errors caused by errors in the first test instruction. Attached Figure Description
[0022] Figure 1 This is a block diagram of the mobile terminal hardware structure of the device testing method according to an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of a device testing method according to an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram illustrating the sequence of testing the target device according to an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram illustrating the testing sequence of other devices according to embodiments of the present invention;
[0026] Figure 5 This is a schematic diagram of a target list according to an embodiment of the present invention;
[0027] Figure 6 This is an overall flowchart of the device testing method according to an embodiment of the present invention;
[0028] Figure 7 This is a flowchart of the polling check and early warning mechanism according to an embodiment of the present invention;
[0029] Figure 8 This is a structural block diagram of a device testing apparatus according to an embodiment of the present invention. Detailed Implementation
[0030] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0032] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a block diagram of the mobile terminal hardware structure of the device testing method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0033] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the device testing method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0035] This embodiment provides a device testing method. Figure 2 This is a flowchart of a device testing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0036] Step S202: When testing multiple devices, determine the target device among the multiple devices;
[0037] In this embodiment, the aforementioned device refers to a server device. After a customer places an order for multiple devices, order information is generated, and the number of devices to be ordered is allocated to the order, i.e., multiple devices. During the production process, these multiple devices need to be tested.
[0038] When testing multiple devices corresponding to an order, a target device is first randomly selected from the multiple devices.
[0039] Optionally, the multiple devices to be tested can also be multiple devices corresponding to multiple orders. In this case, one target device should be randomly selected from the devices corresponding to each order, meaning the number of target devices equals the number of orders. For example, when testing 30 devices, 10 of them correspond to order 1, and 20 to order 2. In this case, one device is selected from the 10 devices corresponding to order 1 as the target device, and one device is selected from the 20 devices corresponding to order 2 as the target device. Therefore, two target devices are identified from the aforementioned 30 devices.
[0040] Step S204: Test the target device according to the first test order, wherein the first test order includes: running a second test instruction after the target device runs a first test instruction, and the duration of the target device running the second test instruction is longer than the duration of the target device running the first test instruction;
[0041] In related technologies, the general testing process for equipment typically involves first updating the BIOS, BMC, and various component firmware, then running the factory's proprietary aging program, usually for about 10 hours, followed by running the customer-customized diagnostic program. The customer-customized diagnostic program consists of two parts: a configuration check program and a performance and stress test program. The configuration check program is the most error-prone part of the entire testing process, and it runs for a very short time, usually only a few minutes. The performance and stress test program tests the equipment's performance and stress levels, and typically needs to run for several hours or even more than ten hours.
[0042] In the above embodiments, the first test instruction is a configuration check program in a customer-customized diagnostic program, and the second test instruction includes a factory-owned aging program.
[0043] Since the configuration check program in the customer-customized diagnostic program is the most error-prone part and has a very short execution time, the test order is changed when testing the target equipment. The configuration check is run earlier, before the factory-built aging program. This process takes only a few minutes and has minimal impact on the normal operation of the equipment.
[0044] Figure 3 This is a schematic diagram illustrating the sequence of target device testing according to an embodiment of the present invention, such as... Figure 3 As shown, the testing sequence for the target device is as follows: first, refresh the BIOS, BMC, and various material firmware; run the configuration check program (first test instruction); run the factory's own aging program (second test instruction); and then run all customer-customized diagnostic programs. That is, the first test instruction is run before the second test instruction is run on the target device.
[0045] Step S206: Test the other devices among the plurality of devices except the target device according to the second test order, wherein the second test order includes: running the first test instruction after the target device runs the second test instruction;
[0046] Figure 4 This is a schematic diagram illustrating the testing sequence of other devices according to embodiments of the present invention, such as... Figure 4 As shown, when testing multiple devices, only the test order of the target device determined in step S202 is changed. The test order of other devices among the multiple devices, excluding the target device, is not changed. The tests are still performed in the following order: BIOS, BMC and various material firmware are refreshed, then the factory's own aging program is run, which is generally about 10 hours, and then all customer-customized diagnostic programs (including the first test instruction) are run.
[0047] Step S208: If the target device fails to run the first test instruction, control the other devices to stop running the first test instruction after running the second test instruction.
[0048] In this embodiment, the testing of multiple devices is basically started simultaneously. The target device first runs the first test instruction. Since the execution time of the first test instruction is very short, the result of the target device running the first test instruction can be obtained quickly. If the target device runs the first test instruction successfully, it means that the first test instruction is a correct and runnable program. If the target device fails to run the first test instruction, an error will be displayed, indicating that there is a problem with the first test instruction.
[0049] Since the testing order of other devices remains unchanged, when the target device receives the result of running the first test instruction, it is still running the second test instruction and has not yet run the first test instruction. If the target device fails to run the first test instruction, the other devices will be controlled to stop running the first test instruction. Therefore, the other devices will not run the erroneous first test instruction, and thus, the other devices will not report errors.
[0050] Through the above embodiments, when testing multiple devices, the target device is tested according to a first testing order, while other devices are tested according to a second testing order. The testing order of the target device differs from that of the other devices. The target device runs the first test instruction with a shorter execution time in advance. While the other devices are running the second test instruction, the execution result of the target device's first test instruction has already been obtained. After the other devices have finished running the second test instruction, the execution result of the target device's first test instruction is used to determine whether the other devices should run the first test instruction. That is, if the target device fails to run the first test instruction, the other devices stop running the first test instruction to avoid errors in other devices. In other words, when testing multiple devices, if there is a problem with the first test instruction, only the target device will report an error, and the other devices will not report an error. Therefore, the problem of batch errors of multiple devices during testing is solved, and the effect of avoiding batch errors of devices due to errors in the first test instruction is achieved.
[0051] In an optional embodiment, the above-mentioned testing of the target device according to the first test sequence includes: controlling the target device to run the first test instruction; if the target device fails to run the first test instruction, controlling the target device to run the second test instruction; if the target device successfully runs the first test instruction, controlling the target device to run the second test instruction.
[0052] In this embodiment, after the target device executes the first test instruction, regardless of whether the first test instruction succeeds or fails, the target device continues to execute the second test instruction. That is, the target device is controlled to execute the second test instruction after the first test instruction succeeds, or even after the second test instruction fails. Through this embodiment, even if an error occurs in the first test instruction, the second test instruction continues to execute. Furthermore, the target personnel can modify the first test instruction while executing the second test instruction. Therefore, after the target device completes the second test instruction, the modified first test instruction can be executed. This saves testing time and thus increases productivity.
[0053] After the target device successfully executes the first test command, the target device is controlled to execute the second test command. After the target device completes the second test command, the target device is controlled to run a complete customer-customized diagnostic program, including the first test command (configuration check program) and performance and stress test programs.
[0054] If the target device fails to execute the first test instruction, after controlling the target device to execute the second test instruction, the method further includes: obtaining a third test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and controlling the target device to execute the third test instruction. That is, if the target device encounters an error while executing the first test instruction, i.e., the target device fails to execute the first test instruction, while controlling the target device to execute the second test instruction, a prompt message is sent to the target personnel to indicate that there is an error in the first test instruction. After receiving the prompt message, the target personnel modify the first test instruction to obtain the third test instruction. The third test instruction is a correct configuration check program obtained by modifying the error in the first test instruction. After the target device completes the second test instruction, the correct configuration check program (the third test instruction) is executed. In addition, the performance and stress test programs in the customer-customized diagnostic program are also executed.
[0055] In an optional embodiment, testing the target device according to the first test sequence further includes: controlling the target device to run the first test instruction; if the target device fails to run the first test instruction, obtaining a third test instruction and controlling the target device to run the third test instruction, wherein the third test instruction is obtained by modifying the first test instruction; if the target device successfully runs the third test instruction, controlling the target device to run the second test instruction.
[0056] In this embodiment, after the target device runs the first test instruction, different operations are performed depending on the result of the first test instruction. If the first test instruction runs successfully on the target device, the target device is controlled to run the second test instruction. Conversely, if the first test instruction fails to run on the target device, or if the second test instruction fails to run, the target device is not directly controlled to run the second test instruction. Instead, the first test instruction is modified and the target device fails to run the first test instruction. In the event that the target device fails to run the first test instruction, the target device is controlled to run the second test instruction while a prompt message is sent to the target personnel to indicate that there is an error in the first test instruction. After receiving the prompt message, the target personnel modify the first test instruction to obtain the third test instruction.
[0057] To prevent errors from occurring during the modification process by the target personnel, which could result in an incorrect third test command, and to further reduce the possibility of batch errors, the third test command is run after the target device has finished running and before the second test command. If the third test command runs successfully, the target device is then controlled to begin running the second test command. In addition, performance and stress test programs from the customer-customized diagnostic program are also run.
[0058] If the target device fails to execute the third test instruction, a prompt message is sent to the target personnel, prompting them to modify the third test instruction again to obtain a fourth test instruction. The fourth test instruction is then acquired, and the target device is controlled to execute the fourth test instruction, wherein the fourth test instruction is obtained by modifying the third test instruction. If the target device successfully executes the fourth test instruction, the target device is controlled to execute the second test instruction.
[0059] Optionally, if the target device fails to run the fourth test instruction, the target personnel will be prompted to modify the fourth test instruction again until the modified test instruction can be successfully run on the target device. After successful execution, the target device will be controlled to run the second test instruction.
[0060] In an optional embodiment, testing the other devices among the plurality of devices other than the target device according to the second test order includes: if the target device successfully executes the first test instruction, after the other devices have completed executing the second test instruction, controlling the other devices to execute the first test instruction.
[0061] In this embodiment, for the other devices besides the target device among multiple devices, if the target device has already completed running the first test instruction when the other devices run the second test instruction, then after the other devices have completed running the second test instruction, the subsequent test process is selected based on whether the target device successfully ran the first test instruction. If the target device successfully ran the first test instruction, then after the other devices have completed running the second test instruction, the other devices are controlled to run the first test instruction.
[0062] If the target device fails to execute the first test instruction, a third test instruction is obtained, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; after the other devices have completed executing the second test instruction, the other devices are controlled to execute the third test instruction.
[0063] When other devices run the configuration check program in the customer-customized diagnostic program, the target device has already completed the test of the configuration check program (first test program). Therefore, even if the first test program has an error, when other devices are preparing to run the configuration check program in the customer-customized diagnostic program, the erroneous configuration check program can be avoided, thus reducing the possibility of errors occurring in batches of devices.
[0064] In an optional embodiment, the method further includes: obtaining a test request sent by a first device among the plurality of devices; determining whether the first device is the target device based on the device information of the first device; if the first device is the target device, testing the first device according to the first test order; and if the first device is one of the other devices, testing the first device according to the second test order.
[0065] In this embodiment, when testing any device, it is necessary to first determine whether the device is the target device or belongs to other devices, and then choose whether to test the device according to the first test order or the second test order.
[0066] When testing any device, such as the first device, the BIOS, BMC, and various material firmware of the first device are first flashed. After the flashing is completed, a test request is issued, which carries the device information of the first device. Based on the device information of the first device, it is determined whether the first device is the target device. If the first device is the target device, the first device is tested according to the first test order; if the first device is another device, the first device is tested according to the second test order.
[0067] The process of determining whether a first device is a target device based on its device information includes: querying a target list to see if device information for the first device exists, wherein the target list records device information for multiple target devices, each of which is a device identified in an order corresponding to that target device; if device information for the first device exists in the target list, the first device is determined to be a target device; if device information for the first device does not exist in the target list, the first device is determined to be another device.
[0068] By recording order information and the corresponding target device information in the target list, it is possible to determine whether any device is a target device by looking up the table, i.e. whether the testing order of the device needs to be changed, thereby improving the speed of controlling the device to perform tests.
[0069] Figure 5 This is a schematic diagram of a target list according to an embodiment of the present invention, such as... Figure 5 As shown, the target list records order information for multiple orders, as well as device information for the target device corresponding to each order. Figure 5The system records order information for three orders (Dd001, Dd002, Dd003) and device information for the target devices corresponding to these three orders (sb1001, sb2001, sb3001). If the device information for the first device is sb1001, and this device information is recorded in the target list, then the first device is the target device. If the device information for the first device is sb1004, and this device information is not recorded in the target list, then the first device is another device.
[0070] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments.
[0071] The present invention will be specifically described below with reference to embodiments:
[0072] Figure 6 This is an overall flowchart of the device testing method according to an embodiment of the present invention, such as... Figure 6 As shown, it includes:
[0073] 1. Establish database tables and related directories.
[0074] a) Create a database table 1 on the central server. Record order information, target equipment information, trial run customer-customized diagnostic program flags, pass flags, and brief test logs in the database table 1.
[0075] After a customer places an order for equipment, order information is generated. One device is selected from the devices corresponding to each order as the target device. The order information and the device information of the target device corresponding to that order are recorded in database table 1. The "Trial Run Customer-Customized Diagnostic Program" flag recorded in database table 1 indicates whether the target device corresponding to this order has already run the customer-customized diagnostic program (i.e., whether the first test instruction was run before the second test instruction). A flag of 1 indicates that the target device has already run the customer-customized diagnostic program, and a flag of 0 indicates that the target device has not yet run the customer-customized diagnostic program. The flags also indicate the result of running the customer-customized diagnostic program, i.e., whether the target device successfully ran the first test instruction. A flag of 1 indicates that the target device has already run the customer-customized diagnostic program, and a flag of 0 indicates that the target device has not yet run the customer-customized diagnostic program.
[0076] b) Create database table 2 on the central server. The elements are the same as those in database table 1. Database table 2 also records order information, target equipment information, trial run customer-customized diagnostic program flags, pass flags, and brief test logs. Database table 2 is used to store historical test data.
[0077] c) Create a directory for storing the results of customized diagnostic programs for different customers in a specific directory on the central server, and name the subdirectories after each customer's name, such as Customer 1 and Customer 2.
[0078] II. Maintain order information and target equipment information for new orders:
[0079] a) For orders that require running customer-customized diagnostic programs, when a new order starts running online, update database table 1, add a record, add the order information of the new order and the corresponding target device information, and set the trial run flag of the customer-customized diagnostic program to 0 and the pass flag to 0;
[0080] b) After any device completes the basic firmware refresh operation, the database table 1 is read based on the order information in the device. The device information of the target device corresponding to the order information recorded in the database table 1 is checked to see if it is the same as the device information of the device. That is, the device is checked to see if it is the target device. If they are the same, it means that the device is the target device corresponding to the order. Then the configuration check program of the customer-customized diagnostic program is executed (corresponding to the above-mentioned first test instruction). If they are different, it means that the device is not the target device corresponding to the order. Then the factory's own aging program is run normally (corresponding to the above-mentioned second test instruction).
[0081] c) After the target device runs the configuration check program in the customer-customized diagnostic program, check the test results and update database table 1;
[0082] If the test is successful, update the "Test Run Customer Customized Diagnostic Program Flag" and "Pass" flag in database table 1 to 1 and 1 respectively, indicating that the test has been completed and passed.
[0083] If the test fails, update the test run flag and pass flag in database table 1 to 1 and 0 respectively, indicating that the test has been run and the test failed. At the same time, extract a brief test log and record it in database table 1.
[0084] d) Save the test logs of the target device to the directory where the customer-customized diagnostic program is stored on the central server, such as the Customer 1 directory. The test logs are named with "Order Number-Machine Serial Number-Test Time" to distinguish different orders;
[0085] e) Regardless of whether the customer-customized diagnostic program is successfully run on the first machine of the order, the proprietary aging program will continue to run.
[0086] f) After completing the proprietary aging process, all equipment runs the latest customer-customized diagnostic program. This customer-customized diagnostic program is correct and error-free. If the target equipment successfully runs the customer-customized diagnostic program, the latest customer-customized diagnostic program is the original customer-customized program, and all equipment runs the original customer-customized diagnostic program. If the target equipment fails to run the customer-customized diagnostic program, the latest customer-customized diagnostic program is the one that has been promptly modified by staff.
[0087] In this process, staff use a polling and early warning mechanism to determine whether modifications are needed to the customized diagnostic procedures for multiple customer orders.
[0088] Figure 7 This is a flowchart of the polling check and early warning mechanism according to an embodiment of the present invention, such as... Figure 7 As shown, it includes:
[0089] a) Set a timer to start at a predetermined interval;
[0090] b) Retrieve data from table 1 in the database one by one, and check the flag for the trial run of the customer diagnostic program. If it is 0, it means that the target device for this order has not yet run the customer diagnostic program. Continue to the next check.
[0091] c) If the customer diagnostic procedure trial run flag is 1, it means that the customer diagnostic procedure has been trial run for this order, then continue to check the pass flag;
[0092] If the pass flag is 1, the test run is successful, and this data will be moved to table 2 in the database.
[0093] d) If the pass flag is 0, the test run has failed. A notification message (e.g., email) is sent to the relevant personnel. The notification message includes the order number, the first unit serial number, and a brief test log. Then, this data is moved into database table 2.
[0094] e) Continue checking the next data item. After all data in database table 2 has been checked, the current polling check will end.
[0095] f) Wait for the next polling.
[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described above in the various embodiments of the present invention.
[0097] This embodiment also provides a device testing apparatus. Figure 8 This is a structural block diagram of the device testing apparatus according to an embodiment of the present invention, such as... Figure 8 As shown, the device includes:
[0098] The determination module 802 is used to determine the target device among the multiple devices when testing multiple devices;
[0099] The first test module 804 is used to test other devices among the plurality of devices except the target device in accordance with a second test order, wherein the second test order includes: running the first test instruction after the target device runs the second test instruction;
[0100] The second test module 806 is used to control the other devices to stop running the first test instruction after running the second test instruction if the target device fails to run the first test instruction.
[0101] The target control module 808 is used to control the other devices to stop running the first test instruction after running the second test instruction if the target device fails to run the first test instruction.
[0102] In an optional embodiment, the first test module includes: a first control submodule, configured to control the target device to run the first test instruction; a second control submodule, configured to control the target device to run the second test instruction if the target device fails to run the first test instruction; and a third control submodule, configured to control the target device to run the second test instruction if the target device successfully runs the first test instruction.
[0103] In an optional embodiment, the apparatus further includes: a first acquisition module, configured to acquire a third test instruction after controlling the target device to run the second test instruction in the event that the target device fails to run the first test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and a first control module, configured to control the target device to run the third test instruction.
[0104] In an optional embodiment, the first test module further includes: a fourth control submodule, configured to control the target device to run the first test instruction; a fifth control submodule, configured to obtain a third test instruction and control the target device to run the third test instruction if the target device fails to run the first test instruction, wherein the third test instruction is obtained by modifying the first test instruction; and a sixth control submodule, configured to control the target device to run the second test instruction if the target device successfully runs the third test instruction.
[0105] In an optional embodiment, the first test module further includes: a seventh control submodule, configured to acquire a fourth test instruction and control the target device to run the fourth test instruction if the target device fails to run the third test instruction, wherein the fourth test instruction is obtained by modifying the third test instruction; and an eighth control submodule, configured to control the target device to run the second test instruction if the target device successfully runs the fourth test instruction.
[0106] In an optional embodiment, the second test module includes a first control unit, configured to control the other devices to run the first test instruction after the other devices have completed running the second test instruction, provided that the target device has successfully run the first test instruction.
[0107] In an optional embodiment, the second test module includes: a first acquisition unit, configured to acquire a third test instruction if the target device fails to run the first test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and a second control unit, configured to control the other devices to run the third test instruction after the other devices have completed running the second test instruction.
[0108] In an optional embodiment, the apparatus further includes: a second acquisition module, configured to acquire a test request sent by a first device among the plurality of devices; a judgment module, configured to determine whether the first device is the target device based on the device information of the first device; a third test module, configured to test the first device according to the first test order if the first device is the target device; and a fourth test module, configured to test the first device according to the second test order if the first device is one of the other devices.
[0109] In an optional embodiment, the determination module is configured to determine whether the first device is the target device based on the device information of the first device in the following manner: querying the target list to see if the device information of the first device exists, wherein the target list records the device information of multiple target devices, and each of the multiple target devices is a device determined in the order corresponding to that target device; if the device information of the first device exists in the target list, the first device is determined to be the target device; if the device information of the first device does not exist in the target list, the first device is determined to be the other device.
[0110] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0111] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0112] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0113] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0114] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0115] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0116] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0117] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A device testing method, characterized by, include: When testing multiple devices, the target device is determined from the multiple devices, including: the multiple devices are the devices corresponding to customer orders, and one target device is randomly selected from the devices corresponding to each order; The target device is tested according to a first test sequence, wherein the first test sequence includes: running a second test instruction after the target device runs a first test instruction, the duration of the target device running the second test instruction is longer than the duration of the target device running the first test instruction, wherein the first test instruction is a configuration check program in a customer-customized diagnostic program, and the second test instruction includes a factory-owned aging program. If the target device fails to execute the first test instruction, after controlling the target device to execute the second test instruction, the method further includes: obtaining a third test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction; and controlling the target device to execute the third test instruction. The other devices among the plurality of devices, excluding the target device, are tested according to a second test order, wherein the second test order includes: running the first test instruction after the other devices run the second test instruction; If the target device fails to execute the first test instruction, control the other devices to stop executing the first test instruction after executing the second test instruction; Obtain the third test instruction; after the other devices have completed running the second test instruction, control the other devices to run the third test instruction.
2. The method of claim 1, wherein, The testing of the target device according to the first test sequence includes: Control the target device to execute the first test command; If the target device fails to execute the first test instruction, control the target device to execute the second test instruction; If the target device successfully executes the first test instruction, the target device is then controlled to execute the second test instruction.
3. The method of claim 1, wherein, The devices other than the target device among the plurality of devices are tested according to the second test order, including: If the target device successfully executes the first test instruction, after the other devices have completed executing the second test instruction, control the other devices to execute the first test instruction.
4. The method of claim 1, wherein, The method further includes: Obtain the test request sent by the first device among the plurality of devices; Determine whether the first device is the target device based on the device information of the first device; If the first device is the target device, the first device is tested according to the first test order; If the first device is one of the other devices, the first device is tested according to the second test order.
5. The method of claim 4, wherein, Determining whether the first device is the target device based on the device information of the first device includes: The system queries the target list to see if the device information of the first device exists. The target list records the device information of multiple target devices, and each of the multiple target devices is a device determined in the order corresponding to that target device. If the device information of the first device exists in the target list, the first device is determined to be the target device; If the device information of the first device is not found in the target list, the first device is determined to be one of the other devices.
6. A device for testing equipment, characterized in that, include: The determination module is used to determine a target device among multiple devices when testing multiple devices, including: the multiple devices are devices corresponding to customer orders, and a target device is randomly selected from the devices corresponding to each order; The first test module is used to test the target device according to a first test sequence, wherein the first test sequence includes: running a second test instruction after the target device runs a first test instruction, the duration of the target device running the second test instruction is longer than the duration of the target device running the first test instruction, wherein the first test instruction is a configuration check program in a customer-customized diagnostic program, and the second test instruction includes a factory-owned aging program. The first acquisition module is configured to acquire a third test instruction after controlling the target device to run the second test instruction in the event that the target device fails to run the first test instruction, wherein the third test instruction is a test instruction obtained by modifying the first test instruction. The first control module is used to control the target device to run the third test command; The second testing module is used to test other devices among the plurality of devices, excluding the target device, according to a second testing order, wherein the second testing order includes: running the first testing instruction after the other devices run the second testing instruction; The target control module is configured to control the other devices to stop running the first test instruction after running the second test instruction if the target device fails to run the first test instruction. The second test module includes: a first acquisition unit, configured to acquire the third test instruction if the target device fails to execute the first test instruction; and a second control unit, configured to control the other device to execute the third test instruction after the other device has completed executing the second test instruction.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 5.