Test method and system and computer readable storage medium

By restarting and initializing the configuration parameters of the test board before each round of test, the problem of conflicts in test items in multiple rounds of tests is solved, improving the efficiency of the board test and simplifying the testing process design.

CN119065908APending Publication Date: 2024-12-03ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310628749.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In multiple rounds of testing scenarios, due to possible conflicts between test items in different rounds of testing, the single board test is inefficient, and multiple mechanisms need to be set up in the test process to eliminate conflicts, which increases the design complexity.

Method used

By restarting the test board before each round of tests, initializing the configuration parameters, using pre-loaded test program files for multiple rounds of tests, eliminating conflicts between test items, and establishing a communication link between the test host and the board Synchronize the test information.

Benefits of technology

The continuity and efficiency of single-board testing are improved, the design complexity of the test process is reduced, and the need to set up multiple conflict elimination mechanisms in the single-board testing process is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065908A_ABST
    Figure CN119065908A_ABST
Patent Text Reader

Abstract

The invention relates to a testing method and system and a computer readable storage medium, and relates to the technical field of computer hardware testing. In the application, a to-be-tested single board receives a test instruction sent by a test host, the test instruction is used for instructing the to-be-tested single board to perform multi-round tests in response to the test instruction, and the multi-round tests are performed based on a pre-loaded test program file to obtain a test result. Wherein the test program file comprises a process starting file corresponding to at least one test item. And before each round of testing in the multiple rounds of testing, the to-be-tested single board is restarted. According to the method provided by the invention, conflicts among the test items of each round of test in multiple rounds of tests can be eliminated, so that continuous tests are realized, and the test efficiency can be improved. Moreover, research and development personnel do not need to set various mechanisms in the test process of the to-be-tested single board in advance in order to eliminate conflicts among the test items, so that the design complexity of the test process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer hardware testing, and in particular to a testing method, system and computer-readable storage medium. Background Art

[0002] In actual applications, in order to ensure the quality of the board, it is usually necessary to test the basic functions of the board. For example, the network interface, video input and output interface, capture card, etc. of the board are tested through the test process.

[0003] In the scenario of performing multiple rounds of continuous testing on the same single board, there may be conflicts between the test items in different rounds of testing. For example, in the process of multiple rounds of testing of a single board, some configuration parameter modifications of the single board in one round of testing may affect the next round of testing, resulting in low efficiency of single board testing. In addition, in order to eliminate conflicts between test items in each round, R&D personnel usually need to set up multiple mechanisms in the test process of the single board in advance, which has the problem of high complexity in the design of the test process of the single board. Summary of the invention

[0004] The embodiments of the present application provide a testing method, system and computer-readable storage medium, which can eliminate conflicts in test items between multiple rounds of testing, thereby improving the efficiency of single-board testing and reducing the design complexity of the single-board testing process.

[0005] In a first aspect, the present application provides a test method, which is applied to a single board to be tested, and the single board to be tested communicates with a test host, and the method includes: receiving a test instruction sent by the test host, and the test instruction is used to instruct the single board to be tested to perform multiple rounds of tests. In response to the test instruction, multiple rounds of tests are performed based on a pre-loaded test program file to obtain test results. Among them, the test program file includes a process startup file corresponding to at least one test item. Before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested. The test results are sent to the test host.

[0006] In a possible implementation of the first aspect, the restarting of the single board to be tested includes: restarting the single board to be tested based on a test continuation flag, wherein the test continuation flag is used to instruct the single board to be tested to continue testing.

[0007] In a possible implementation manner of the first aspect, the continued test flag is carried in the test instruction, or the continued test flag is pre-configured in the test program file.

[0008] In a possible implementation of the first aspect, restarting the single board to be tested includes: the single board to be tested sends a restart request to the test host, the restart request is used to request to restart the single board to be tested to initialize the configuration parameters of the single board to be tested. After receiving confirmation information sent by the test host in response to the restart request, the single board to be tested restarts.

[0009] In a possible implementation of the first aspect, the method further includes: after the single board to be tested is restarted, establishing a communication link with the test host and synchronizing test information. The test information is used to indicate a test round of the single board to be tested.

[0010] In a possible implementation manner of the first aspect, receiving a test instruction sent by a test host includes: receiving a test instruction sent by the test host when a board to be tested is in place and a test program file has been loaded.

[0011] In a possible implementation manner of the first aspect, sending the test result to the test host includes: after each round of testing in the multiple rounds of testing is completed, sending the test result corresponding to each round of testing to the test host.

[0012] In a possible implementation of the first aspect, the test host pre-stores a test program file corresponding to each of the multiple boards. The board to be tested is one of the multiple boards, and the method further includes: receiving a first state switching instruction sent by the test host, the first state switching instruction being used to indicate that the state of the board to be tested is switched from a business state to a test state. The first state switching instruction carries a file index corresponding to the board to be tested. In response to the first state switching instruction, the test program file is obtained and loaded from the test host according to the file index.

[0013] In a possible implementation manner of the first aspect, the method further includes:

[0014] A second state switching instruction sent by the test host is received, where the second state switching instruction is used to instruct the state of the board to be tested to switch from the test state to the service state.

[0015] In response to the second state switching instruction, the test program file is uninstalled.

[0016] In a possible implementation manner of the first aspect, during the process of performing multiple rounds of testing on the board to be tested, the method further includes: receiving a test suspension instruction sent by a test host, and suspending the test in response to the test suspension instruction.

[0017] And after the test of the single board to be tested is suspended, a test continuation instruction sent by the test host is received, and the test is continued in response to the test continuation instruction.

