CN111090553A - Test system, test method and test device - Google Patents

Test system, test method and test device Download PDF

Info

Publication number
CN111090553A
CN111090553A CN201911208802.0A CN201911208802A CN111090553A CN 111090553 A CN111090553 A CN 111090553A CN 201911208802 A CN201911208802 A CN 201911208802A CN 111090553 A CN111090553 A CN 111090553A
Authority
CN
China
Prior art keywords
test
program
main
sub
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911208802.0A
Other languages
Chinese (zh)
Other versions
CN111090553B (en
Inventor
陈成波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911208802.0A priority Critical patent/CN111090553B/en
Publication of CN111090553A publication Critical patent/CN111090553A/en
Application granted granted Critical
Publication of CN111090553B publication Critical patent/CN111090553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a test system, a test method and a test device. The method comprises the steps of storing a plurality of sub-test programs and the mapping relation between each sub-test program and a test result in advance, determining a target sub-test program which is currently operated according to the mapping relation when receiving the test result sent by the main test equipment, starting a test thread when judging that the main test equipment has a fault, and testing from the next test program of the target sub-test program. When the technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so that the test reliability is improved, and on the other hand, when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program without starting from the initial sub-test program, so that the repeated test can be effectively avoided, and the test efficiency is improved.

Description

Test system, test method and test device
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a testing system, a testing method, and a testing device.
Background
Along with the popularization of the intelligent production mode, a large number of test programs can be imported into the test equipment in the production test process, and automatic test is carried out through the test equipment, so that manual test actions are reduced, and the test efficiency can be improved.
In the prior art, a single test device is usually used to test each machine to be tested, although this method can record a complete test process and the test process is simple, the test device inevitably fails, and once the test device fails, a new test device needs to be started and the machine to be tested needs to be retested.
Obviously, the above test method is easy to cause loss of test results, and once a fault occurs, the machine to be tested needs to be tested again, which results in repeated tests and lower test efficiency.
Disclosure of Invention
The test system comprises main test equipment and backup test equipment, the main test equipment and the backup test equipment are selected to test a machine to be tested, and when the main test equipment fails, the test efficiency can be improved, and repeated tests are avoided.
In order to solve the above technical problem, the present application provides a testing method, which is applied to a testing system including a main testing device and a backup testing device, and the method includes:
pre-storing a plurality of sub-test programs and mapping relations between each sub-test program and a corresponding test result; wherein, each sub-test program is obtained by dividing the test program;
receiving a test result sent by the main test equipment;
judging whether the running state of the main test equipment represents that the main test equipment has a fault or not;
if yes, determining a target sub-test program corresponding to the latest test result according to the mapping relation;
and starting a test thread and testing from the next test program of the target sub-test program.
Preferably, the determining whether the operation state of the main test device indicates that the main test device fails includes:
recording the longest test time corresponding to each sub-test program in advance;
judging whether the time interval between the current time and the time of the received latest test result reaches the longest test time or not;
and if so, determining that the main test equipment fails.
Preferably, the determining whether the operation state of the main test device indicates that the main test device fails includes:
judging whether the heartbeat of the main test equipment meets the preset requirement or not;
and if not, determining that the main test equipment fails.
Preferably, the method further comprises the following steps:
and storing the test result to the local.
Preferably, the method further comprises the following steps:
and outputting the current test state.
Preferably, when it is monitored that the main test device fails, the method further includes:
and outputting an alarm signal of the fault of the main test equipment.
Preferably, the method further comprises the following steps:
and recording the test source of each test result.
In order to solve the above technical problem, the present application provides a testing apparatus, which is applied to a testing system including a main testing device and a backup testing device, and the testing apparatus includes:
the storage module is used for pre-storing a plurality of sub-test programs and mapping relations between each sub-test program and a corresponding test result; wherein, each sub-test program is obtained by dividing the test program;
the receiving module is used for receiving the test result sent by the main test equipment;
the judging module is used for judging whether the running state of the main testing equipment represents that the main testing equipment fails, and if so, the determining module is triggered;
the determining module is used for determining a target sub-test program corresponding to the latest test result according to the mapping relation;
and the test module is used for starting a test thread and testing from the next test program of the target sub-test program.
In order to solve the above technical problem, the present application provides a testing apparatus, including a memory for storing a computer program;
a processor for implementing the steps of the test method as described when executing the computer program.
In order to solve the above technical problem, the present application provides a test system, which includes a main test device and a backup test device;
the main test equipment is used for testing each machine to be tested according to a test program to obtain a test result and sending the test result to the backup test equipment;
the backup test equipment is used for pre-storing a plurality of sub-test programs and mapping relations between the sub-test programs and corresponding test results; each sub-test program is obtained by dividing the test program; receiving a test result sent by the main test equipment; judging whether the running state of the main test equipment represents that the main test equipment has a fault or not; if yes, determining a target sub-test program corresponding to the latest test result according to the mapping relation; and starting a test thread and testing from the next test program of the target sub-test program.
The test method provided by the application is applied to a test system comprising main test equipment and backup test equipment, and the backup test equipment stores a plurality of sub-test programs in advance and the mapping relation between each sub-test program and the corresponding test result. Therefore, when the test result sent by the main test equipment is received, the currently running target sub-test program can be determined according to the mapping relation, and when the fact that the running state of the main test equipment represents that the main test equipment has a fault is judged, the test thread is started, and the next test program of the target sub-test program is tested. The technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so the test reliability is improved, on the other hand, the backup test equipment can determine the target sub-test program according to the mapping relation, so when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program, and the test does not need to be started from the initial sub-test program, so the repeated test can be effectively avoided, and the test efficiency is improved.
In addition, the testing device and the testing system provided by the application correspond to the method, and the effect is the same.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a testing method provided in an embodiment of the present application;
FIG. 2 is a flow chart of another testing method provided by embodiments of the present application;
fig. 3 is a structural diagram of a testing apparatus according to an embodiment of the present disclosure;
FIG. 4 is a block diagram of another testing method provided in the embodiments of the present application;
FIG. 5 is a testing system provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a test process when a main test device provided in an embodiment of the present application is normal;
fig. 7 is a schematic diagram of a testing process when a main testing device fails according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a test system, a test method and a test device.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a testing method according to an embodiment of the present disclosure. The method is applied to a test system comprising main test equipment and backup test equipment, and is explained from the perspective of the backup test equipment, wherein the number of the backup test equipment can be one or a plurality of backup test equipment, when the number of the backup test equipment is a plurality, only one backup test equipment is generally in an operating state, the following method is executed, other backup test equipment is only in a dormant state, after the main test equipment fails and the backup test equipment takes over the work of the main test equipment, one of the dormant backup test equipment is in the operating state, and the following method is also executed. The method comprises the following steps:
s10: and storing a plurality of sub-test programs and the mapping relation between each sub-test program and the corresponding test result in advance.
It can be understood that each sub-test program in this embodiment is obtained by dividing a complete test program, and the sub-test program may be divided into a plurality of sub-test programs according to different test programs, and the number of divisions is not limited in this embodiment. For example, the division may be made in terms of functions.
Each sub-test program has a corresponding test result, and the mapping relation obtained by the corresponding test result can be obtained by testing the machine to be tested in advance.
It should be noted that, in the mapping relationship, only the identifier corresponding to the test result and the identifier corresponding to the sub-test program may be used, for example, the identifiers may be in the form of numbers, where the sub-test program 1 corresponds to the test result 1, and the sub-test program 2 corresponds to the test result 2.
S11: and receiving a test result sent by the main test equipment.
In order to facilitate the subsequent determination of the target sub-test program through the mapping relationship, the main test device may add the identifier of the test result to, for example, the identifier of the test result mentioned above when sending the test result to the backup test device.
When the main test equipment obtains the test result, on one hand, the test result is synchronously sent to the backup test equipment, and on the other hand, the test result is stored locally. If the main test equipment has no fault all the time, all the test results are read out from the main test equipment. In addition, in order to increase the transmission speed between the main test device and the backup test device, the test result may be compressed, and when the test result needs to be interpreted, the corresponding decompression method is adopted to decompress to restore the test result.
In this embodiment, the purpose of receiving the test result by the backup test device may be to improve redundancy of the test result on the one hand and determine which sub-test program is currently running on the other hand. If, as stated above, the test result is tagged, it can be quickly determined which subroutine is run to.
S12: and judging whether the running state of the main test equipment indicates that the main test equipment fails, and if so, entering S13.
It can be understood that there are various ways for the backup test device to monitor the main test device, and this embodiment is not limited. The monitoring frequency can be a fixed frequency or real-time monitoring.
In order to consume the resources of the backup test device, S12 may be restarted when the first test result is received, or after a start test signal of the main test device is received.
S13: and determining the target sub-test program corresponding to the latest test result according to the mapping relation.
Since the test result obtained by the backup test device is synchronously sent by the main test device, the latest test result is obtained by the corresponding sub-test program, for example, the test result 2 is obtained after the sub-test program 2 runs, and the test result 2 is the latest test result, then the sub-test program 3 should be run at the next moment, and at this time, the target sub-test program is the sub-test program 2.
S14: and starting the test thread and testing from the next test program of the target sub-test program.
The backup test equipment only receives the test result and monitors the running state of the main test equipment when the main test equipment tests, but does not test, so when the main test equipment fails, the backup test equipment needs to switch the working state, specifically, a test thread is started, and the test is started from the next test program of the target sub-test program. For example, in the above, if the target sub-test program is the sub-test program 2, the backup test apparatus starts the test from the sub-test program 3. Because the test results 1 and 2 respectively corresponding to the sub-test program 1 and the sub-test program 2 are synchronized in the backup test device, the backup test device can obtain all the test results by sequentially obtaining the test results 3 and the like after starting the test from the sub-test program 3.
It can be understood that, after the main test device fails, and the backup test device takes over the test of the main test device, the backup test device becomes a new main test device, and then the corresponding execution strategy of the main test device is also executed, for example, the test result is sent to another backup test device, and the other backup test device also executes the corresponding execution strategy of the current backup test device, for example, the test result is received, whether the running state of the new main test device represents that the main test device fails or not is determined, and the description is omitted in this embodiment. In short, only one test device is the main test device and at least one test device is the backup test device at the same time.
The test method provided by this embodiment is applied to a test system including a main test device and a backup test device, and the backup test device stores a plurality of sub-test programs in advance and a mapping relationship between each sub-test program and a corresponding test result. Therefore, when the test result sent by the main test equipment is received, the currently running target sub-test program can be determined according to the mapping relation, and when the fact that the running state of the main test equipment represents that the main test equipment has a fault is judged, the test thread is started, and the next test program of the target sub-test program is tested. The technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so the test reliability is improved, on the other hand, the backup test equipment can determine the target sub-test program according to the mapping relation, so when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program, and the test does not need to be started from the initial sub-test program, so the repeated test can be effectively avoided, and the test efficiency is improved.
In the above embodiment, how to determine whether the main test device fails is not limited, and a specific determination method is provided in this embodiment. Fig. 2 is a flowchart of another testing method provided in the embodiment of the present application. As shown in fig. 2, S12 includes the following steps:
s120: and recording the longest test time corresponding to each sub-test program in advance.
S121: and judging whether the time interval between the current time and the time of the received latest test result reaches the maximum test time or not, and if so, entering S13.
In this embodiment, the running time of each sub-test program is determined in advance to be used as reference data for subsequent tests, and since the test processes of the same test program are basically similar when the same test program is tested on the same machine to be tested, the running time of each sub-test program is also approximately the same. It should be noted that the maximum testing time may be longer than the actual testing time, considering the normal difference of the testing process.
For the backup test device, the precondition for receiving the test result is that the main test device obtains the test result, therefore, if the main test device operates normally, the time interval between two adjacent test results should be less than the longest test time, and once the test result appears, the main test device can be considered as a fault if the test result is not received in the longest test time.
It will be appreciated that since each sub-test program may run for a different time, the corresponding maximum test time may also be different.
In this embodiment, the test time of each sub-test program is used as a reference, which can truly reflect the actual operation condition of each sub-test program, so that the maximum test time of each sub-test program is used as a basis for judging whether the main test device fails, and the accuracy of judgment can be improved.
The present application also provides another judging method, in parallel with the above-described method, and therefore, as another preferred embodiment, S12 includes:
judging whether the heartbeat of the main test equipment meets the preset requirement or not;
if not, determining that the main test equipment fails.
In this embodiment, whether the host fails is tested by using a heartbeat test method, and then, in addition to data transmission of a test result, heartbeat data needs to be sent between the main test device and the backup test device. The judgment method does not occupy excessive resources and has higher timeliness.
As another preferred embodiment, as shown in fig. 2, the testing method further includes:
s20: and storing the test result to the local.
In the above embodiment, although the backup test device receives the test result sent by the main test device, the test result may be stored in a cache manner, or may be stored locally in the backup test device. It can be understood that the test result is stored locally, on one hand, the reliability of the test result can be improved, and on the other hand, after the main test device fails, the test result can be completely provided, and the partial test result on the main test device and the partial test result on the backup test device do not need to be merged to be used as the final test result.
As shown in fig. 2, as another preferred embodiment, the method further includes:
s21: and outputting the current test state.
In order to facilitate the operation and maintenance personnel to know the current test progress, in this embodiment, the backup test device further outputs the current test state. E.g. the actual test time, the expected remaining test time, which sub-test program is currently running.
It will be appreciated that the output may be in a variety of ways, and if the backup test device has a display screen, it may be displayed on the display screen.
As shown in fig. 2, as another preferred embodiment, when it is detected that the main test device fails, the method further includes:
s22: and outputting an alarm signal of the fault of the main test equipment.
In this embodiment, the manner of outputting the alarm signal may be to locally output the alarm signal, for example, to control the alarm device to send the alarm signal, or to send the alarm signal to the operation and maintenance personnel through a network, for example, through a short message service or an email.
As shown in fig. 2, as another preferred embodiment, the method further includes:
s23: the test source of each test result is recorded.
By recording the test source of each test result, when the subsequent operation and maintenance personnel check the test results, the subsequent operation and maintenance personnel can quickly determine which test results come from the main test equipment and which test results come from the backup test equipment, and as for the recording mode, a source identifier, such as an ID (identity) number of the test equipment, can be added to the test results. In addition, the generation time of each test result can be recorded, so that the whole test process can be traced.
It should be noted that, in the present application, there is no strict sequence order among the steps, and as long as a logical order is met, the steps may be performed simultaneously or in a certain order, and fig. 1 to fig. 2 are only schematic manners, which are not representative, and only such an execution order is provided.
The above detailed description is made on the testing process of each testing method, and the application also provides a testing device corresponding to the method. The test apparatus is illustrated from the perspective of the functional module and the perspective of the hardware.
Based on the angle of the functional module, fig. 3 is a structural diagram of a testing apparatus according to an embodiment of the present disclosure. As a preferred embodiment, as shown in fig. 3, the device is applied to a test system including a main test device and a backup test device, and includes:
the storage module 10 is used for storing a plurality of sub-test programs in advance and mapping relationships between each sub-test program and a corresponding test result; each sub-test program is obtained by dividing the test program;
the receiving module 11 is configured to receive a test result sent by the main test device;
the judging module 12 is used for judging whether the running state of the main testing equipment represents that the main testing equipment fails, and if so, the determining module is triggered;
the determining module 13 is configured to determine a target sub-test program corresponding to a latest test result according to the mapping relationship;
and the test module 14 is used for starting the test thread and testing from the next test program of the target sub-test program.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
As a preferred embodiment, the test device further comprises the following modules:
and the local storage module is used for storing the test result to the local.
And the first output module is used for outputting the current test state.
And the second output module is used for outputting a fault alarm signal of the main test equipment when the main test equipment is monitored to have a fault.
And the recording module is used for recording the test source of each test result.
The test apparatus provided in this embodiment is applied to a test system including a main test device and a backup test device, and the backup test device stores a plurality of sub-test programs in advance and a mapping relationship between each sub-test program and a corresponding test result. Therefore, when the test result sent by the main test equipment is received, the currently running target sub-test program can be determined according to the mapping relation, and when the fact that the running state of the main test equipment represents that the main test equipment has a fault is judged, the test thread is started, and the next test program of the target sub-test program is tested. The technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so the test reliability is improved, on the other hand, the backup test equipment can determine the target sub-test program according to the mapping relation, so when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program, and the test does not need to be started from the initial sub-test program, so the repeated test can be effectively avoided, and the test efficiency is improved.
The test device mentioned above is described from the perspective of the functional module, and further, the present application also provides a test device described from the perspective of hardware. Fig. 4 is a structural diagram of another testing method provided in the embodiments of the present application. As shown in fig. 4, the apparatus comprises a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the testing method as mentioned in the above embodiments when executing the computer program.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 21 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor for processing a calculation operation related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after being loaded and executed by the processor 21, the computer program can implement the relevant steps of the testing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among others, Windows, Unix, Linux, and the like. Data 203 may include, but is not limited to, data corresponding to test results, and the like.
In some embodiments, the testing device may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in FIG. 4 is not intended to be limiting of testing devices and may include more or fewer components than those shown.
The testing device provided by the embodiment comprises a memory and a processor, wherein the processor executes a program on the memory, and the following testing method can be realized. The backup test equipment stores a plurality of sub-test programs in advance and the mapping relation between each sub-test program and the corresponding test result. Therefore, when the test result sent by the main test equipment is received, the currently running target sub-test program can be determined according to the mapping relation, and when the fact that the running state of the main test equipment represents that the main test equipment has a fault is judged, the test thread is started, and the next test program of the target sub-test program is tested. The technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so the test reliability is improved, on the other hand, the backup test equipment can determine the target sub-test program according to the mapping relation, so when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program, and the test does not need to be started from the initial sub-test program, so the repeated test can be effectively avoided, and the test efficiency is improved.
It is to be understood that, if the testing method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be substantially or partially implemented in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Fig. 5 is a testing system according to an embodiment of the present application, as shown in fig. 5, the testing system includes a main testing device 30 and a backup testing device 31;
and the main test equipment 30 is used for testing each machine to be tested according to the test program to obtain a test result, and sending the test result to the backup test equipment.
The backup testing device 31 is used for storing a plurality of sub-testing programs in advance and mapping relations between each sub-testing program and a corresponding testing result; each sub-test program is obtained by dividing the test program; receiving a test result sent by the main test equipment; judging whether the running state of the main test equipment represents that the main test equipment has a fault or not; if yes, determining a target sub-test program corresponding to the latest test result according to the mapping relation; and starting the test thread and testing from the next test program of the target sub-test program.
In specific implementation, the main test device and the backup test device are connected with the machine to be tested 1, the machine to be tested 2 and the machine to be tested N through a test network.
Fig. 6 is a schematic diagram of a test process when a main test device provided in an embodiment of the present application is normal.
Fig. 7 is a schematic diagram of a testing process when a main testing device fails according to an embodiment of the present application. As shown in fig. 6, when the main test device is normal, in the test process, the sub-test program 1 is run to obtain the test result 1, the sub-test program 2 is run to obtain the test result 2, and the sub-test program N is run to obtain the test result N. The backup test device receives test result 1, test result 2 and test result 3. As shown in fig. 7, when the main test device runs the sub-test program 1 to obtain the test result 1 and sends the test result 1 to the backup test device, and then a failure occurs, that is, a failure occurs while the sub-test program 2 is running, the backup test device does not obtain the test result 2, the latest test result is the test result 1, the target sub-test program is the sub-test program 1, and the next sub-test program is the sub-test program 2. Therefore, after the backup test judges that the main test equipment has a fault, the sub-test program 2 is directly operated to obtain a test result 2, and then the sub-test program N is operated to obtain a test result N.
The test system provided by this embodiment includes a main test device and a backup test device, and the backup test device stores a plurality of sub-test programs in advance and a mapping relationship between each sub-test program and its corresponding test result. Therefore, when the test result sent by the main test equipment is received, the currently running target sub-test program can be determined according to the mapping relation, and when the fact that the running state of the main test equipment represents that the main test equipment has a fault is judged, the test thread is started, and the next test program of the target sub-test program is tested. The technical scheme is applied, on one hand, the backup test equipment can obtain the test result, so the test reliability is improved, on the other hand, the backup test equipment can determine the target sub-test program according to the mapping relation, so when the backup test equipment takes over the test work of the main test equipment, the test can be started by the next test program of the target sub-test program, and the test does not need to be started from the initial sub-test program, so the repeated test can be effectively avoided, and the test efficiency is improved.
The test system, the test method and the test device provided by the present application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A test method is characterized in that the method is applied to a test system comprising a main test device and a backup test device, and comprises the following steps:
pre-storing a plurality of sub-test programs and mapping relations between each sub-test program and a corresponding test result; wherein, each sub-test program is obtained by dividing the test program;
receiving a test result sent by the main test equipment;
judging whether the running state of the main test equipment represents that the main test equipment has a fault or not;
if yes, determining a target sub-test program corresponding to the latest test result according to the mapping relation;
and starting a test thread and testing from the next test program of the target sub-test program.
2. The method of claim 1, wherein the determining whether the operational state of the primary test device indicates that the primary test device is malfunctioning comprises:
recording the longest test time corresponding to each sub-test program in advance;
judging whether the time interval between the current time and the time of the received latest test result reaches the longest test time or not;
and if so, determining that the main test equipment fails.
3. The method of claim 1, wherein the determining whether the operational state of the primary test device indicates that the primary test device is malfunctioning comprises:
judging whether the heartbeat of the main test equipment meets the preset requirement or not;
and if not, determining that the main test equipment fails.
4. The test method of claim 1, further comprising:
and storing the test result to the local.
5. The test method of claim 1, further comprising:
and outputting the current test state.
6. The method of claim 1, wherein when the primary test device is monitored to fail, further comprising:
and outputting an alarm signal of the fault of the main test equipment.
7. The test method of any one of claims 1-6, further comprising:
and recording the test source of each test result.
8. A kind of test device, characterized by that, apply to the test system comprising main test equipment and backup test equipment, this apparatus includes:
the storage module is used for pre-storing a plurality of sub-test programs and mapping relations between each sub-test program and a corresponding test result; wherein, each sub-test program is obtained by dividing the test program;
the receiving module is used for receiving the test result sent by the main test equipment;
the judging module is used for judging whether the running state of the main testing equipment represents that the main testing equipment fails, and if so, the determining module is triggered;
the determining module is used for determining a target sub-test program corresponding to the latest test result according to the mapping relation;
and the test module is used for starting a test thread and testing from the next test program of the target sub-test program.
9. A test apparatus, comprising a memory for storing a computer program;
a processor for implementing the steps of the testing method according to any one of claims 1 to 7 when executing the computer program.
10. A test system is characterized by comprising a main test device and a backup test device;
the main test equipment is used for testing each machine to be tested according to a test program to obtain a test result and sending the test result to the backup test equipment;
the backup test equipment is used for pre-storing a plurality of sub-test programs and mapping relations between the sub-test programs and corresponding test results; each sub-test program is obtained by dividing the test program; receiving a test result sent by the main test equipment; judging whether the running state of the main test equipment represents that the main test equipment has a fault or not; if yes, determining a target sub-test program corresponding to the latest test result according to the mapping relation; and starting a test thread and testing from the next test program of the target sub-test program.
CN201911208802.0A 2019-11-30 2019-11-30 Test system, test method and test device Active CN111090553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911208802.0A CN111090553B (en) 2019-11-30 2019-11-30 Test system, test method and test device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911208802.0A CN111090553B (en) 2019-11-30 2019-11-30 Test system, test method and test device

Publications (2)

Publication Number Publication Date
CN111090553A true CN111090553A (en) 2020-05-01
CN111090553B CN111090553B (en) 2023-01-10

Family

ID=70394247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911208802.0A Active CN111090553B (en) 2019-11-30 2019-11-30 Test system, test method and test device

Country Status (1)

Country Link
CN (1) CN111090553B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732512A (en) * 2021-01-26 2021-04-30 展讯半导体(成都)有限公司 Test method, function machine and related product
CN112862451A (en) * 2021-03-02 2021-05-28 岭东核电有限公司 Work order processing method and device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634853A (en) * 2018-11-30 2019-04-16 平安科技(深圳)有限公司 Data test method, system, electronic device and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634853A (en) * 2018-11-30 2019-04-16 平安科技(深圳)有限公司 Data test method, system, electronic device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732512A (en) * 2021-01-26 2021-04-30 展讯半导体(成都)有限公司 Test method, function machine and related product
CN112862451A (en) * 2021-03-02 2021-05-28 岭东核电有限公司 Work order processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111090553B (en) 2023-01-10

Similar Documents

Publication Publication Date Title
CN111752776B (en) Cyclic power-on and power-off test method and system for server
WO2023115999A1 (en) Device state monitoring method, apparatus, and device, and computer-readable storage medium
CN111090553B (en) Test system, test method and test device
CN116340076B (en) Hard disk performance test method, device and medium
CN115547396B (en) Test method and device for eMMC
CN114356499A (en) Kubernetes cluster alarm root cause analysis method and device
CN113721144A (en) Motor aging test method and device, storage medium and electronic equipment
CN110674034A (en) Health examination method and device, electronic equipment and storage medium
CN109032320B (en) Battery backup unit testing method and related equipment
CN114328098A (en) Slow node detection method and device, electronic equipment and storage medium
CN110908866A (en) Software monitoring method and related equipment
CN114416589B (en) Network target range comprehensive detection method, device, equipment and readable storage medium
CN116302722A (en) Multi-core processor stability testing method and device, electronic equipment and storage medium
CN111897697A (en) Server hardware fault repairing method and device
CN117149550A (en) Solid state disk performance detection method and device and electronic equipment
CN111124818B (en) Monitoring method, device and equipment for Expander
CN115391110A (en) Test method of storage device, terminal device and computer readable storage medium
CN115437865A (en) Method, device, equipment and medium for testing abnormal power failure of hard disk
CN115576737A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and storage medium
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN114428667A (en) Performance test method, device and medium
CN111858208B (en) Standby function testing method, device, equipment and medium of processor chip
CN110399258B (en) Stability testing method, system and device for server system
CN112084077A (en) Aging test method, device and medium of USB (Universal Serial bus) equipment and USB equipment
CN117041110A (en) Test method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant