Disclosure of Invention
Aiming at the defects in the related technology, the technical problem to be solved by the invention is as follows: the batch synchronous testing method and system for the plurality of computers are high in testing efficiency, capable of synchronously testing a plurality of aging vehicles at the same time, and capable of enabling the tests of the aging vehicles not to interfere with each other.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a batch synchronization test method for multiple computers, comprising: a plurality of computers to be tested, an aging vehicle and display equipment; the batch synchronous testing method comprises the following steps:
s10, installing the computer to be tested on the aging vehicle;
s20, after the aging vehicle control program detects that the aging vehicle is connected with the computers to be tested, setting one of the computers to be tested as a control machine and the other computers to be tested as clients;
s30, deploying the execution environment of the control machine; the control machine builds DHCP service by utilizing DNSmasq, and allocates IP addresses to all clients, so that the clients and the control machine are in the same network segment;
s40, inputting command codes on the controller to make all computers to be tested execute corresponding detection programs and display results on the display device;
wherein: the aging vehicle is provided with an aging vehicle control program, and the aging vehicle control program comprises: the device comprises a command name, a command code corresponding to the command name, and a detection program corresponding to the command name and the command code.
Preferably, the command name includes: checking an online machine, transmitting a program, carrying out BIOS upgrading and number writing on the vehicle, carrying out aging test on the vehicle and carrying out interface test on the vehicle.
Preferably, in step S40, the inputting of the command code on the controller causes all the computers to be tested to execute corresponding testing programs, and the displaying of the result on the display device specifically includes:
s401, inputting a command code corresponding to an online machine checking command on the control machine to judge whether all computers to be tested are online; after basic information of all online computers is acquired, displaying online results;
s402, when all computers to be tested are in an online state, transmitting programs to all computers to be tested, and deploying execution environments for clients;
s403, inputting a command code corresponding to a command for carrying out BIOS upgrading and number writing on the vehicle on the control machine so as to synchronously upgrade all computers to be tested and display an upgrading result;
or inputting a command code corresponding to the command for carrying out the aging test on the vehicle on the control machine so as to carry out the aging test on all computers to be tested and display an aging test result;
or, inputting a command code corresponding to the interface test command for the vehicle on the control machine, so that all computers to be tested perform interface test and display an interface test result;
wherein: the basic information of the online computer comprises: SN code of the online computer, IP address of the online computer, loading information of the desktop of the online computer and time delay information of response of the online computer.
Preferably, in step S401, the command code corresponding to the online machine checking command is input on the control machine to determine whether all the computers to be tested are online, and after the basic information of all the online computers is acquired, the online result is displayed, which specifically includes:
s4011, inputting a command code corresponding to the online machine to be checked on the control machine;
s4012, sending SSH public key of the control machine to all clients, so that the control machine remotely logs in the clients, and the clients execute the operation initiated by the control machine;
s4013, the control machine initiates ping operation to IP addresses of all clients, marks the clients which are ping-connected as online and marks the clients which are ping-disconnected as offline;
in the step S402, when all computers to be tested are in an online state, sending a test program to all computers to be tested, and deploying an execution environment for the client; the method specifically comprises the following steps:
s4021, acquiring SN numbers of the online clients;
s4022, judging whether the desktop of the online client is loaded normally, if so, marking the desktop as loaded, and if not, marking the desktop as unloaded;
s4023, obtaining the time delay needed by the online client to execute the command and return the result;
s4024, displaying the basic information of the online client in sequence according to the SN number of the online client.
Preferably, in step S403, inputting a command code corresponding to the BIOS update write number command on the controller, so as to synchronously update all the computers to be tested, and displaying an update result, specifically including:
s403-11, inputting a command code corresponding to the BIOS upgrading writing number on the control machine;
s403-12, according to the SN coding sequence of the computer to be tested, the aging vehicle control program sends a BIOS upgrading number writing instruction to all the computers to be tested in parallel;
s403-13, after receiving the BIOS upgrading number writing instruction, the computer to be tested upgrades;
s403-14, displaying the upgrade result of the whole vehicle, and sequentially displaying the upgrade result of each computer to be tested according to the SN coding sequence, wherein the upgrade result of each computer to be tested comprises: failed test items for each computer under test.
Preferably, in step S30, the controlling machine builds a DHCP service by using DNSmasq, and allocates IP addresses to all clients, so that the clients and the controlling machine are in the same network segment; then, the method further comprises the following steps:
checking the time of the control machine; if the time of the control machine is incorrect, the time of the control machine is manually set;
the aging vehicle control program writes the current time of the controller into the BIOS chip;
and restarting the DHCP service to enable the DHCP service state of the control machine to be an active state.
Preferably, the running environment of the aging vehicle control program is a unified UOS operating system.
Accordingly, a batch synchronous test system for multiple computers, comprising: a plurality of computers to be tested, an aging vehicle and display equipment; the computers to be tested are arranged on the aging vehicle; an aging vehicle control program is arranged on the aging vehicle; the aging vehicle control process comprises the following steps: the detection program comprises a command name, a command code corresponding to the command name, and a detection program corresponding to the command name and the command code;
the aging vehicle control program is used for setting one computer to be tested as a control machine and other computers to be tested as clients after detecting that the aging vehicle is connected with the computers to be tested; outputting corresponding detection programs according to command codes input on the control machine so as to enable all computers to be detected to execute the corresponding detection programs;
the control machine is used for building DHCP service by utilizing DNSmasq and distributing IP addresses to all clients so that the clients and the control machine are in the same network segment; receiving an input command code, and executing a corresponding detection program; and issuing the command code to all clients;
the client is used for executing a corresponding detection program according to the command code of the control machine;
the display device is used for displaying the result of the detection program.
The invention has the beneficial technical effects that:
1. the invention provides a batch synchronous testing method and a system for a plurality of computers, which are used for the following steps: setting one computer to be tested as a control machine and other computers to be tested as clients; the control machine builds DHCP service by utilizing DNSmasq, and allocates IP addresses to all clients, so that the clients and the control machine in the same aging vehicle are in the same network segment, and subsequent operation is facilitated, the test deployment time of the computer to be tested is greatly reduced, and the test efficiency is improved; meanwhile, the aging vehicle control program deployed on the aging vehicle enables all computers to be tested to execute corresponding detection programs after command codes are input on the control machine, and results are displayed on display equipment; in the invention, each aging vehicle can independently complete the test work of the vehicle, so that the tests of different aging vehicles are not interfered with each other, a plurality of aging vehicles can work simultaneously, the test efficiency is greatly improved, and the practicability is strong.
2. In the invention, the SSH public key of the control machine is sent to all the clients, so that the control machine can log in the client remotely and the client executes the operation initiated by the control machine, and the client logs in the client remotely and executes the command without inputting the password during the operation, thereby improving the testing efficiency.
3. When the invention is used, the corresponding command code input on the control machine can directly contact the client and send the command code and other operations.
4. In the invention, after each detection program is executed, each test result is counted, the test result is clear at a glance, the steps of inputting batch numbers by testers to find the SN codes of the tested machine, checking the hollows of all test items one by one and the like are omitted, and the operation is simple and clear.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention; all other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Next, the present invention will be described in detail with reference to the drawings, wherein the cross-sectional views illustrating the structure of the device are not enlarged partially according to the general scale for convenience of illustration when describing the embodiments of the present invention, and the drawings are only examples, which should not limit the scope of the present invention. In addition, the three-dimensional dimensions of length, width and depth should be included in the actual fabrication.
An embodiment of a batch synchronous testing method and system for multiple computers according to the present invention is described in detail below with reference to the accompanying drawings.
Example one
FIG. 1 is a flow chart illustrating a batch synchronous testing method for multiple computers according to an embodiment of the present invention; as shown in fig. 1, a batch synchronous testing method for multiple computers includes: a plurality of computers to be tested, an aging vehicle and display equipment; the batch synchronous testing method comprises the following steps:
s10, installing the computer to be tested on the aging vehicle;
s20, after the aging vehicle control program detects that the aging vehicle is connected with the computers to be tested, setting one of the computers to be tested as a control machine and the other computers to be tested as clients;
s30, deploying the execution environment of the control machine; the control machine builds DHCP service by using DNSmasq, allocates IP addresses to all clients, and enables the clients and the control machine to be in the same network segment;
s40, inputting command codes on the controller to make all computers to be tested execute corresponding detection programs and display results on the display device;
wherein: the aging vehicle is provided with an aging vehicle control program, and the aging vehicle control program comprises: the device comprises a command name, a command code corresponding to the command name, and a detection program corresponding to the command name and the command code.
In this embodiment, the controller also plays the role of a client, and after the controller sends a command, the controller and the client both receive and execute the command, and the network card IP of the controller may be 192.168.22.1 by default.
Specifically, in step S30, the controller builds a DHCP service using DNSmasq, and allocates IP addresses to all clients, so that the clients and the controller are in the same network segment; then, the method further comprises the following steps:
checking the time of the control machine; if the time of the control machine is incorrect, the time of the control machine is manually set;
the aging vehicle control program writes the current time of the controller into the BIOS chip;
and restarting the DHCP service to enable the DHCP service state of the control machine to be an active state.
Further, the running environment of the aging vehicle control program is a unified UOS operating system.
In this embodiment, time service can be provided for subsequent operations, such as BIOS upgrade number writing, aging test, interface test, and the like, by checking the time of the controller.
FIG. 2 is a schematic circuit diagram of a batch synchronous test system for multiple computers according to an embodiment of the present invention; as shown in FIG. 2, a batch synchronous test system for multiple computers, comprising: the system comprises a plurality of computers to be tested 1, an aging vehicle 2 and display equipment 3; the computers 1 to be tested are arranged on the aging vehicle 2; an aging vehicle control program 21 is arranged on the aging vehicle 2; the aged vehicle control program 21 includes: the detection program comprises a command name, a command code corresponding to the command name, and a detection program corresponding to the command name and the command code;
the burn-in vehicle control program 21 is configured to set one of the computers 1 to be tested as the controller 11 and the other computers 1 to be tested as the clients 12 after detecting that the burn-in vehicle 2 is connected to the computer 1 to be tested; outputting corresponding detection programs according to the command codes input on the control machine 1 so as to enable all the computers 1 to be detected to execute the corresponding detection programs;
the controller 11 is used for building a DHCP service by utilizing DNSmasq, and allocating IP addresses to all clients so that the clients and the controller are in the same network segment; receiving an input command code, and executing a corresponding detection program; and issuing the command code to all clients;
the client 12 is used for executing a corresponding detection program according to the command code of the control machine;
the display device 3 is used for displaying the result of the detection program.
The batch synchronous testing method and system for multiple computers provided by the embodiment one have the following advantages that: setting one computer to be tested as a control machine and other computers to be tested as clients; the control machine builds DHCP service by utilizing DNSmasq, and allocates IP addresses to all clients, so that the clients and the control machine in the same aging vehicle are in the same network segment, and subsequent operation is facilitated, the test deployment time of the computer to be tested is greatly reduced, and the test efficiency is improved; meanwhile, the aging vehicle control program deployed on the aging vehicle enables all computers to be tested to execute corresponding detection programs after command codes are input on the control machine, and results are displayed on display equipment; in the invention, each aging vehicle can independently complete the test work of the vehicle, so that the tests of different aging vehicles are not interfered with each other, a plurality of aging vehicles can work simultaneously, the test efficiency is greatly improved, and the practicability is strong.
Example two
On the basis of the first embodiment, the command name of the batch synchronous testing method for the multiple computers comprises the following steps: checking an online machine, transmitting a program, carrying out BIOS upgrading and number writing on the vehicle, carrying out aging test on the vehicle and carrying out interface test on the vehicle.
Specifically, fig. 3 is a schematic flowchart of step S40 in the batch synchronization testing method for multiple computers according to the second embodiment of the present invention; as shown in fig. 3, step S40 is to input a command code on the controller, so that all the computers to be tested execute corresponding testing programs, and display the result on a display device, which specifically includes:
s401, inputting a command code corresponding to an online machine checking command on the control machine to judge whether all computers to be tested are online; after basic information of all online computers is acquired, displaying online results;
s402, when all computers to be tested are in an online state, transmitting programs to all computers to be tested, and deploying execution environments for clients;
s403, inputting a command code corresponding to a command for carrying out BIOS upgrading and number writing on the vehicle on the control machine so as to synchronously upgrade all computers to be tested and display an upgrading result;
or inputting a command code corresponding to the command for carrying out the aging test on the vehicle on the control machine so as to carry out the aging test on all computers to be tested and display an aging test result;
or, inputting a command code corresponding to the interface test command for the vehicle on the control machine, so that all computers to be tested perform interface test and display an interface test result;
wherein: the basic information of the online computer comprises: SN code of the online computer, IP address of the online computer, loading information of the desktop of the online computer and time delay information of response of the online computer.
Further, fig. 4 is a schematic flowchart of step S401 and step S402 in a batch synchronous testing method for multiple computers according to a second embodiment of the present invention; as shown in fig. 4, in step S401, a command code corresponding to the online machine checking command is input on the controller to determine whether all computers to be tested are online, and after obtaining basic information of all online computers, an online result is displayed, which specifically includes:
s4011, inputting a command code corresponding to the online machine to be checked on the control machine;
s4012, sending SSH public key of the control machine to all clients, so that the control machine remotely logs in the clients, and the clients execute the operation initiated by the control machine; wherein, the control machine does not need to input a password when logging in the client remotely;
s4013, the control machine initiates ping operation to IP addresses of all clients, marks the clients which are ping-connected as online and marks the clients which are ping-disconnected as offline;
in the step S402, when all the computers to be tested are in an online state, sending the test program to all the computers to be tested, and deploying an execution environment for the client; the method specifically comprises the following steps:
s4021, acquiring SN number of online client;
s4022, judging whether the desktop of the online client is loaded normally, if so, marking the desktop as loaded, and if not, marking the desktop as unloaded;
s4023, obtaining the time delay needed by the online client to execute the command and return the result;
s4024, displaying the basic information of the online client in sequence according to the SN number of the online client.
In the invention, the SSH public key of the control machine is sent to all the clients, so that the control machine can log in the client remotely and the client executes the operation initiated by the control machine, and the client logs in the client remotely and executes the command without inputting the password during the operation, thereby improving the testing efficiency.
Example four
FIG. 5 is a schematic flowchart of step S403 in a batch synchronous testing method for multiple computers according to a fourth embodiment of the present invention; as shown in fig. 5, in the second embodiment, a batch synchronous testing method for multiple computers is provided, where in step S403, a command code corresponding to a BIOS upgrade write number command is input to the controller, so that all computers to be tested are upgraded synchronously, and an upgrade result is displayed, and the method specifically includes:
s403-11, inputting a command code corresponding to the BIOS upgrading writing number on the control machine;
s403-12, according to the SN coding sequence of the computer to be tested, the aging vehicle control program sends a BIOS upgrading number writing instruction to all the computers to be tested in parallel;
s403-13, after receiving the BIOS upgrading number writing command, the computer to be tested upgrades;
s403-14, displaying the upgrade result of the whole vehicle, and sequentially displaying the upgrade result of each computer to be tested according to the SN coding sequence, wherein the upgrade result of each computer to be tested comprises: failed test items for each computer under test.
In this embodiment, the failed test item of each computer to be tested is displayed, so that the tester can be helped to quickly and accurately locate the fault machine.
Specifically, when the embodiment is used, the controller starts a background subprocess in the background, and the subprocess logs in the client to start a BIOS upgrade write command; then the controller starts the next background subprocess for logging the next client to start the BIOS upgrading number writing command; and so on. Because the speed of the controller for starting the background process is extremely high, all the computers to be tested almost simultaneously receive commands and are upgraded simultaneously.
FIG. 6 is an interface diagram of the burn-in vehicle control routine of the present invention; as shown in fig. 6, in the present invention, the command names in the aging vehicle control program may further include: and performing BIOS upgrading and number writing + aging test on the vehicle, storing the test result of the vehicle and the like.
FIG. 7 is a flow chart of the operation of the present invention; as shown in fig. 7, when the invention is used, the corresponding command codes input on the controller can directly contact the client and send command codes, and compared with the traditional mode, the invention saves the remote login server, checks the received IP through the background, and sends test commands through the background, and has the advantages of high efficiency and rapidness.
FIG. 8 is a schematic diagram illustrating BIOS upgrade number writing for a host vehicle according to the present invention; as shown in fig. 8, a plurality of computers to be tested may be installed on the burn-in vehicle, and the present invention is described by taking 8 computers to be tested as an example; in the invention, after each detection program is executed, each test result is counted, the test result is clear at a glance, the steps of inputting batch numbers by testers to find the SN codes of the tested machine, checking the hollows of all test items one by one and the like are omitted, and the operation is simple and clear.
The invention can be developed and run normally on the professional version 1021 of the UOS operating system, and can be run normally when tests are carried out on the professional version 1022 and the professional version 1030.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. The above-described system embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and other divisions may be realized in practice, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.