[0018] In a second aspect, a single board is provided, comprising: a receiving unit for receiving a test instruction sent by a test host, the test instruction being used to instruct the single board to be tested to perform multiple rounds of tests. A test unit is used to respond to the test instruction and perform multiple rounds of tests based on a pre-loaded test program file to obtain test results. The test program file includes a process startup file corresponding to at least one test item. Before each round of testing in the multiple rounds of testing, the test unit is used to restart the single board to be tested to initialize the configuration parameters of the single board to be tested. A sending unit is used to send the test results to the test host.

[0019] In a possible implementation of the second aspect, the test unit is specifically configured to restart the single board to be tested based on a test continuation flag, wherein the test continuation flag is used to instruct the single board to be tested to continue testing.

[0020] In a possible implementation manner of the second aspect, the continued test flag is carried in the test instruction, or the continued test flag is pre-configured in the test program file.

[0021] In a possible implementation of the second aspect, the test unit is specifically configured to send a restart request to the test host, the restart request being used to request restarting the board to be tested to initialize configuration parameters of the board to be tested. When receiving confirmation information sent by the test host in response to the restart request, the board to be tested is restarted.

[0022] In a possible implementation of the second aspect, the test unit is further configured to: establish a communication link with the test host after restarting, and synchronize test information. The test information is used to indicate a test round of the board to be tested.

[0023] In a possible implementation manner of the second aspect, the receiving unit is specifically configured to receive a test instruction sent by a test host when the board to be tested is in place and the test program file has been loaded.

[0024] In a possible implementation manner of the second aspect, the sending unit is specifically configured to send a test result corresponding to each round of testing to a test host after each round of testing in the multiple rounds of testing is completed.

[0025] In a possible implementation of the second aspect, the test host pre-stores a test program file corresponding to each of the multiple boards. The board to be tested is one of the multiple boards, and the receiving unit is also used to receive a first state switching instruction sent by the test host, and the first state switching instruction is used to indicate that the state of the board to be tested is switched from the business state to the test state. The first state switching instruction carries a file index corresponding to the board to be tested. The test unit is also used to respond to the first state switching instruction and obtain and load the test program file from the test host according to the file index.

[0026] In a possible implementation of the second aspect, the receiving unit is further configured to receive a second state switching instruction sent by the test host, the second state switching instruction being used to instruct the state of the board to be tested to switch from the test state to the service state. The testing unit is further configured to uninstall the test program file in response to the second state switching instruction.

[0027] In a possible implementation of the second aspect, during the process of performing multiple rounds of tests on the single board to be tested, the receiving unit is further used to receive a test pause instruction sent by the test host, and the testing unit is further used to respond to the test pause instruction and pause the test. And after the test of the single board to be tested is paused, the receiving unit is further used to receive a test continuation instruction sent by the test host, and the testing unit is further used to respond to the test continuation instruction and continue the test.

[0028] On the third aspect, a testing method is provided, which is applied to a testing host, and the testing host communicates with a single board to be tested, and the method includes: sending a test instruction to the single board to be tested, the test instruction is used to instruct the single board to be tested to perform multiple rounds of testing; receiving a test result sent by the single board to be tested, the test result is obtained by the single board to be tested responding to the test instruction and performing multiple rounds of testing based on a pre-loaded test program file; the test program file includes a process startup file corresponding to at least one test item; wherein, before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested.

[0029] In a possible implementation of the third aspect, the above method also includes: receiving a restart request sent by the single board to be tested, the restart request is used for the single board to be tested to request a restart to initialize the configuration parameters of the single board to be tested; in response to the restart request, sending a confirmation message to the single board to be tested, the confirmation message is used to indicate that the single board to be tested is restarted.

[0030] In a possible implementation of the third aspect, the test host pre-stores a test program file corresponding to each of a plurality of boards, and the board to be tested is one of the plurality of boards. The method further includes: sending a first state switching instruction to the board to be tested, the first state switching instruction carrying a file index corresponding to the board to be tested; the first state switching instruction is used to instruct the board to be tested to obtain and load the test program file from the test host according to the file index, so that the state of the board to be tested is switched from a business state to a test state.

[0031] In a possible implementation of the third aspect, the above method also includes: sending a second state switching instruction to the single board to be tested, the second state switching instruction is used to instruct the single board to be tested to respond to the second state switching instruction and uninstall the test program file so that the state of the single board to be tested is switched from the test state to the business state.

[0032] In a possible implementation of the third aspect, during the process of performing multiple rounds of testing on the single board to be tested, the method further includes: sending a test pause instruction to the single board to be tested, the test pause instruction is used to instruct the single board to be tested to pause the test. And after the test of the single board to be tested is paused, sending a test continue instruction to the single board to be tested, the test continue instruction is used to instruct the single board to be tested to continue the test.

[0033] In a fourth aspect, a test host is provided, which communicates with a single board to be tested; the test host includes: a product configuration management module, a software version management module, and a tooling self-test communication module; the product configuration management module is used to receive input test instructions indicating the test of the single board to be tested; the software version management module is used to pre-store the test program file of the single board to be tested; the tooling self-test communication module is used to send the test instructions and the test program file of the single board to be tested to the single board to be tested, so that the single board to be tested completes the test; the product configuration management module is also used to receive the test results returned by the single board to be tested.

[0034] In a fifth aspect, a test system is provided, comprising a test host and a single board to be tested, wherein the test host communicates with the single board to be tested. The test host is used to send a test instruction to the single board to be tested, and the test instruction is used to instruct the single board to be tested to perform multiple rounds of tests. The single board to be tested is used to respond to the test instruction and perform multiple rounds of tests based on a pre-loaded test program file to obtain test results. Among them, the test program file includes a process startup file corresponding to at least one test item. Before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested. And it is used to send the test results to the test host.

