Automated Testing Method, Device, Electronic Device, and Storage Medium
By using the packet modification technology between the upper computer testing software and the underlying testing software in chip testing, the configuration and execution of the test project is automatically processed, and the problem of time-consuming and labor-consuming writing of test project files in the existing technology is solved, and the testing efficiency is improved.
Patent Information
- Application Number
- CN202411622276.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the prior art, the chip testing process requires the user to manually write and maintain a large number of test engineering files, resulting in high human resources consumption and low testing efficiency.
Run the initial test project through the upper computer testing software, grab and modify the full configuration parameters, and automatically trigger the underlying test software to execute the test project to be executed, realizing the continuous and automatic execution of batch test projects.
The user does not need to manually write test engineering files for each test scenario, which improves the efficiency and automation of chip testing.
Smart Images

Figure CN119149319B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical fields of automation and chip testing, and particularly to an automated testing method, apparatus, electronic device, and storage medium. Background Art
[0002] In the process of chip testing using an Automatic Test Equipment (ATE), it is necessary to configure corresponding test parameters for each test project in the host computer, such as configuring the input and output, voltage, current, upper and lower limits, binary value (BIN value), etc. of the pins of the chip under test.
[0003] Currently, various types of ATEs provide host computer editing software. Users can manually write test project files for various chips, various test scenarios, etc. through the host computer editing software, and control the execution of the test programs corresponding to each test project file by manually triggering the controls in the host computer editing software, so that the underlying software and chip driver hardware perform the test work.
[0004] However, the test process in the related art requires users to manually write complete test project files for each test project; when performing batch chip testing, a large number of test project files need to be manually written and maintained, which requires a high amount of human resources and has low test efficiency. Summary of the Invention
[0005] Embodiments of the present disclosure provide an automated testing method, apparatus, electronic device, and storage medium, which can achieve continuous and automatic execution of batch test projects and improve chip testing efficiency.
[0006] In one aspect of the embodiments of the present disclosure, an automated testing method is provided, including:
[0007] Running the project file of an initial test project through a host computer testing software to control an underlying testing software to execute the initial test project, where the initial test project is used to initialize all configuration parameters of a chip under test in various test scenarios;
[0008] During the execution of the initial test project, capturing a first data packet sent by the host computer testing software to the underlying testing software, where the first data packet includes all the configuration parameters;
[0009] Performing parameter reset using the first data packet, modifying all the configuration parameters to target configuration parameters corresponding to a test project to be executed, and triggering the underlying testing software to execute the test project to be executed.
[0010] Optionally, use the first data packet to reset parameters, modify the full set of configuration parameters to the target configuration parameters corresponding to the test project to be executed, and trigger the underlying test software to execute the test project to be executed, including:
[0011] Receive a parameter modification operation through a data packet modification tool, and based on the parameter type and parameter value of the target configuration parameter indicated by the parameter modification operation, modify the full set of configuration parameters in the first data packet to the target configuration parameter; send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed;
[0012] Or,
[0013] Run a test script file, and based on the parameter type and parameter value of the target configuration parameter indicated by the test script file, modify the full set of configuration parameters in the first data packet to the target configuration parameter; send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed.
[0014] Optionally, sending the first data packet with modified parameters to the underlying test software includes:
[0015] Capture a second data packet sent by the underlying test software to the upper computer test software, where the second data packet includes a response message for indicating that the test project execution is successful or there is an exception in the test process;
[0016] In response to the response message indicating that the current test project to be executed is successfully executed, send the first data packet corresponding to the next test project to be executed to the underlying test software.
[0017] Optionally, after using the first data packet to reset parameters, modifying the full set of configuration parameters to the target configuration parameters corresponding to the test project to be executed, and triggering the underlying test software to execute the test project to be executed, the method includes:
[0018] Analyze the software log of the upper computer test software, obtain the test result information corresponding to each test project to be executed from the software log, and generate a test report based on the test result information, where the test result information includes at least one of a test object, the target configuration parameter, a test result value, and exception warning information.
[0019] Optionally, use the first data packet to reset parameters, modify the full set of configuration parameters to the target configuration parameters corresponding to the test project to be executed, and trigger the underlying test software to execute the test project to be executed, including:
[0020] Parse the interface call information in the first data packet to obtain the interface services called by the host computer test software during the execution of the initial test project and the configuration parameter types corresponding to each interface service. The interface service is a service in the underlying test software for parameter configuration of the chip under test;
[0021] Based on the configuration parameter types corresponding to each interface service, pass the target configuration parameters into the corresponding interface service and re - call the interface service to trigger the underlying test software to execute the test project to be executed.
[0022] Optionally, after using the first data packet to perform parameter reset, modifying the full - volume configuration parameters to the target configuration parameters corresponding to the test project to be executed, and triggering the underlying test software to execute the test project to be executed, the method further includes:
[0023] Listen to the response message body corresponding to the interface service to obtain the response message generated by the interface service. The response message is used to indicate that the test project execution is successful or there is an exception in the test process;
[0024] Generate a test report based on the response message.
[0025] Optionally, the host computer test software communicates with the underlying test software through a Remote Procedure Call (RPC) framework, and the first data packet includes an RPC framework data packet;
[0026] Capture the first data packet sent by the host computer test software to the underlying test software, including:
[0027] Perform data packet capture on the port listened by the RPC framework server in the preset network card to obtain the first data packet.
[0028] Another aspect of the embodiments of the present disclosure provides an automated test device, including:
[0029] An initialization module for running the project file of the initial test project through the host computer test software to control the underlying test software to execute the initial test project. The initial test project is used to initialize the full - volume configuration parameters of the chip under test in each test scenario;
[0030] An acquisition module for capturing the first data packet sent by the host computer test software to the underlying test software during the execution of the initial test project. The first data packet includes the full - volume configuration parameters;
[0031] A test module for resetting parameters by using the first data packet, modifying the full set of configuration parameters to the target configuration parameters corresponding to the test project to be executed, and triggering the underlying test software to execute the test project to be executed.
[0032] Another aspect of the embodiments of the present disclosure provides an electronic device, including:
[0033] A memory for storing a computer program;
[0034] A processor for executing the computer program stored in the memory, and when the computer program is executed, implementing the method described in the above aspect.
[0035] Another aspect of the embodiments of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implementing the method described in the above aspect.
[0036] Another aspect of the embodiments of the present disclosure provides a computer program, including computer program instructions, and when the computer program instructions are executed by a processor, implementing the method described in the above aspect.
[0037] Based on the embodiments of the present disclosure, by running the engineering file of the initial test project through the host computer test software, controlling the underlying test software to perform an initial configuration of the full set of configuration parameters of the chip to be tested in each test scenario once, during the running process of the initial test project, the first data packet sent by the host computer test software to the underlying test software for instructing the underlying test software to perform parameter configuration can be captured. Subsequently, based on the target configuration parameters corresponding to the test project to be executed, the first data packet can be directly used for parameter resetting, automatically triggering the underlying test software to execute the corresponding test project, and realizing the continuous and automatic execution of batch test projects. There is no need for the user to manually write and run the test project files corresponding to each test scenario, improving the chip test efficiency.
[0038] The technical solution of the present disclosure will be further described in detail below with reference to the drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings constituting a part of the specification depict the embodiments of the present disclosure and, together with the description, are used to explain the principles of the present disclosure.
[0040] Referring to the drawings, the present disclosure can be more clearly understood from the following detailed description, where:
[0041] Figure 1 is a flowchart of an embodiment of the automated test method of the present disclosure;
[0042] Figure 2Flow chart of another embodiment of the automated testing method of the present disclosure;
[0043] Figure 3 Flow chart of another embodiment of the automated testing method of the present disclosure;
[0044] Figure 4 Structural schematic diagram of an embodiment of the automated testing apparatus of the present disclosure;
[0045] Figure 5 Structural schematic diagram of another embodiment of the automated testing apparatus of the present disclosure;
[0046] Figure 6 Structural schematic diagram of an application embodiment of the electronic device of the present disclosure. Detailed implementation manners
[0047] Now, various exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that: unless otherwise specifically stated, the relative arrangements, numerical expressions, and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0048] Those skilled in the art can understand that the terms "first", "second", etc. in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, etc., and neither represent any specific technical meaning nor indicate an inevitable logical order between them.
[0049] It should also be understood that in the embodiments of the present disclosure, "a plurality" may refer to two or more, and "at least one" may refer to one, two, or more.
[0050] It should also be understood that for any component, data, or structure mentioned in the embodiments of the present disclosure, unless otherwise clearly defined or given a contrary indication in the context, it can generally be understood as one or more.
[0051] In addition, the term "and / or" in the present disclosure is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the associated objects before and after.
[0052] It should also be understood that the present disclosure emphasizes the differences between various embodiments. The similarities or similarities between them can be referred to each other. For the sake of brevity, they will not be described one by one.
[0053] At the same time, it should be understood that for the convenience of description, the dimensions of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0054] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way a limitation on the present disclosure, its application, or use.
[0055] Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods, and devices should be regarded as part of the specification.
[0056] It should be noted that like reference numerals and letters denote like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
[0057] Figure 1 A flowchart of an automated testing method provided for an exemplary embodiment of the present disclosure. The automated testing method of the embodiments of the present disclosure can be implemented by an electronic device running upper computer testing software and underlying testing software. As Figure 1 shown, the method includes the following steps:
[0058] Step 101, run the project file of the initial test project through the upper computer testing software, and control the underlying testing software to execute the initial test project.
[0059] Among them, the initial test project is used to initialize all configuration parameters of the chip under test in each test scenario. The all-configuration parameters refer to all parameters that need to be configured for various test scenarios of the chip under test. For example, for the chip under test that needs to perform chip testing in 2 test scenarios, Scenario 1 needs to configure the pins (Pin), channels (Channel), power (Power), timing (Timing), pattern (Pattern), test instance (Test instance) of the chip under test, and Scenario 2 needs to configure the Pin, Channel, Power, Pattern, Test instance, concurrent sequence (Concurrent Sequence), alternating current software requirement specification (AC SPEC), and direct current software requirement specification (DC SPEC) of the chip under test. Then, the all-configuration parameters may include, but are not limited to, Pin, Channel, Power, Pattern, Timing, Pattern, Test instance, Concurrent Sequence, AC SPEC, and DC SPEC.
[0060] In a possible implementation, the host computer test software is responsible for receiving user operations (such as file editing operations, file running operations) through a Graphical User Interface (GUI) and running the project file. The host computer test software communicates with the underlying test software through a preset communication framework, and sends various instruction data packets including configuration parameters to the underlying test software through the communication framework during the process of running the project file. The underlying test software is used to control the driving hardware to configure the parameters of the chip under test and perform chip testing based on the instructions and data packets sent by the host computer test software.
[0061] Step 102, during the execution of the initial test project, capture the first data packet sent by the host computer test software to the underlying test software.
[0062] Among them, the first data packet includes all the configuration parameters configured by the above initial test project.
[0063] In a possible implementation, while the host computer test software runs the project file of the initial test project, it can capture the first data packet sent by the host computer test software to the underlying test software from the network card. Schematically, packet capture tools such as TCPDump, wireshark, Scapy, etc. can be used to capture the first data packet.
[0064] Optionally, after capturing the first data packet, the first data packet can be stored in the memory or cache in a preset file format, for example, it can be saved in formats such as.pcap file or.pcapng file, etc. The first data packet records the parameter configuration requests and corresponding parameter values involved in the initial test project.
[0065] Step 103, use the first data packet to perform parameter reset, modify all the configuration parameters to the target configuration parameters corresponding to the test project to be executed, and trigger the underlying test software to execute the test project to be executed.
[0066] In a possible implementation, the target configuration parameters corresponding to each test project to be executed can be obtained, and the parameter reset can be directly performed using the first data packet, controlling the underlying test software to configure the parameters of the chip under test to the target configuration parameters and perform chip testing, and the execution of the test project to be executed can be achieved without running the complete test project file corresponding to the test project to be executed. Optionally, the target configuration parameters can include some of the all configuration parameters or all of the all configuration parameters.
[0067] Optionally, the value of the corresponding parameter in the first data packet can be modified based on the target configuration parameter, and the modified first data packet can be resent to the underlying test software. Alternatively, the interface of the underlying test software used for parameter configuration in the first data packet can be parsed, so as to directly call the interface corresponding to the target configuration parameter to trigger the underlying test software to execute the test project to be executed.
[0068] Based on the embodiments of the present disclosure, by running the project file of the initial test project through the upper computer test software, the underlying test software is controlled to perform an initial configuration of all the configuration parameters of the chip to be tested in each test scenario. During the running of the initial test project, the first data packet sent by the upper computer test software to the underlying test software for instructing the underlying test software to perform parameter configuration can be captured. Subsequently, based on the target configuration parameters corresponding to the test project to be executed, the first data packet can be directly used for parameter resetting, automatically triggering the underlying test software to execute the corresponding test project, realizing the continuous and automatic execution of batch test projects, without the need for the user to manually write and run the test project files corresponding to each test scenario, improving the chip test efficiency.
[0069] In a possible implementation manner, the underlying test software can be triggered to execute the test project to be executed by modifying the value of the configuration parameter in the first data packet and resending the modified first data packet. Figure 2 The flowchart of the automated test method provided for another exemplary embodiment of the present disclosure. The automated test method of the embodiments of the present disclosure can be implemented by an electronic device running an upper computer test software and an underlying test software. As Figure 2 shown, the method includes the following steps:
[0070] Step 201, run the project file of the initial test project through the upper computer test software to control the underlying test software to execute the initial test project.
[0071] Step 202, during the execution of the initial test project, capture the first data packet sent by the upper computer test software to the underlying test software.
[0072] The specific implementation manners of steps 201 to 202 can refer to the above steps 101 to 102, and the embodiments of the present disclosure will not be elaborated herein.
[0073] Step 203, receive a parameter modification operation through a data packet modification tool, and modify all the configuration parameters in the first data packet to the target configuration parameters based on the parameter type and parameter value of the target configuration parameter indicated by the parameter modification operation, or run a test script file, and modify all the configuration parameters in the first data packet to the target configuration parameters based on the parameter type and parameter value of the target configuration parameter indicated by the test script file.
[0074] In a possible implementation, a parameter modification operation can be received by a data packet modification tool. Based on the parameter modification operation, the full configuration parameters in the first data packet are modified to target configuration parameters and saved as a new file. For example, the data packet modification tool can be tools such as tcprewrite, editcap, scapy, etc.
[0075] Schematically, the test project to be executed needs to perform anomaly detection on the chip under test at different voltage values. The target configuration parameters include the target voltage value. The voltage value in the file 1.pcap corresponding to the first data packet can be modified to the target voltage value through the data packet modification tool, and the remaining parameters can be deleted, kept unchanged, or changed to corresponding preset values according to requirements. The modified file is saved as 2.pcap.
[0076] In another possible implementation, a pre-stored script file can be run. The script file includes the parameter types, parameter values, and data packet modification instructions of the target configuration parameters corresponding to each test project to be executed. By running this script file, multiple test projects to be executed can be continuously and automatically executed. For example, a script file written by the user can be obtained through code writing tools such as python and shell.
[0077] Step 204: Send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed.
[0078] Optionally, a data packet sending tool can be used to resend the first data packet with modified parameters to the underlying test software. For example, data packet replay can be performed using data packet sending tools such as tcpreplay and scapy.
[0079] Step 205: Capture the second data packet sent by the underlying test software to the upper computer test software.
[0080] In a possible implementation, after the underlying test software executes the test project based on the first data packet sent by the upper computer test software, it will send a second data packet to the upper computer test software through the communication framework. The second data packet includes a response message, and the response message is used to indicate that the test project has been successfully executed or there is an anomaly in the test process.
[0081] Optionally, when there are multiple test projects to be executed, during the execution of each test project to be executed, the second data packet sent by the underlying test software to the upper computer test software can be captured through a packet capture tool, and it can be judged whether to continue with the next test project to be executed based on the test situation of the current test project to be executed.
[0082] Step 206: In response to the response message indicating that the currently to-be-executed test project has been successfully executed, send the first data packet corresponding to the next to-be-executed test project to the underlying test software.
[0083] By parsing the response message in the second data packet, it can be determined whether the currently to-be-executed test project has been successfully executed. If the response message indicates that the currently to-be-executed test project has been successfully executed, send the first data packet corresponding to the next to-be-executed test project to the underlying test software to trigger the underlying test software to execute the next to-be-executed test project; if the response message indicates that there is an abnormality in the currently to-be-executed test project, the sending of the first data packet to the underlying test software can be stopped and an alarm message can be generated, or an alarm message can be generated while sending the first data packet corresponding to the next to-be-executed test project to the underlying test software.
[0084] Based on the embodiments of the present disclosure, by using a data packet modification tool or a test script file, modify all the configuration parameters in the first data packet to target configuration parameters, and perform data packet replay, simulating that the upper computer test software sends the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the to-be-executed test project corresponding to the target configuration parameters. Without the user manually writing a complete project file for each to-be-executed test project through the upper computer test software, the effects of automatically and continuously performing chip parameter configuration and chip testing can be achieved, enabling the user to get rid of the cumbersome operations of the upper computer test software and reducing the occupation of storage resources.
[0085] In a possible implementation manner, based on Figure 2 the embodiments shown, after using the first data packet to perform parameter reset, modifying all the configuration parameters to the target configuration parameters corresponding to the to-be-executed test project, and triggering the underlying test software to execute the to-be-executed test project, the method further includes the following steps:
[0086] Parse the software log of the upper computer test software, obtain the test result information corresponding to each to-be-executed test project from the software log, and generate a test report based on the test result information.
[0087] Among them, the test result information and the generated test report may include at least one of a test object, target configuration parameters, test result values, and exception alarm information. For example, the test object may include the model and identification of the chip under test, and the exception alarm information may include information such as an exception type and an exception cause.
[0088] Optionally, the test report can be generated by combining the second data packet sent by the underlying test software and the software log of the upper computer test software for parsing.
[0089] In another possible implementation, the underlying test software can be triggered to execute the test project to be executed by directly calling the underlying test software interface. Figure 3 The flowchart of the automated test method provided by another exemplary embodiment of the present disclosure. The automated test method of the embodiments of the present disclosure can be implemented by an electronic device running upper computer test software and underlying test software. As Figure 3 shown, the method includes the following steps:
[0090] Step 301, run the project file of the initial test project through the upper computer test software, and control the underlying test software to execute the initial test project.
[0091] Step 302, during the execution of the initial test project, capture the first data packet sent by the upper computer test software to the underlying test software.
[0092] For the specific implementation manners of steps 301 to 302, reference may be made to the above steps 101 to 102, and the embodiments of the present disclosure will not elaborate herein.
[0093] Step 303, parse the interface call information in the first data packet, and obtain the interface services called by the upper computer test software during the execution of the initial test project and the configuration parameter types corresponding to each interface service.
[0094] Among them, the interface service is a service in the underlying test software for parameter configuration of the chip under test.
[0095] Schematically, the upper computer test software and the underlying test software communicate through a Remote Procedure Call (RPC) framework, such as the gRPC framework. This framework defaults to using Protocol Buffers as the interface definition language and data exchange format, and specifies the data structure and interface services by defining a.proto file. By parsing the interface call information in the first data packet, determine the interface services defined by the.proto file included therein, that is, obtain the interface services of the underlying test software called by the upper computer test software, and determine the configuration parameter types corresponding to each interface service. For example, the parameter corresponding to the interface service OpenProject called by the upper computer test software is a.ctp, where ctp is the parameter type and a is the parameter value. Then, if the subsequent test project to be executed needs to configure the parameter ctp, the interface service OpenProject can be called for configuration.
[0096] Step 304, based on the configuration parameter types corresponding to each interface service, pass the target configuration parameters into the corresponding interface service and re-call the interface service to trigger the underlying test software to execute the test project to be executed.
[0097] In a possible implementation, the protocol file (such as a.proto file) used to define the interface service in the communication framework can be pre-compiled by a compiler to generate code corresponding to the target programming language, obtaining the interface call code corresponding to various interface services. For the test project to be executed, determine the configuration parameter type of its target configuration parameters, and call the interface call code of the interface service corresponding to the configuration parameter type to simulate the operation of the upper computer test software and trigger the lower computer test software to execute the test project to be executed.
[0098] For example, by parsing the first data packet, it is determined that the interface service OpenProject is called to configure the parameter a.ctp. If the target configuration parameter in the next test project to be executed includes b.ctp, then the corresponding interface service can be called by running the interface call code corresponding to OpenProject and passing in the value b.
[0099] Step 305: Listen to the response message body corresponding to the interface service, and obtain the response message generated by the interface service. The response message is used to indicate that the test project is executed successfully or there is an abnormality in the test process.
[0100] In a possible implementation, the interface service corresponds to a response message body. After the interface service call ends, it feeds back information such as the response message and response code through the corresponding response message body. The execution situation of the test project to be executed can be determined through the response message body. For example, a response code of 0 indicates successful execution, and a response code of 1 indicates execution failure. The response message can include specific result information such as test result values or exception types and exception reasons, etc.
[0101] Step 306: Generate a test report based on the response message.
[0102] Optionally, a test report can be generated based on the response message and a pre-stored test report template and sent to the upper computer, so as to generate a test report for the user to view even in the case of no software log of the upper computer test software.
[0103] Based on the embodiments of the present disclosure, by directly calling the interface of the lower computer test software, the operation of the upper computer test software is simulated, and the lower computer test software is triggered to execute the test project to be executed corresponding to the target configuration parameters. Without the user manually writing a complete project file for each test project to be executed through the upper computer test software, the effect of automatically and continuously performing chip parameter configuration and chip testing can be achieved, enabling the user to get rid of the cumbersome operation of the upper computer test software and reducing the occupation of storage resources.
[0104] In a possible implementation, the host computer test software communicates with the underlying test software through an RPC framework. The first data packet includes an RPC framework data packet. The specific steps of step 102 may include the following steps:
[0105] Capture data packets for the ports listened by the RPC framework server in the preset network card to obtain the first data packet.
[0106] Since there are usually multiple software running in the electronic device and different types of data packets, it is necessary to filter the first data packet from various data packets based on the data packet filtering conditions. Optionally, the data packet filtering conditions include the preset network card and the ports listened by the RPC framework server. That is, by capturing data packets based on the network card and ports corresponding to the communication framework between the host computer test software and the underlying test software, the first data packet can be obtained. Optionally, by capturing data packets for the ports listened by the RPC framework server in the preset network card, a second data packet can also be obtained.
[0107] Figure 4 The block diagram of an automated test device provided by an exemplary embodiment of the present disclosure is shown. The device includes:
[0108] An initialization module 401, configured to run the project file of the initial test project through the host computer test software, and control the underlying test software to execute the initial test project, where the initial test project is used to initialize all configuration parameters of the chip under test in each test scenario;
[0109] An acquisition module 402, configured to capture the first data packet sent by the host computer test software to the underlying test software during the execution of the initial test project by the initialization module 401, where the first data packet includes all configuration parameters;
[0110] A test module 403, configured to perform parameter reset using the first data packet acquired by the acquisition module 402, modify all configuration parameters to the target configuration parameters corresponding to the test project to be executed, and trigger the underlying test software to execute the test project to be executed.
[0111] Optionally, in a possible implementation, the above test module 403 may also be used for:
[0112] Receive a parameter modification operation through a data packet modification tool, and based on the parameter type and parameter value of the target configuration parameter indicated by the parameter modification operation, modify all configuration parameters in the first data packet acquired by the acquisition module 402 to the target configuration parameters; send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed;
[0113] Or,
[0114] Run the test script file, and based on the parameter type and parameter value of the target configuration parameters indicated by the test script file, modify the full set of configuration parameters in the first data packet obtained by the acquisition module 402 to the target configuration parameters; send the first data packet with the modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed.
[0115] Optionally, in a possible implementation manner, the above test module 403 can also be used for:
[0116] Capture the second data packet sent by the underlying test software to the host computer test software. The second data packet includes a response message, and the response message is used to indicate that the test project is executed successfully or there is an abnormality in the test process;
[0117] In response to the response message indicating that the current test project to be executed is executed successfully, send the first data packet corresponding to the next test project to be executed to the underlying test software.
[0118] Optionally, in a possible implementation manner, as Figure 5 shown, the device further includes:
[0119] The first generation module 501 is used to parse the software log of the host computer test software, obtain the test result information corresponding to each test project to be executed from the software log, and generate a test report based on the test result information, where the test result information includes at least one of a test object, target configuration parameters, test result values, and exception warning information.
[0120] Optionally, in a possible implementation manner, the above test module 403 can also be used for:
[0121] Parse the interface call information in the first data packet, obtain the interface services called by the host computer test software during the execution of the initial test project and the configuration parameter types corresponding to each interface service, where the interface service is a service in the underlying test software used to configure parameters for the chip under test;
[0122] Based on the configuration parameter types corresponding to each interface service, pass the target configuration parameters into the corresponding interface service and re - call the interface service to trigger the underlying test software to execute the test project to be executed.
[0123] Optionally, in a possible implementation manner, as Figure 5 shown, the device further includes:
[0124] The message acquisition module 502 is used to listen to the response message body corresponding to the interface service, obtain the response message generated by the interface service, and the response message is used to indicate that the test project is executed successfully or there is an abnormality in the test process;
[0125] The second generation module 503 is configured to generate a test report based on the response message obtained by the message acquisition module.
[0126] Optionally, in a possible implementation, the host computer test software communicates with the underlying test software through an RPC framework, and the first data packet includes an RPC framework data packet;
[0127] The above-mentioned acquisition module 402 can also be used for:
[0128] Capture data packets for the ports listened by the RPC framework server in the preset network card to obtain the first data packet.
[0129] Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same, similar or corresponding parts among the embodiments, reference can be made to each other. Since the method, device, and equipment embodiments basically correspond, reference can be made to the corresponding parts of the description for the relevant parts. The methods, devices, and equipment in the embodiments of the present disclosure also correspond to each other in terms of specific implementation manners and beneficial technical effects, and the relevant content can be referred to each other and will not be repeated.
[0130] In addition, the embodiments of the present disclosure also provide an electronic device, including:
[0131] A memory for storing a computer program;
[0132] A processor for executing the computer program stored in the memory, and when the computer program is executed, implementing the automated test method described in any one of the above embodiments of the present disclosure.
[0133] Figure 6 This is a schematic structural diagram of an application embodiment of the electronic device of the present disclosure. Next, refer to Figure 6 to describe the electronic device according to the embodiments of the present disclosure. The electronic device can be any one or both of the first device and the second device, or a stand-alone device independent of them. The stand-alone device can communicate with the first device and the second device to receive the input signals collected from them.
[0134] As Figure 6 shown, the electronic device includes one or more processors and a memory.
[0135] The processor can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions.
[0136] The memory may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor may run the program instructions to implement the automated test methods of various embodiments of the present disclosure described above and / or other desired functions.
[0137] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0138] In addition, the input device may further include, for example, a keyboard, a mouse, and so on.
[0139] The output device may output various information to the outside, including the determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.
[0140] Of course, for simplicity, Figure 6 only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.
[0141] In addition to the above methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the automated test methods according to various embodiments of the present disclosure described in the above part of this specification.
[0142] The computer program product may be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0143] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the automated test method according to various embodiments of the present disclosure described in the foregoing part of this specification.
[0144] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0145] Those of ordinary skill in the art can understand that all or part of the steps of implementing the foregoing method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium, and when the program is executed, it performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.
[0146] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purposes of illustration and easy understanding, and not for limitation. The above details do not limit the present disclosure to necessarily adopt the above specific details for implementation.
[0147] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For system embodiments, since they basically correspond to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0148] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the word "and / or", and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0149] The methods and apparatuses of the present disclosure can be implemented in many ways. For example, the methods and apparatuses of the present disclosure can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the methods is only for illustration, and the steps of the methods of the present disclosure are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the methods according to the present disclosure.
[0150] It should also be noted that in the apparatuses, equipment, and methods of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.
[0151] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0152] The above description has been given for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.
Claims
1. An automated testing method, characterized in that: include: Run the engineering file of the initial test project through the upper computer test software, and control the underlying test software to execute the initial test project, wherein the initial test project is used to initialize all configuration parameters of the chip under test in each test scenario; During the execution of the initial test project, capturing a first data packet sent by the upper computer test software to the underlying test software, wherein the first data packet includes the full configuration parameters; Utilizing the first data packet to reset parameters, modifying the full configuration parameters to target configuration parameters corresponding to the test project to be executed, and triggering the underlying test software to execute the test project to be executed, including: receiving a parameter modification operation through a data packet modification tool, and modifying the full configuration parameters in the first data packet to the target configuration parameters based on the parameter type and parameter value of the target configuration parameters indicated by the parameter modification operation; sending the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed; Or, run the test script file, and based on the parameter type and parameter value of the target configuration parameters indicated by the test script file, modify the full configuration parameters in the first data packet to the target configuration parameters; and send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed.
2. The method according to claim 1, characterized in that Sending the first data packet with modified parameters to the underlying test software includes: Capturing a second data packet sent by the bottom-level test software to the upper-computer test software, the second data packet including a response message, the response message being used to indicate that the test project is successfully executed or that an abnormality exists in the test process; In response to the response message indicating that the current test project to be executed is successfully executed, the first data packet corresponding to the next test project to be executed is sent to the underlying test software.
3. The method according to claim 1, characterized in that After resetting parameters using the first data packet, modifying the full configuration parameters to target configuration parameters corresponding to the test project to be executed, and triggering the underlying test software to execute the test project to be executed, the method includes: Parse the software log of the host computer test software, obtain the test result information corresponding to each test project to be executed from the software log, and generate a test report based on the test result information, wherein the test result information includes at least one of the test object, the target configuration parameters, the test result value and abnormal alarm information.
4. The method according to any one of claims 1 to 3, characterized in that: The host computer test software communicates with the bottom layer test software via a remote procedure call (RPC) framework, and the first data packet includes an RPC framework data packet; Capturing a first data packet sent by the upper computer test software to the underlying test software includes: The first data packet is obtained by capturing data packets on the port monitored by the RPC framework server in the preset network card.
5. An automated testing device, characterized in that: include: An initialization module is used to run the engineering file of the initial test project through the host computer test software, and control the underlying test software to execute the initial test project, wherein the initial test project is used to initialize the full configuration parameters of the chip under test in each test scenario; An acquisition module, used for capturing a first data packet sent by the upper computer test software to the lower-level test software during the execution of the initial test project, wherein the first data packet includes the full configuration parameters; A test module, configured to use the first data packet to reset parameters, modify the full configuration parameters to target configuration parameters corresponding to the test project to be executed, and trigger the underlying test software to execute the test project to be executed; The test module is specifically used for: Receiving a parameter modification operation through a data packet modification tool, and modifying the full configuration parameters in the first data packet to the target configuration parameters based on the parameter type and parameter value of the target configuration parameters indicated by the parameter modification operation; sending the first data packet with the modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed; or, Run the test script file, and based on the parameter type and parameter value of the target configuration parameters indicated by the test script file, modify the full configuration parameters in the first data packet to the target configuration parameters; send the first data packet with modified parameters to the underlying test software to trigger the underlying test software to execute the test project to be executed.
6. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 4 above.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Automatic test method and device
CN111782556A
Automatic data comparison method and device, electronic equipment and storage medium
CN114461717A
SoC automatic test system and test method based on test platform
CN118569166A