A software testing method, apparatus, device, and readable storage medium
By replacing the initial test result data with internal stubs in software testing, the problem of test inaccuracy caused by real-time data changes is solved, and the accuracy of testing is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
- Filing Date
- 2022-08-17
- Publication Date
- 2026-05-26
AI Technical Summary
During software testing, inconsistencies in test results due to changes in real-time data can affect the accuracy of software testing.
By pre-setting internal stubs that store second expected test result data, if the initial test result data returned by the test equipment is the same as the data in the internal stubs, the initial test result data is replaced with the first expected test result data as the actual test result data.
This improves the accuracy of software testing and avoids misjudgments caused by real-time data returned by testing equipment.
Smart Images

Figure CN115357489B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and more specifically, to a software testing method, apparatus, device, and readable storage medium. Background Technology
[0002] As a driving force for the development of the information industry, the software industry is a fundamental, strategic, and pioneering industry for economic and social development, playing a vital role in promoting the integration of informatization and industrialization, transforming the economic development model, facilitating industrial restructuring, and safeguarding national security. Under the current complex and volatile economic situation, relying on its vast domestic market, my country's software industry has maintained a steady and relatively rapid growth trend. Providing high-quality software products is not only necessary for the development of the software industry itself but also for serving national economic construction. Software testing is the last line of defense for software quality and has gradually become a commonly used method.
[0003] However, in actual software testing, automated testing can lead to misjudgments. For example, during testing, software may need to access real-time data from a server as actual test data. Because this actual test data is real-time and may change over time, the multiple sets of actual test data obtained by the software in different rounds of testing may be inconsistent. Consequently, even though the software functions normally, it may be judged as a test failure because the obtained actual test data does not match the expected test data, thus affecting the accuracy of software testing. Summary of the Invention
[0004] This application provides a software testing method, apparatus, device, and readable storage medium. By pre-setting an internal stub that stores second expected test result data, and when the initial test result data returned by the testing device is the same as the second expected test result data stored in the internal stub, the initial test result data is replaced with first expected test result data as the actual test result data. This avoids the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the testing device, thereby improving the accuracy of software testing.
[0005] In view of this, embodiments of this application provide a software testing method, including:
[0006] Obtain test cases for the software under test;
[0007] Based on the test cases, determine the test instructions, test equipment, and first expected test result data;
[0008] Send test commands to the test equipment;
[0009] Obtain the initial test result data returned by the test device;
[0010] Determine whether the initial test result data is located in the internal pile, where the internal pile stores a preset second expected test result data;
[0011] If so, the initial test result data is replaced with the first expected test result data, which is then used as the actual test result data returned by the test device;
[0012] The test results are obtained by comparing the actual test result data with the first expected test result data.
[0013] Optionally, determining whether the initial test result data is located within the internal piles includes:
[0014] Determine whether the initial test result data is the same as the second expected test result data;
[0015] If so, then the initial test result data is determined to be located within the internal pile;
[0016] If not, then the initial test result data is determined not to be in the internal pile.
[0017] Optionally, determining the test instructions, test equipment, and first expected test result data based on the test cases includes:
[0018] Extract the test instructions and the first expected test result data from the test cases;
[0019] Obtain the ID information of the test case;
[0020] Based on the ID information, search for the test device corresponding to the test case in the preset test case information database.
[0021] Optionally, after determining the test instructions, test equipment, and first expected test result data based on the test cases, the method further includes:
[0022] Determine the environmental data corresponding to the test equipment based on the test cases;
[0023] The environmental data is sent to the testing equipment so that the testing equipment can operate according to the environmental data.
[0024] Optionally, after obtaining the initial test result data returned by the test device, the method further includes:
[0025] Determine whether the initial test result data carries an update identifier;
[0026] If so, the initial test result data shall be used as the second expected test result data.
[0027] Optionally, comparing the actual test result data with the first expected test result data to obtain the test result includes:
[0028] The actual test result data and the first expected test result data are sent to the assertion platform;
[0029] Obtain the test results returned by the assertion platform, which are obtained by the assertion platform from the actual test result data and the first expected test result data.
[0030] This application also provides a software testing apparatus, including:
[0031] The first acquisition unit is used to acquire test cases for the software under test;
[0032] The determining unit is configured to determine test instructions, test equipment, and first expected test result data based on the test cases.
[0033] A sending unit is used to send test commands to the test equipment;
[0034] The second acquisition unit is used to acquire the initial test result data returned by the test device;
[0035] The judgment unit is used to determine whether the initial test result data is located in the internal pile, wherein the internal pile stores a preset second expected test result data;
[0036] The replacement unit is configured to, if so, replace the initial test result data with the first expected test result data as the actual test result data returned by the test device;
[0037] The comparison unit is used to compare the actual test result data with the first expected test result data to obtain the test result.
[0038] Optionally, the determination unit is specifically used for:
[0039] Determine whether the initial test result data is the same as the second expected test result data;
[0040] If so, then the initial test result data is determined to be located within the internal pile;
[0041] If not, then the initial test result data is determined not to be in the internal pile.
[0042] This application also provides a computer device, characterized in that it includes: a memory, a transceiver, a processor, and a bus system;
[0043] The memory is used to store programs;
[0044] The processor is used to execute programs in the memory to implement the various methods described above;
[0045] The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
[0046] This application also provides a computer-readable storage medium, characterized in that it stores instructions that, when executed on a computer, cause the computer to perform the various methods described above.
[0047] This application provides a software testing method, comprising: acquiring test cases for the software under test; determining test instructions, test equipment, and first expected test result data based on the test cases; sending test instructions to the test equipment; acquiring initial test result data returned by the test equipment; determining whether the initial test result data is located in an internal stub, wherein the internal stub stores preset second expected test result data; if so, replacing the initial test result data with the first expected test result data as the actual test result data returned by the test equipment; comparing the actual test result data with the first expected test result data to obtain a test result. It is evident that this application can improve the accuracy of software testing by pre-setting an internal stub storing second expected test result data, and by replacing the initial test result data with the first expected test result data as the actual test result data when the initial test result data returned by the test equipment is the same as the second expected test result data stored in the internal stub. This avoids the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the test equipment. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0049] Figure 1 A flowchart illustrating a software testing method provided in an embodiment of this application;
[0050] Figure 2 This is a schematic diagram of the structure of a software testing device provided in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0053] In actual software testing, automated testing can lead to misjudgments. For example, during testing, software may need to access real-time data from a server as actual test data. Because this actual test data is real-time and may change over time, the multiple sets of actual test data obtained by the software in different rounds of testing may be inconsistent. Consequently, even if the software functions normally, it may be judged as a test failure because the obtained actual test data does not match the expected test data, thus affecting the accuracy of software testing.
[0054] Therefore, to address the aforementioned problems, embodiments of this application provide a software testing method, apparatus, device, and readable storage medium. By pre-setting an internal stub storing second expected test result data, and when the initial test result data returned by the testing device is the same as the second expected test result data stored in the internal stub, the initial test result data is replaced with the first expected test result data as the actual test result data. This avoids the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the testing device, thereby improving the accuracy of software testing.
[0055] Please see Figure 1 The software testing method provided in this application includes the following steps.
[0056] S101. Obtain test cases for the software under test.
[0057] In this embodiment, the test plan corresponding to the software under test can be obtained first. The test plan may include ID information corresponding to one or more test cases. After obtaining the test plan, one or more test cases corresponding to the ID information can be searched from a preset test case library based on the ID information contained in the test plan.
[0058] S102. Determine the test instructions, test equipment, and first expected test result data based on the test cases.
[0059] In this embodiment, after obtaining the test case, the corresponding test instructions, test equipment, and first expected test result data can be determined based on the test case.
[0060] Specifically, the corresponding test instructions and the first expected test result data can be extracted from the test cases. The first expected test result data is the test data that the test equipment is expected to return after executing the test instructions. It is used to compare with the actual test data returned by the test equipment to determine whether the software function is normal. The first expected test result data is stored in the test case. Then, the ID information of the test case is obtained, and the corresponding test equipment is searched from a pre-set test case library based on the test case ID information. It can be understood that the pre-set test case library stores the correspondence between the ID information of each test case and the test equipment.
[0061] In one possible implementation, the environmental data corresponding to the test device can be determined based on the test cases, and this environmental data can be sent to the corresponding test device so that the test device can run according to the environmental data. Specifically, the ID information of the test case can be obtained, and the environmental information of the test device corresponding to the test case can be found from a pre-built test case library based on the test case ID information. It can be understood that the pre-built test case library not only stores the correspondence between the ID information of each test case and the test device, but also stores the correspondence between the ID information of each test case and the environmental data corresponding to the test device.
[0062] S103. Send a test command to the test equipment.
[0063] In this embodiment, after determining the test instructions based on the test cases, the test instructions can be sent to the test device to drive the test device to perform corresponding actions. Specifically, test instructions can be sent to the test device based on the test controls determined by the test cases.
[0064] In one possible implementation, before sending test commands to the test device, an idle confirmation message can be sent to the test device to determine whether the test device is currently idle, thereby avoiding software test failure due to the test device being occupied.
[0065] S104. Obtain the initial test result data returned by the test device.
[0066] In this embodiment, after the test device is driven to perform corresponding actions by the test command, the test device generates initial test result data, which can be obtained. Specifically, a proxy server can be set up to intercept the initial test result data generated by the test device.
[0067] S105. Determine whether the initial test result data is located in the internal pile, wherein the internal pile stores a preset second expected test result data.
[0068] In this embodiment, after obtaining the initial test result data returned by the test equipment, it can be determined whether the test result data is located in the internal stash, where the internal stash stores preset second expected test result data. It can be understood that the second expected test result data can be the latest data pre-stored corresponding to the test command and the test equipment, that is, the latest data that the test equipment should actually obtain through the test command. The second expected test result data can be the latest data obtained from the environmental test group.
[0069] Specifically, it can be determined whether the initial test result data is the same as the second expected test result data; if so, it is determined that the initial test result data is located in the internal stake; if not, it is determined that the initial test result data is not in the internal stake, so as to determine whether the test equipment has obtained the correct test result data, and thus determine whether the software function is normal.
[0070] In one possible implementation, if the internal stub does not store the second expected test result data, the initial test result data can be stored in the internal stub as the second expected test result data. Furthermore, the second expected test result data stored in the internal stub can be updated based on the initial test result data. Specifically, it can be determined whether the initial test result data carries an update identifier; if so, the initial test result data is stored in the internal stub as the second expected test result data, thereby completing the update of the second expected test result data stored in the internal stub.
[0071] S106. If so, replace the initial test result data with the first expected test result data as the actual test result data returned by the test device.
[0072] In this embodiment, if it is determined that the initial test result data is located in the internal stub, the initial test result data is replaced with the first expected test result data, which is then used as the actual test result data returned by the test device. It is understood that if the initial test result data returned by the test device is located in the internal stub, it indicates that the test device has obtained the correct data under the drive of the test command, meaning the software function is normal. To avoid the software function being misjudged as abnormal due to the real-time nature of the test result data returned by the test device, the initial test result data can be replaced with the first expected test result data, which is then used as the actual test result data returned by the test device.
[0073] In one possible implementation, if the initial test result data is not in the internal stub, the initial test result data is not replaced, and the initial test result data is directly used as the actual test result data returned by the test equipment.
[0074] S107. Compare the actual test result data with the first expected test result data to obtain the test result.
[0075] In this embodiment, after determining the actual test result data of the testing equipment, the actual test result data can be compared with the first expected test result data to obtain the test result. Specifically, the actual test result data and the first expected test result data can be sent to the assertion platform so that the assertion platform can determine whether the actual test result data is the same as the first expected test result data and receive the test result returned by the assertion platform. It can be understood that if the actual test result data is the same as the first expected test result data, the test result is that the software function test is normal; if the actual test result data is different from the first expected test result data, the test result is that the software function is abnormal.
[0076] In one possible implementation, if the test results indicate that the software is malfunctioning, the test plan can be modified, and the software testing can be repeated. After obtaining multiple test results from various tests, data such as the test success rate can be calculated to generate a test report, allowing testers to intuitively understand the software's testing status.
[0077] This application provides a software testing method, comprising: acquiring test cases for the software under test; determining test instructions, test equipment, and first expected test result data based on the test cases; sending test instructions to the test equipment; acquiring initial test result data returned by the test equipment; determining whether the initial test result data is located in an internal stub, wherein the internal stub stores preset second expected test result data; if so, replacing the initial test result data with the first expected test result data as the actual test result data returned by the test equipment; comparing the actual test result data with the first expected test result data to obtain a test result. It is evident that this application can improve the accuracy of software testing by pre-setting an internal stub storing second expected test result data, and by replacing the initial test result data with the first expected test result data as the actual test result data when the initial test result data returned by the test equipment is the same as the second expected test result data stored in the internal stub. This avoids the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the test equipment.
[0078] This application also provides another software testing method, which includes:
[0079] 1) By dividing the test cases in the test plan into modules on the automated test case management platform, and specifying the test machine and test environment, the test environment reads the identification data of the internal stubs in the database, such as: environment group host (127.0.0.1). If no internal stubs are specified, the whitelist interface data of the test machine in this execution process will be automatically captured during test execution, and the internal stub identification data will be newly created: environment group host1 (127.0.0.2).
[0080] 2) The automated test case management platform transmits test equipment information and internal stub marker information to the intelligent test platform by calling the test case execution interface ExecuteCaseAPI of the intelligent test platform.
[0081] 3) During the execution of test cases, the domain hijacking and redirection function of the third-party packet capture tool Charles is enabled through the openMapRemote interface. All interface requests in the domain whitelist are redirected to the internal stub service of the intelligent testing platform, and the corresponding internal stub data is returned to the test machine according to the internal stub identifier in the test case information.
[0082] 4) All common parameters are saved through configuration files. If it is necessary to update the data of the internal stub marker, and there is both internal stub marker information and update flag during the execution of the test case, the internal stub data will not be returned during the execution of the test case. Instead, the internal stub data will be updated according to the interface.
[0083] 5) Some interfaces cannot use internal stub data, such as video stream addresses. However, a large project usually only has two types of video stream addresses: production environment and internal testing environment. Charles' host redirection function can be used to dynamically determine which environment the address should go to.
[0084] Specifically, the method includes three stages:
[0085] 1. Use case editing stage:
[0086] A1. Users can access the test case management platform, where they can add / edit test cases and publish the new or edited test cases.
[0087] A2. After the newly added / edited test cases are published, the intelligent testing platform automatically converts the test cases in the database into executable test case scripts.
[0088] 2. Test preparation phase:
[0089] B1. Test case scripts successfully converted during the test case editing phase need to be analyzed and located by the intelligent platform algorithm to generate a control structure containing various identifiers required for the location of the control, such as id, name, xpath and other information.
[0090] B2. The second important step in the test preparation phase is to transform the assertions in the test cases, i.e., the first expected test result data, into the execution script. The database pre-sets several common assertion patterns, such as interface assertions, data comparison assertions, and image assertions. Based on the assertion patterns set in the test cases, and combined with the assertion patterns in the database, the script is parsed to complete the transformation of an entire test case into an execution script.
[0091] 3. Test execution phase:
[0092] C1. Enter the test case management platform, create a new test plan and select the corresponding test case set;
[0093] C2. The test case management platform transmits test equipment information, internal stub marking information, etc. to the intelligent testing platform by calling the test case preparation interface PrepareCaseAPI of the intelligent testing platform.
[0094] C3. Create a new test device using webdriveragent, verify that the device information is correct, and determine whether the test device is idle;
[0095] C4. The test case management platform sends the test instructions extracted from the test cases, the environmental information of the test equipment, and the internal stub data to the intelligent test platform by calling the test case execution interface ExecuteCaseAPI of the intelligent test platform.
[0096] C5. The intelligent testing platform sends test commands and environmental information of the test equipment to the test equipment through controls, driving the test equipment to perform corresponding actions.
[0097] C6. After the test equipment successfully executes the action, it generates a real-time interface request. The interface request is hijacked by Charles and injected into the intelligent test platform to obtain the initial test result data returned by the test equipment.
[0098] C7. Update the internal stub data based on the initial test result data returned by the test equipment and the second expected test result data of the environment group returned by the domain name whitelist. If there is no internal stub data, add the hijacked initial test result data as an internal stub in the database. If the update flag isUpdate=1, update the internal stub data in the database and return the second expected test result data stored in the internal stub as the actual test result data to the test equipment.
[0099] C8. The test equipment interprets the actual test result data and redirects it to the assertion platform for verification through Charles hijacking to obtain the test results;
[0100] C9. Assertions: The platform returns test results and generates a report.
[0101] This application provides a software testing method that can pre-set an internal stub storing second expected test result data, and when the initial test result data returned by the test device is the same as the second expected test result data stored in the internal stub, replace the initial test result data with the first expected test result data as the actual test result data. This avoids the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the test device, thereby improving the accuracy of software testing.
[0102] Please see Figure 2 This application also provides a software testing apparatus, including:
[0103] The first acquisition unit 201 is used to acquire test cases of the software under test;
[0104] The determining unit 202 is used to determine the test instructions, test equipment, and first expected test result data according to the test cases;
[0105] Sending unit 203 is used to send test commands to the test equipment;
[0106] The second acquisition unit 204 is used to acquire the initial test result data returned by the test device;
[0107] Judgment unit 205 is used to determine whether the initial test result data is located in the internal pile, wherein the internal pile stores preset second expected test result data;
[0108] The replacement unit 206 is used to replace the initial test result data with the first expected test result data if the condition is met, as the actual test result data returned by the test device.
[0109] The comparison unit 207 is used to compare the actual test result data with the first expected test result data to obtain the test result.
[0110] Optionally, the determination unit 205 is specifically used for:
[0111] Determine whether the initial test result data is the same as the second expected test result data;
[0112] If so, then the initial test result data is determined to be located within the internal pile;
[0113] If not, then the initial test result data is determined not to be in the internal pile.
[0114] Optionally, the determining unit 202 is specifically used for:
[0115] Extract the test instructions and the first expected test result data from the test cases;
[0116] Obtain the ID information of the test case;
[0117] Based on the ID information, search for the test device corresponding to the test case in the preset test case information database.
[0118] Optionally, the device further includes:
[0119] The determining unit 202 is further configured to determine the environmental data corresponding to the test device based on the test case;
[0120] The sending unit 203 is further configured to send the environmental data to the test equipment so that the test equipment can operate according to the environmental data.
[0121] Optionally, the device further includes:
[0122] The judgment unit 205 is also used to determine whether the initial test result data carries an update identifier;
[0123] A storage unit is used to store the initial test result data as the second expected test result data in the internal stub.
[0124] Optionally, the comparison unit 207 is specifically used for:
[0125] The actual test result data and the first expected test result data are sent to the assertion platform;
[0126] Obtain the test results returned by the assertion platform, which are obtained by the assertion platform from the actual test result data and the first expected test result data.
[0127] This application provides a software testing device that can pre-set an internal stub storing second expected test result data, and when the initial test result data returned by the testing device is the same as the second expected test result data stored in the internal stub, replace the initial test result data with the first expected test result data as the actual test result data, thereby avoiding the situation where the software function is misjudged as abnormal due to the real-time nature of the test result data returned by the testing device, and improving the accuracy of software testing.
[0128] This application also provides a computer device, including: a memory, a transceiver, a processor, and a bus system;
[0129] The memory is used to store programs;
[0130] The processor is used to execute the program in the memory to implement the software testing method described above.
[0131] The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
[0132] This application also provides a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to execute a software testing method as described above.
[0133] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0134] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A software testing method, characterized in that, include: Obtain test cases for the software under test; Based on the test cases, determine the test instructions, test equipment, and first expected test result data; Send test commands to the test equipment; Obtain the initial test result data returned by the test device; Determine whether the initial test result data is located in the internal pile, wherein the internal pile stores a preset second expected test result data, which is the latest data corresponding to the test instruction and the test equipment that is stored in advance, or the latest data obtained from the environmental test group; If so, the initial test result data is replaced with the first expected test result data, which is then used as the actual test result data returned by the test device; The test results are obtained by comparing the actual test result data with the first expected test result data.
2. The method according to claim 1, characterized in that, The step of determining whether the initial test result data is located within the internal stakes includes: Determine whether the initial test result data is the same as the second expected test result data; If so, then the initial test result data is determined to be located within the internal pile; If not, then the initial test result data is determined not to be in the internal pile.
3. The method according to claim 1, characterized in that, The step of determining the test instructions, test equipment, and first expected test result data based on the test cases includes: Extract the test instructions and the first expected test result data from the test cases; Obtain the ID information of the test case; Based on the ID information, search for the test device corresponding to the test case in the preset test case information database.
4. The method according to claim 1, characterized in that, After determining the test instructions, test equipment, and first expected test result data based on the test cases, the method further includes: Determine the environmental data corresponding to the test equipment based on the test cases; The environmental data is sent to the testing equipment so that the testing equipment can operate according to the environmental data.
5. The method according to claim 1, characterized in that, After obtaining the initial test result data returned by the test device, the method further includes: Determine whether the initial test result data carries an update identifier; If so, the initial test result data is used as the second expected test result data and stored in the internal pile.
6. The method according to claim 1, characterized in that, The step of comparing the actual test result data with the first expected test result data to obtain the test result includes: The actual test result data and the first expected test result data are sent to the assertion platform; Obtain the test results returned by the assertion platform, which are obtained by the assertion platform from the actual test result data and the first expected test result data.
7. A software testing device, characterized in that, include: The first acquisition unit is used to acquire test cases for the software under test; The determining unit is configured to determine test instructions, test equipment, and first expected test result data based on the test cases. A sending unit is used to send test commands to the test equipment; The second acquisition unit is used to acquire the initial test result data returned by the test device; The judgment unit is used to determine whether the initial test result data is located in the internal pile, the internal pile stores preset second expected test result data, the second expected test result data is the latest data corresponding to the test instruction and the test equipment that is stored in advance, or it is the latest data obtained from the environmental test group; The replacement unit is configured to, if so, replace the initial test result data with the first expected test result data as the actual test result data returned by the test device; The comparison unit is used to compare the actual test result data with the first expected test result data to obtain the test result.
8. The apparatus according to claim 7, characterized in that, The judgment unit is specifically used for: Determine whether the initial test result data is the same as the second expected test result data; If so, then the initial test result data is determined to be located within the internal pile; If not, then the initial test result data is determined not to be in the internal pile.
9. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; The processor is used to execute the program in the memory to implement the method of any one of claims 1 to 6; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.
10. A computer-readable storage medium, characterized in that, The device stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 6.