[0035] In a sixth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a single board, the test method of any of the above embodiments is implemented.

[0036] In a seventh aspect, a computer program product is provided, the computer program product comprising computer program instructions, which implement the test method of any of the above embodiments when executed by a single board.

[0037] The beneficial effects of the technical solution provided by the embodiment of the present application are: by initializing the configuration parameters of the single board to be tested before each round of testing, conflicts between test items in each round of multiple rounds of testing can be eliminated, thereby achieving continuous testing and improving test efficiency. In addition, R&D personnel do not need to set up multiple mechanisms in advance in the test process of the single board to be tested in order to eliminate conflicts between test items, which can reduce the design complexity of the test process. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only drawings of some embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0039] Figure 1 An application scenario diagram of a test system shown in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of the structure of a test host shown in an embodiment of the present application;

[0041] Figure 3 A structural block diagram of a test host shown in an embodiment of the present application;

[0042] Figure 4a A schematic diagram of a tool communication process shown in an embodiment of the present application;

[0043] Figure 4b A connection diagram of another tooling communication process shown in an embodiment of the present application;

[0044] Figure 5 An interactive flow chart of a testing method shown in an embodiment of the present application;

[0045] Figure 6 A schematic diagram of a first interface shown in an embodiment of the present application;

[0046] Figure 7 An interactive flow chart of another testing method shown in an embodiment of the present application;

[0047] Figure 8 A schematic diagram of a second interface shown in an embodiment of the present application;

[0048] Fig. 9 A schematic diagram of another testing method according to an embodiment of the present application;

[0049] Fig.10 A process schematic diagram of another testing method shown in an embodiment of the present application;

[0050] Fig.11 A structural block diagram of a single board to be tested shown in an embodiment of the present application;

[0051] Fig.12 A structural block diagram of another test host shown in an embodiment of the present application. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0053] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0054] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0055] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.

[0056] In actual applications, in order to ensure the quality of the board, it is usually necessary to test the basic functions of the board. For example, the network interface, video input and output interface, capture card, etc. of the board are tested through the test process.

[0057] In the scenario of performing multiple rounds of continuous testing on the same single board, there may be conflicts between the test items in different rounds of testing. For example, in the process of multiple rounds of testing of a single board, some configuration parameter modifications of the single board in one round of testing may affect the next round of testing, resulting in low efficiency of single board testing. In addition, in order to eliminate conflicts between test items in each round, R&D personnel usually need to set up multiple mechanisms in the test process of the single board in advance, which has the problem of high complexity in the design of the test process of the single board.

[0058] In view of this, an embodiment of the present application provides a test method, before each round of testing of multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested. The method provided by the embodiment of the present application can eliminate the conflicts between the test items of each round of testing in multiple rounds of testing by initializing the configuration parameters of the single board to be tested before each round of testing, thereby realizing continuous testing and improving the test efficiency. In addition, the R&D personnel do not need to set a variety of mechanisms in advance in the test process of the single board to be tested in order to eliminate the conflicts between the test items, which can reduce the design complexity of the test process.

[0059] The present application embodiment provides a test system for executing the test method provided in the present application embodiment. Figure 1 , Figure 1 The application scenario diagram of a test system provided by an embodiment of the present application is shown, wherein the test system comprises a test host 100 and a single board to be tested 110. The test host 100 communicates with the single board to be tested 110.

[0060] The test host 100 may be any computing device with computing processing capabilities, or a functional module in the computing device. For example, the test host 100 may be a general-purpose computer, a personal computer, a server, a router, a switch, a base station, an intelligent network card, etc. The specific implementation of the test host 100 is not limited here.

[0061] The single board 110 to be tested may be a single board of any type and function, for example, the single board 110 to be tested may be a line card, a switch board, etc. The specific implementation of the single board to be tested is not limited here.

[0062] It should be understood that the test host 100 can communicate with one or more boards, and the board to be tested 110 is any one of the multiple boards communicating with the test host 100. The embodiment of the present application does not specifically limit the number of boards communicating with the test host 100.

[0063] In some embodiments, the test host 100 can communicate with multiple boards through multiple card slots. Figure 2 , Figure 2 This is a structural diagram of a test host shown in an embodiment of the present application. The test host 100 is configured with multiple card slots, and multiple boards are respectively inserted into the multiple card slots of the test host 100, so that the test host can communicate with the multiple boards.

[0064] In one example, see Figure 3 , Figure 3The structural block diagram of a test host shown in the present application, the test host 100 includes a product configuration management module 101, a software version management module 102, and a tool self-test communication module 103. It should be understood that the naming of each functional module in the present application is only for exemplary description, and alternatively, the product configuration management module 101 can also be named a receiving module; the software version management module 102 can also be named a management module; and the tool self-test communication module 103 can also be named a sending module.

[0065] Among them, the product configuration management module 101 is used to receive the test instruction input by the user to instruct to test the single board to be tested 110, and the software version management module 102 is used to pre-store the test program file of the single board to be tested. The tooling self-test communication module 103 is used to send the test instruction and the test program file of the single board to be tested to the single board to be tested 110, so that the single board to be tested 110 completes the test, and the product configuration management module 101 is also used to receive the test result returned by the single board to be tested.

[0066] Optional, Figure 3 The tool self-check communication module 103 shown can be a functional module or a process. In the case where the tool self-check communication module 103 is a process, the tool self-check communication module 103 in this application can also be called a tool communication process or a tool self-check communication process, etc. Figure 4a , Figure 4a A connection diagram of a tooling communication process is shown in an embodiment of the present application, wherein the tooling communication process communicates with the processes running in the single board to be tested respectively.

[0067] Combination Figure 4a , see Figure 4b In one example, an automated task (JOB) is run in the tooling communication process, and the automated task is used to receive the test instruction from the product configuration management module 101, and to communicate with the process running on the single board to be tested through an interactive task (task). For example, a test program file is sent to the single board to be tested through task1, a test instruction is sent to the single board to be tested through task2, and a test result returned by the single board to be tested is received through task3.

[0068] It should be understood that the test program file includes a process startup file of at least one test item. For a detailed explanation of the test program file, please refer to the description of the following embodiments. In addition, the test host can first send the test program file to the single board 110 to be tested, and send the test instructions when the single board 110 to be tested starts the process. The test program file and the test instructions of the single board to be tested can also be sent to the single board 110 to be tested at the same time, so that the test can be directly performed after the single board to be tested starts the process. The embodiments of the present application do not impose any special restrictions on the specific implementation method of the test host 100 sending test instructions and test program files.

[0069] Figure 5 An interactive flow chart of a test method provided in an embodiment of the present application, such as Figure 5 As shown, this method can be Figure 1 The test system shown includes a test host 100 and a single board to be tested 110. The method may include the following steps:

[0070] S501. A test host sends a test instruction to a board to be tested. The test instruction is used to instruct the board to be tested to perform multiple rounds of testing.

[0071] Specifically, multiple rounds of testing can be understood as continuous multiple tests on the single board to be tested, and each round of testing tests one or more test items of the single board to be tested. The embodiment of the present application does not place any special restrictions on the number and type of test items of the single board to be tested in each round of testing. In an example, the multiple rounds of testing of the single board to be tested include two rounds of testing, and the test items of each round of testing are all to test the network interface of the single board to be tested, that is, the network interface is tested twice continuously. It should be understood that the number and type of test items in each round of testing are set according to actual test requirements, and the embodiment of the present application does not place any special restrictions on the specific division method of the test rounds.

[0072] In some embodiments, the test instruction can be input by the user in the interface displayed by the test host, or can be input by the user in other devices that communicate with the test host, and after the input is completed, it is sent to the test host by the other device. The embodiment of the present application does not specifically limit the specific input method of the test instruction.

[0073] In some embodiments, the test instruction is sent when the test host determines that the board to be tested is in place and the test program file has been loaded on the board to be tested.

[0074] Specifically, the test command is input by the user in a test interface displayed by the test host, and a command sending control is displayed on the test interface. In response to the user's operation on the command sending control, the test host determines whether the single board to be tested is in place, and if the single board to be tested is in place, determines whether the single board to be tested has loaded the test program file, and if the test program file has been loaded, sends the test command to the single board to be tested.

[0075] In one example, see Figure 6 , Figure 6A schematic diagram of a first interface shown in an embodiment of the present application. The first interface is an interface displayed by a test host, and the first interface includes the status of multiple boards communicating with the test host. When the single board to be tested is in place and the test program file has been loaded on the single board to be tested, the status of the single board to be tested is a test status. Otherwise, it is a business status. In response to a selection instruction of a test control 610 of a single board to be tested in a test status, a test instruction is sent to the single board to be tested.

[0076] The test host provided in the embodiment of the present application can avoid sending test instructions to the single board to be tested when the single board to be tested is not in place or the test program file is not loaded, thereby avoiding test failure by determining that the single board to be tested is in place and the test program file has been loaded on the single board to be tested before sending the test instruction.

[0077] S502: The board to be tested responds to the test instruction and performs multiple rounds of tests based on the pre-loaded test program file to obtain test results.

[0078] Before testing the single board to be tested, the R&D personnel need to configure the corresponding test program file for each single board to be tested based on the test items that each single board to be tested needs to test. The test program file includes a process startup file corresponding to at least one test item. The single board to be tested completes the test of the corresponding test item by obtaining and running the process corresponding to the process startup file of each test item in the test program file. It should be understood that the test program file is also called a test patch package.

[0079] Wherein, before each round of testing of the single board to be tested, that is, after each round of testing of the single board to be tested is completed, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested. For example, before the single board to be tested performs the second round of testing, that is, after the first round of testing is completed, the single board to be tested is restarted. It should be noted that before the single board to be tested performs the first round of testing, since the test needs to start the single board to be tested, it can also be understood that the single board to be tested is restarted before the first round of testing.

[0080] It should be understood that the configuration parameters are the state or parameters of each chip or interface included in the single board to be tested. When the single board to be tested is tested, the state or parameters of each chip or interface included in the single board to be tested may be changed during the test process, so the single board to be tested needs to be restarted to initialize the state or parameters of each chip or interface included in the single board to be tested.

[0081] Optionally, the single board to be tested restarts the single board to be tested based on the re-test flag to perform multiple rounds of testing. The re-test flag is used to instruct the single board to be tested to continue testing. In other words, the re-test flag is used to instruct the single board to be tested to perform multiple consecutive rounds of testing. In the case of a re-test flag, after a round of testing is completed, the single board to be tested is restarted again based on the re-test flag to perform the next round of testing, and multiple rounds of testing are repeated until the test rounds of the single board meet the test rounds indicated by the test host.

[0082] Specifically, when the board to be tested is configured to recognize the re-testing mark, it is determined that the current test is a continuous multiple-round test. After each round of multiple rounds of testing is completed, it is restarted, and after the restart is completed, it establishes communication with the test host and exchanges test information, and then starts the process corresponding to the test item in the test program file to perform the next round of testing.

[0083] Exemplarily, when the board to be tested recognizes the re-testing mark, the board to be tested restarts after completing the first round of testing, and after the restart is completed, establishes communication with the test host and exchanges test information, and then starts the process corresponding to the test item in the test program file to perform the second round of testing. The test information is used to inform the test host that the first round of testing has been completed.

[0084] In a possible implementation, the continued test flag is carried in the test instruction, or the continued test flag is pre-configured in the test program file.

[0085] Specifically, the test host can carry a re-test flag in the test instruction. When the board to be tested recognizes the re-test flag, it determines to restart after each round of testing is completed, that is, restart after the process corresponding to the test program file is executed to initialize the configuration parameters.

[0086] The re-test flag is pre-configured in the test program file of the single board to be tested. The re-test instruction is set after the last test item among the multiple test items included in the test program file, so that after the single board to be tested completes the test of the last test item, it can recognize the re-test flag and then restart according to the re-test flag to initialize the configuration parameters.

[0087] In one example, the R&D personnel predetermine a list of test items that need to be tested for the board to be tested, then generate a test program file according to the list of test items, and then set a continuation test flag after the last test item in the list of test items.

[0088] The method provided in the embodiment of the present application enables the single board to be tested to obtain a test continuation flag in different ways, and then instructs the single board to be tested to complete the restart according to the test continuation flag, thereby initializing the configuration parameters of the single board to be tested, making the test scenario of the single board to be tested more flexible, thereby being able to meet different test requirements of users.

[0089] Optional, see Figure 7 , Figure 7 This is an interactive flow chart of another test method shown in an embodiment of the present application. When the single board to be tested obtains a continued test flag, the single board to be tested is further configured to perform the following steps:

[0090] S701. The board to be tested sends a restart request to the test host, where the restart request is used to request to restart the board to be tested to initialize configuration parameters of the board to be tested.

[0091] S702: The test host sends a confirmation message to the board to be tested in response to the restart request.

[0092] S703: The board to be tested restarts the board to be tested in response to the confirmation information returned by the test host.

[0093] S704: The board to be tested starts the process after the restart is completed.

[0094] S705: The board to be tested establishes communication with the test host.

[0095] S706: The board to be tested exchanges test information with the test host, where the test information is used to indicate a test round of the board to be tested.

[0096] In this way, the method provided in the embodiment of the present application can initialize the configuration parameters of the single board to be tested by controlling the single board to be tested to restart before each round of testing in multiple rounds of testing, thereby eliminating conflicts between test items in each round of testing. And after the single board to be tested is restarted, by starting the process, establishing communication with the test host, and exchanging test information, the single board to be tested can quickly perform the next round of testing after the restart is completed, thereby realizing continuous testing of the single board to be tested, thereby improving the efficiency of single board testing.

[0097] S503: The board to be tested sends the test result to the test host.

[0098] Specifically, the test results include the test status of the board to be tested, the running results of each test item, and the intermediate data generated by the test item. Among them, the test status of the board to be tested includes completed test, untested, and testing. The running results of the test items include successful operation and failed operation.

[0099] Optionally, the test results also include the total number of test items, the number of test items with successful running results, and the number of test items with failed running results.

[0100] In some embodiments, the above S503 specifically includes: after each round of testing in the multiple rounds of testing is completed, the board to be tested sends the test result corresponding to each round of testing to the test host.

[0101] In response, after receiving the test result sent by the board to be tested, the test host may display an interface including the test result of the board to be tested in response to a test result display instruction input by the user.

[0102] For example, see Figure 8 , Figure 8 A schematic diagram of a second interface shown in an embodiment of the present application. The second interface displays the test results of the single board A to be tested. The test results include at least one of the tested rounds, the number of test items, the number of test items that have been successfully tested, the number of test items that have failed, and the test status of the single board to be tested.

[0103] Optionally, the second interface further displays a card slot identifier of the test host corresponding to the single board to be tested, where the card slot identifier is used to identify the card slot connecting the single board to be tested and the test host.

[0104] It should be understood that the test host can display the test results of all the boards to be tested that communicate with the test host in response to the test result display instruction input by the user. It can also display only the test result of one board to be tested indicated by the user. The embodiment of the present application does not place any particular restrictions on the specific implementation method of displaying the test results by the test host.

[0105] In some other embodiments, the above S503 specifically includes:

[0106] After each round of testing in the multiple rounds of testing is completed, the single board to be tested stores the test results of each round of testing, and the single board to be tested sends the stored test results to the test host at a preset period.

[0107] In one example, the board to be tested stores the test results of each round of testing in different result_x.txt files. For example, the test results of the first round are stored in result_1.txt, and the test results of the second round are stored in result_2.txt. The stored test results are then sent to the test host at a preset period.

[0108] Optionally, when all rounds of testing of the board to be tested are completed, the test status of the board to be tested is determined as tested and sent to the test host.

[0109] The method provided in the embodiment of the present application can avoid the loss of test results after the board is powered off by storing the test results in the board to be tested, thereby improving the stability of the board test.

[0110] As can be seen from the above S501-S503, in the method provided in the embodiment of the present application, the single board to be tested initializes the configuration parameters by restarting before each round of testing, which can eliminate the conflicts between the test items of different rounds of testing of the single board to be tested, thereby achieving continuous testing of the single board to be tested, and improving the efficiency of single board testing. In addition, the R&D personnel do not need to set up multiple mechanisms in the test process of the single board to be tested in advance in order to eliminate the conflicts between the test items, which can reduce the design complexity of the test process of the single board to be tested.

[0111] When the single board to be tested is working normally, a business process is running on the single board to be tested, and the state of the single board to be tested is business state. When the single board to be tested needs to be tested, the state of the single board to be tested needs to be switched from business state to test state, that is, the single board to be tested is instructed to obtain the test program file from the test host and start the test-related process based on the test program file.

[0112] In some embodiments, see Fig. 9 The test host pre-stores a test program file corresponding to each of the multiple boards. The board to be tested is one of the multiple boards. The method provided in the embodiment of the present application further includes the following steps:

[0113] S901: The board to be tested receives a first state switching instruction sent by a test host.

[0114] The first state switching instruction is used to instruct the state of the board to be tested to switch from the service state to the test state, and the first state switching instruction carries the file index corresponding to the board to be tested.

[0115] It should be understood that the file index is used to indicate the storage address of the test program file corresponding to the single board to be tested. When the test host receives the first state switching instruction input by the user, the host to be tested modifies the file index corresponding to the single board to be tested to the storage address of the test program file, so that the single board to be tested can obtain and load the test program file according to the file index when receiving the first state switching instruction.

[0116] S902: In response to the first state switching instruction, the board to be tested obtains and loads a test program file from a test host according to a file index.

[0117] Furthermore, the method provided in the embodiment of the present application further includes the following steps:

[0118] The board to be tested receives a second state switching instruction sent by the test host, the second state switching instruction being used to instruct the board to be tested to switch from a test state to a service state. In response to the second state switching instruction, the board to be tested uninstalls the test program file.

[0119] The method provided in the embodiment of the present application can enable the single board to be tested to switch between the business state and the test state based on the first state switching instruction and the second state switching instruction, and can enable the single board to be tested to quickly continue the previous business after the test is completed, thereby improving the test efficiency and thus improving the user experience.

[0120] In some embodiments, during multiple rounds of testing of the board to be tested, the method provided by the embodiment of the present application further includes the following steps: receiving a test pause instruction sent by the test host, and pausing the test in response to the test pause instruction.

[0121] Furthermore, after the test of the board to be tested is suspended, the method provided in the application embodiment further includes the following steps: receiving a test continuation instruction sent by the test host, and continuing the test in response to the test continuation instruction.

[0122] Specifically, after the test of the single board to be tested is suspended, in response to the test continuation instruction, the running process is destroyed after a preset time period, and then the test is continued after the test environment is restored. The preset time period is used to complete the task being executed by the single board to be tested, and the preset time period may be 3s.

[0123] The method provided in the embodiment of the present application can indicate the approval and continuation of the test of the board to be tested through the test pause instruction and the test continue instruction, which can meet the different usage requirements of different users and enable flexibility in testing.

[0124] In order to facilitate understanding of the method provided in the embodiment of the present application, the following is an explanation of the embodiment of the present application by taking the process of performing multiple rounds of testing on the single board to be tested as an example. Fig.10 , Fig.10 A process diagram of another test method shown in an embodiment of the present application. The single board to be tested performs a first round of testing in response to a test instruction sent by a test host, and sends a restart request to the test host after the first round of testing is completed. The test host confirms that the single board to be tested is restarted, and when the single board to be tested is restarted, the single board to be tested performs a second round of testing. Then, a restart request is sent to the test host after the second round of testing is completed. The test host confirms that the single board to be tested is restarted, and when the single board to be tested is restarted, the single board to be tested performs a third round of testing until the multiple rounds of testing indicated by the test instruction are completed.

[0125] Fig.11 1 is a schematic diagram of the structure of a single board to be tested provided in an embodiment of the present application. The single board to be tested can execute the test method provided in the above method embodiment. Fig.11As shown, the single board to be tested includes a receiving unit 1101, a testing unit 1102 and a sending unit 1103. The receiving unit 1101 is used to receive a test instruction sent by a test host, and the test instruction is used to instruct the single board to be tested to perform multiple rounds of tests. The testing unit 1102 is used to respond to the test instruction and perform multiple rounds of tests based on a pre-loaded test program file to obtain test results. Among them, the test program file includes a process startup file corresponding to at least one test item. Before each round of testing in the multiple rounds of testing, the testing unit 1102 is used to restart the single board to be tested to initialize the configuration parameters of the single board to be tested. The sending unit 1103 is used to send the test results to the test host.

[0126] Optionally, the test unit 1102 is specifically configured to restart the single board to be tested based on a test continuation flag, wherein the test continuation flag is used to instruct the single board to be tested to continue testing.

[0127] Optionally, the re-test flag is carried in the test instruction, or the re-test flag is pre-configured in the test program file.

[0128] Optionally, the test unit 1102 is specifically configured to: send a restart request to the test host, the restart request being used to request restarting the board to be tested to initialize configuration parameters of the board to be tested, and restart the board to be tested when receiving confirmation information sent by the test host in response to the restart request.

[0129] Optionally, the test unit 1102 is further used to: establish a communication link with the test host after restarting, and synchronize test information. The test information is used to indicate the test round of the board to be tested.

[0130] Optionally, the receiving unit 1101 is specifically configured to receive a test instruction sent by a test host when the board to be tested is in place and the test program file has been loaded.

[0131] Optionally, the sending unit 1103 is specifically configured to send the test result corresponding to each round of testing to the test host after each round of testing in the multiple rounds of testing is completed.

[0132] Optionally, the test host pre-stores a test program file corresponding to each of the multiple boards. The board to be tested is one of the multiple boards. The receiving unit 1101 is also used to receive a first state switching instruction sent by the test host, and the first state switching instruction is used to indicate that the state of the board to be tested is switched from the business state to the test state. The first state switching instruction carries a file index corresponding to the board to be tested.

[0133] The testing unit 1102 is further configured to obtain and load a testing program file from a testing host according to a file index in response to a first state switching instruction.

[0134] Optionally, the receiving unit 1101 is further used to receive a second state switching instruction sent by the test host, where the second state switching instruction is used to instruct the state of the board to be tested to switch from the test state to the service state.

[0135] The testing unit 1102 is further configured to uninstall the testing program file in response to the second state switching instruction.

[0136] Optionally, during the process of performing multiple rounds of testing on the single board to be tested, the receiving unit 1101 is further used to receive a test pause instruction sent by the test host, and the testing unit 1102 is further used to suspend the test in response to the test pause instruction. And after the test of the single board to be tested is suspended, the receiving unit 1101 is further used to receive a test continuation instruction sent by the test host, and the testing unit 1102 is further used to continue the test in response to the test continuation instruction. The embodiment of the present application also provides a test host, which is used to:

[0137] Send a test instruction to the single board to be tested, the test instruction is used to instruct the single board to be tested to perform multiple rounds of tests; receive a test result sent by the single board to be tested, the test result is obtained by the single board to be tested responding to the test instruction and performing multiple rounds of tests based on a pre-loaded test program file; the test program file includes a process startup file corresponding to at least one test item; wherein, before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested.

[0138] Optionally, the test host is also used to: receive a restart request sent by the board to be tested, the restart request is used by the board to be tested to request a restart to initialize the configuration parameters of the board to be tested; in response to the restart request, send confirmation information to the board to be tested, the confirmation information is used to instruct the board to be tested to restart.

[0139] Optionally, the test host pre-stores a test program file corresponding to each of a plurality of boards, and the board to be tested is one of the plurality of boards. The test host is also used to: send a first state switching instruction to the board to be tested, the first state switching instruction carrying a file index corresponding to the board to be tested; the first state switching instruction is used to instruct the board to be tested to obtain and load the test program file from the test host according to the file index, so that the state of the board to be tested is switched from a business state to a test state.

[0140] Optionally, the test host is also used to: send a second state switching instruction to the board to be tested, the second state switching instruction is used to instruct the board to be tested to respond to the second state switching instruction and uninstall the test program file so that the state of the board to be tested is switched from the test state to the service state.

[0141] Optionally, during the process of performing multiple rounds of tests on the board to be tested, the test host is further used to: send a test suspension instruction to the board to be tested, where the test suspension instruction is used to instruct the board to be tested to suspend the test.

[0142] Optionally, after the test of the board to be tested is suspended, the test host is further used to: send a test continuation instruction to the board to be tested, where the test continuation instruction is used to instruct the board to be tested to continue the test.

[0143] Optionally, the test host is also used to: in response to a received test result display instruction of the single board to be tested, display an interface, the interface including the test results of the single board to be tested, the test results including at least one of the tested rounds, the number of test items, the number of successfully tested test items, the number of failed test items, and the test status of the single board to be tested; wherein the test status of the single board to be tested includes completed test, not tested, or being tested.

[0144] It should be understood that the specific implementation of the test host is the same as the description of the test host in the above embodiment, and will not be repeated here.

[0145] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present application provides a possible structure of the test host involved in the above-mentioned embodiment. Fig.12 As shown, the test host 100 includes: a processor 402, a bus 404 and a slot 405. Optionally, the test host 100 may further include a memory 401. Optionally, the test host 100 may further include a communication interface 403.

[0146] Processor 402 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. The processor 402 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of the present application. The processor 402 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0147] The memory 401 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0148] As a possible implementation, the memory 401 can exist independently of the processor 402, and the memory 401 can be connected to the processor 402 via a bus 404 to store instructions or program codes. When the processor 402 calls and executes the instructions or program codes stored in the memory 401, the test method corresponding to the test host provided in the embodiment of the present application can be implemented.

[0149] In another possible implementation, the memory 401 may also be integrated with the processor 402 .

[0150] The bus 404 may be an extended industry standard architecture (EISA) bus, etc. The bus 404 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0151] The slot 405 is used to connect the single board 110 to be tested, thereby realizing communication between the test host 100 and the single board 110 to be tested.

[0152] It should be understood that the number of slots 405 configured in the test host 100 can be set according to actual needs, and the embodiment of the present application does not impose any particular limitation on the number of slots 405.

[0153] Some embodiments of the present application provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) having computer program instructions stored therein. When the computer program instructions are executed on a computer, the computer executes a test method as in any of the above-mentioned embodiments.

[0154] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., compact disks (CD), digital versatile disks (DVD), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). The various computer-readable storage media described in this application may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0155] An embodiment of the present application provides a computer program product including instructions. When the computer program product is run on a computer, the computer is enabled to execute the testing method described in any one of the above embodiments.

[0156] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A testing method, characterized in that: Applied to a single board to be tested, the single board to be tested communicates with a test host, and the method comprises: Receiving a test instruction sent by the test host, wherein the test instruction is used to instruct the board to be tested to perform multiple rounds of testing; In response to the test instruction, multiple rounds of testing are performed based on a pre-loaded test program file to obtain test results; wherein the test program file includes a process startup file corresponding to at least one test item; before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested; The test result is sent to the test host.

2. The method according to claim 1, characterized in that The restart of the board to be tested includes: Based on the resuming test flag, the board to be tested is restarted; wherein the resuming test flag is used to instruct the board to be tested to continue testing.

3. The method according to claim 2, characterized in that The continued test flag is carried in the test instruction; or, the continued test flag is pre-configured in the test program file.

4. The method according to any one of claims 1 to 3, characterized in that The restart of the board to be tested includes: The single board to be tested sends a restart request to the test host, where the restart request is used by the single board to be tested to request restart so as to initialize configuration parameters of the single board to be tested; After receiving the confirmation information sent by the test host in response to the restart request, the board to be tested restarts.

5. The method according to claim 4, characterized in that The method further comprises: After restarting, the single board to be tested establishes a communication link with the test host and synchronizes test information; the test information is used to indicate the test round of the single board to be tested.

6. The method according to claim 1, characterized in that The receiving of the test instruction sent by the test host comprises: When the board to be tested is in place and the test program file has been loaded, a test instruction sent by the test host is received.

7. The method according to claim 1, characterized in that The sending the test result to the test host includes: After each round of testing in the multiple rounds of testing is completed, the test result corresponding to each round of testing is sent to the test host.

8. The method according to claim 1, characterized in that The test host pre-stores a test program file corresponding to each of the multiple boards; The single board to be tested is one of the multiple single boards, and the method further includes: Receiving a first state switching instruction sent by the test host, the first state switching instruction is used to instruct the state of the single board to be tested to switch from a business state to a test state; the first state switching instruction carries a file index corresponding to the single board to be tested; In response to the first state switching instruction, the test program file is acquired and loaded from the test host according to the file index.

9. The method according to claim 8, characterized in that The method further comprises: Receiving a second state switching instruction sent by the test host, wherein the second state switching instruction is used to instruct the state of the board to be tested to switch from the test state to the service state; In response to the second state switching instruction, the test program file is uninstalled.

10. The method according to claim 1, characterized in that During the process of performing multiple rounds of testing on the single board to be tested, the method further includes: receiving a test suspension instruction sent by the test host, and suspending the test in response to the test suspension instruction; And receiving a test continuation instruction sent by the test host, and continuing the test in response to the test continuation instruction.

11. A testing method, characterized in that: Applied to a test host, the test host communicates with a board to be tested, the method comprising: Sending a test instruction to the single board to be tested, wherein the test instruction is used to instruct the single board to be tested to perform multiple rounds of testing; Receive the test result sent by the single board to be tested, wherein the test result is obtained by the single board to be tested performing multiple rounds of tests in response to the test instructions based on a pre-loaded test program file; wherein the test program file includes a process startup file corresponding to at least one test item; before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested.

12. The method according to claim 11, characterized in that The method further comprises: Receiving a restart request sent by the single board to be tested, wherein the restart request is used by the single board to be tested to request restart so as to initialize configuration parameters of the single board to be tested; In response to the restart request, confirmation information is sent to the single board to be tested, where the confirmation information is used to instruct the single board to be tested to restart.

13. The method according to claim 12, characterized in that The test host pre-stores a test program file corresponding to each of the multiple boards, the board to be tested is one of the multiple boards, and the method further includes: A first state switching instruction is sent to the single board to be tested, wherein the first state switching instruction carries a file index corresponding to the single board to be tested; the first state switching instruction is used to instruct the single board to be tested to obtain and load the test program file from the test host according to the file index, so that the state of the single board to be tested is switched from the business state to the test state.

14. The method according to claim 13, characterized in that The method further comprises: A second state switching instruction is sent to the single board to be tested, wherein the second state switching instruction is used to instruct the single board to be tested to uninstall the test program file in response to the second state switching instruction, so that the state of the single board to be tested is switched from the test state to the service state.

15. The method according to claim 14, characterized in that During the process of performing multiple rounds of testing on the single board to be tested, the method further includes: Sending a test suspension instruction to the single board to be tested, wherein the test suspension instruction is used to instruct the single board to be tested to suspend testing; And a test continuation instruction is sent to the single board to be tested, wherein the test continuation instruction is used to instruct the single board to be tested to continue the test.

16. A testing system, characterized in that: It includes a test host and a single board to be tested, wherein the test host communicates with the single board to be tested; The test host is used to send a test instruction to the single board to be tested, and the test instruction is used to instruct the single board to be tested to perform multiple rounds of testing; The single board to be tested is used to respond to the test instructions, perform multiple rounds of tests based on a pre-loaded test program file, and obtain test results; wherein the test program file includes a process startup file corresponding to at least one test item; before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested; and is used to send the test results to the test host.

17. A test host, characterized in that: The test host communicates with the board to be tested; the test host includes: a product configuration management module, a software version management module, and a tooling self-test communication module; The product configuration management module is used to receive an input test instruction for instructing to test the board to be tested; The software version management module is used to pre-store the test program file of the board to be tested; The tool self-test communication module is used to send the test instruction and the test program file of the single board to be tested to the single board to be tested, so that the single board to be tested completes the test; The product configuration management module is also used to receive the test result returned by the board to be tested.

18. A single board, characterized in that: The single board comprises: A receiving unit, used for receiving a test instruction sent by a test host, wherein the test instruction is used for instructing the single board to be tested to perform multiple rounds of testing; A test unit, configured to perform multiple rounds of testing based on a pre-loaded test program file in response to the test instruction to obtain a test result; wherein the test program file includes a process startup file corresponding to at least one test item; before each round of testing in the multiple rounds of testing, the single board to be tested is restarted to initialize the configuration parameters of the single board to be tested; A sending unit is used to send the test result to the test host.

19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are run on a single board to be tested or a test host, the single board to be tested or the test host can execute the method according to any one of claims 1-10 or claims 11-15.