Device testing method and apparatus
By using a relay control module connected to a button circuit board via a flying wire in a portable field recording device, automated control of button operation is achieved, solving the problem of inconsistent button parameters in manual testing and improving the repeatability and efficiency of testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN STREAMING VIDEO TECH
- Filing Date
- 2026-05-11
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, it is difficult to accurately control the duration and interval of button presses when manually testing the button functions of portable field recording devices, resulting in inconsistent repeatability and reliability of test results.
The relay control module is connected to the button circuit board of the device under test. The flying wire transmits level signals to simulate button operation, realizing automated control of button operation, including single click, long press, double click and combination key, to ensure the accuracy and consistency of button action.
It improves the consistency and reliability of test conditions, reduces human intervention, and enhances test efficiency and accuracy.
Smart Images

Figure CN122469154A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic equipment technology, and in particular relates to a device testing method and apparatus. Background Technology
[0002] In the field of portable field recording devices, testing the button operation function of the device is an important part of the research and development and production process.
[0003] In related technologies, the button function testing of field recording devices is usually carried out manually. That is, the tester manually presses the physical buttons on the device to trigger the corresponding function process, and relies on manual observation or auxiliary tools to judge whether the function is executed normally.
[0004] However, the aforementioned manual testing method makes it difficult to accurately control parameters such as the duration of each key press and the interval between presses, resulting in inconsistent testing conditions and affecting the repeatability and reliability of the test results. Summary of the Invention
[0005] This application provides a device testing method and apparatus that can automate button operations and improve the consistency of testing conditions.
[0006] The first aspect of this application provides a device testing method applied to a device testing system. The device testing system includes a relay control module, which is connected to the key signal input terminal of the internal key circuit board of the device under test via a flying wire. The method includes: the relay control module acquiring a key control command for the device under test; controlling a relay in the corresponding channel of the relay control module to perform an on / off action according to the key control command; and outputting a level signal corresponding to the on / off action to the key signal input terminal of the key circuit board via a flying wire to simulate key operation on the device under test.
[0007] In the technical solution of this application, the main method is to obtain the key control command and control the relay to turn on and off, and output the corresponding level signal to the key circuit board through the flying wire to simulate the key operation, thereby realizing the automated control of the key operation and improving the consistency of the test conditions.
[0008] Optionally, in one possible implementation of the first aspect, before the relay control module obtains the key control command for the device under test, the method further includes: configuring serial communication parameters with the relay control module, wherein the serial communication parameters include baud rate, data bits, stop bits, and parity bits; and establishing a serial communication connection with the relay control module based on the serial communication parameters. Thus, by configuring the serial communication parameters and establishing the serial communication connection, a standardized communication link is provided to the relay control module, ensuring stable transmission of control commands.
[0009] Optionally, in another possible implementation of the first aspect, controlling the relays of the corresponding channel in the relay control module to perform on / off actions according to the key control command includes: determining the target relay channel address and target on / off state according to the key control command; generating a control command containing a start byte, the target relay channel address, an on / off state byte, and a checksum according to the target relay channel address and target on / off state; and sending the control command to the relay control module to control the relays of the corresponding channel to perform on / off actions. Thus, by generating a control command containing a start byte, channel address, on / off state byte, and checksum and sending it to the relay control module, precise control of the relay on / off state is achieved, improving the reliability and identifiability of the control command.
[0010] Optionally, in another possible implementation of the first aspect, the button operation includes simulating a single click operation. The button control command is used to control the relay of the corresponding channel to perform an on / off action. The aforementioned method of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button operation on the device under test includes: outputting a first level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button press; controlling the relay to perform an off action after maintaining the first level signal for a first preset time; and outputting a second level signal corresponding to the off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button release. Thus, by outputting a first level signal via a flying wire to simulate a button press, and then outputting a second level signal after maintaining the first preset time to simulate a button release, a single click operation is accurately simulated, ensuring the accuracy of the single click timing.
[0011] Optionally, in another possible implementation of the first aspect, the button operation includes simulating a long press operation. The button control command is used to control the relay of the corresponding channel to perform an on / off action. The above-mentioned output of a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button operation on the device under test includes: outputting a first level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button press; controlling the relay to perform an off action after maintaining the output of the first level signal for a second preset time, wherein the second preset time is longer than the first preset time corresponding to a single click operation; and outputting a second level signal corresponding to the off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button release. Thus, by outputting a first level signal via a flying wire to simulate a button press, maintaining it for a second preset time, and then outputting a second level signal to simulate a button release, with the second preset time being longer than the first preset time, a long press operation is accurately simulated, achieving accurate control of the long press timing.
[0012] Optionally, in another possible implementation of the first aspect, the button operation includes simulating a double-click operation. The button control command is used to control the relay of the corresponding channel to perform on / off actions. The above-mentioned output of a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire simulates a button operation on the device under test. This includes: performing a first simulated button click operation, wherein the simulated button click operation includes: outputting a first level signal corresponding to the relay's on action via a flying wire to simulate a button press; maintaining the output of the first level signal for a first preset time; then outputting a second level signal corresponding to the relay's off action via a flying wire to simulate a button release; and after waiting for a third preset time, performing a second simulated button click operation. Therefore, by sequentially performing the first simulated button click operation, waiting for the third preset time, and performing the second simulated button click operation, a double-click operation is accurately simulated, ensuring accurate control of the interval between the two clicks.
[0013] Optionally, in another possible implementation of the first aspect, the button operation includes simulating combination button operation. The button control command is used to simultaneously control the relays of multiple channels to perform on / off actions. The aforementioned method of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate button operation on the device under test includes: simultaneously outputting a first level signal corresponding to the on action of each channel relay to the button signal input terminal corresponding to multiple buttons via a flying wire to simulate multiple buttons being pressed simultaneously; after maintaining the output of the first level signal for a fourth preset time, simultaneously controlling the relays of multiple channels to perform off actions; and simultaneously outputting a second level signal corresponding to the off action of each channel relay to the button signal input terminal corresponding to multiple buttons via a flying wire to simulate multiple buttons being released simultaneously. Thus, by simultaneously outputting the first level signal to the button signal input terminal corresponding to multiple buttons, maintaining it for a fourth preset time, and then simultaneously outputting the second level signal, the simultaneous pressing and releasing of multiple buttons is accurately simulated, achieving accurate simulation of combination button operation.
[0014] Optionally, in another possible implementation of the first aspect, the method further includes: receiving control command echo information returned by the relay control module; verifying the execution result of the control command based on the echo information; and performing a retry operation or recording an error log if the verification result fails. Thus, by receiving the echo information returned by the relay control module and verifying the command execution result, and performing a retry or recording a log when a failure occurs, the reliability and traceability of the testing process are improved.
[0015] Optionally, in another possible implementation of the first aspect, the method further includes: acquiring button control commands from multiple devices under test (DUTs), wherein the multiple DUTs are respectively connected to different channel groups of a relay control module via jumpers; and simultaneously sending control commands to the corresponding multiple channels in the relay control module according to the button control commands of each DUT, so as to simultaneously simulate button operations on multiple DUTs. Thus, by acquiring the button control commands from multiple DUTs and simultaneously sending control commands to the corresponding multiple channels, parallel testing of multiple DUTs is achieved, improving testing efficiency.
[0016] A second aspect of this application provides a device testing apparatus applied to a device testing system. The device testing system includes a relay control module, which is connected to the key signal input terminal of the internal key circuit board of the device under test via a flying wire. The apparatus includes: The command acquisition module is used to acquire key control commands for the device under test through the relay control module.
[0017] The test control module is used to control the relays of the corresponding channels in the relay control module to perform on / off actions according to the button control commands, and outputs the level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through a flying wire to simulate the button operation of the device under test.
[0018] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the device testing method of the first aspect described above.
[0019] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the device testing method of the first aspect described above.
[0020] The fifth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the device testing method of the first aspect described above.
[0021] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of the architecture of a device testing system provided in an embodiment of this application; Figure 2 This is a schematic flowchart of a device testing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a flying wire connection method provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating the working principle of a relay control module provided in an embodiment of this application; Figure 5 This is a timing diagram simulating a key operation provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a device testing apparatus provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0025] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0026] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0027] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0028] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0029] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0030] It should be understood that the sequence number of each step in this embodiment does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.
[0031] In related technologies, button function testing of field recording devices typically employs manual operation. This involves testers manually pressing physical buttons on the device to trigger the corresponding function flow, and then relying on manual observation or auxiliary tools to determine whether the function is executing correctly. However, this manual testing method struggles to precisely control parameters such as the duration and interval of each button press, leading to inconsistent test conditions and affecting the repeatability and reliability of the test results.
[0032] In view of this, embodiments of this application provide a device testing method and apparatus, applied to a device testing system. The device testing system includes a relay control module, which is connected to the key signal input terminal of the key circuit board inside the device under test via a flying wire. The method includes: first, the relay control module acquires a key control command for the device under test; then, according to the key control command, it controls the relay of the corresponding channel in the relay control module to perform an on / off action, and outputs a level signal corresponding to the on / off action to the key signal input terminal of the key circuit board via the flying wire to simulate key operation on the device under test. Thus, by acquiring key control commands and controlling the relay on / off, and outputting a corresponding level signal to the key circuit board via the flying wire to simulate key operation, automated control of key operation is achieved, improving the consistency of test conditions.
[0033] The following example illustrates the application scenario of the device testing method provided in this application. Portable field recording devices, such as Mobile Digital Video Recorders (MDVRs), require verification of their warning triggering function before leaving the factory. Traditionally, testers repeatedly press the device buttons, which not only makes it difficult to guarantee the consistency of each press duration and interval but also consumes a significant amount of manpower. Using the solution of this application, by leading a flying wire from the internal button circuit board to the relay control module, the control program automatically sends button control commands. The relay executes on / off actions according to the commands, outputting a corresponding level signal to the button circuit board via the flying wire. This accurately simulates button operation, thereby achieving standardized, repeatable, and automated testing of button triggering, effectively improving testing efficiency and consistency.
[0034] To illustrate the technical solution of this application, specific embodiments are described below.
[0035] Reference Figure 1 The diagram illustrates the architecture of a device testing system provided in an embodiment of this application. Figure 1 As shown, the testing system includes a relay control module. The relay control module is connected to the button signal input terminal of the internal button circuit board of the device under test via a jumper wire.
[0036] The device under test is a portable field recording device with physical buttons. Its internal button circuit board has multiple button signal input terminals, each corresponding to a physical button.
[0037] The relay control module is an electronic control device with multiple relay channels. Each relay channel corresponds to a physical button. The relay control module can receive external control commands and control the on / off state of the internal relays according to the control commands.
[0038] The flying wire serves as a connection medium, with one end connected to the button signal input terminal of the button circuit board inside the device under test, and the other end connected to the output terminal of the corresponding channel of the relay control module, used to transmit the level signal generated by the relay's on / off action.
[0039] The equipment testing system also includes control software, which runs on the test computer and interacts with the relay control module via serial communication. The control software sends button control commands to the relay control module, instructing the relays on the target channel of the relay control module to perform on or off actions. When the relay is on, the flying wire outputs a first-level signal to the button signal input terminal, simulating a button press; when the relay is off, the flying wire outputs a second-level signal to the button signal input terminal, simulating a button release.
[0040] The equipment testing system also includes an automated testing framework, which integrates the testing framework of the control software. This framework can write test cases, automatically execute test processes, and verify test results.
[0041] Through the above system architecture, the control software can automatically execute key operation sequences according to the test cases issued by the automated testing framework, thereby realizing the automated simulation of key operations on the device under test.
[0042] exist Figure 1 Based on the system architecture shown, Figure 2 A schematic flowchart of a device testing method provided in an embodiment of this application is shown. Figure 2 As shown, the device testing method may include the following steps: Step 201: The relay control module acquires the key control commands for the device under test.
[0043] In this context, button control commands refer to control instructions used to instruct the relay control module to perform on / off actions. These commands must at least include the target relay channel address (e.g., input / output (IO) address) and the target on / off status information. Button control commands can be generated by control software running on the test computer or issued by an automated testing framework integrated with the control software. An automated testing framework is a software platform that supports test case writing, execution, and result verification, capable of parsing preset test cases into a series of button control command sequences.
[0044] In one embodiment, the control software acts as an intermediary between the test computer and the relay control module, providing a standardized Application Programming Interface (API) for the upper-level automated testing framework to call. The automated testing framework calls the API, passing in the key identifier, operation type (e.g., single click, long press, double click, combination key), and optional timing parameters. The control software then generates corresponding key control commands based on the input parameters. These generated key control commands are sent to the relay control module for retrieval.
[0045] For example, in a test scenario for the warning function of a portable field recording device, the automated testing framework can write test cases containing the following sequence of operations: First, a long press is executed to simulate triggering an emergency warning; after waiting for the device to respond, a combination of key presses is executed to simulate a recording warning. When executing this test case, the automated testing framework sequentially calls the control software interface, passing in the key identifier corresponding to the "mark key" and the long press operation type to generate the first key control command; after a preset delay, it then passes in the two key identifiers corresponding to the "function key" and the "record key" and the combination of key presses to generate the second key control command. Thus, the relay control module sequentially acquires multiple key control commands for the device under test, providing input for subsequent automated simulation of key operations.
[0046] Step 202: According to the button control command, control the relay of the corresponding channel in the relay control module to perform on / off action, and output the level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through the flying wire to simulate the button operation of the device under test.
[0047] In this embodiment of the application, in order to simulate the button operation of the device under test, the relay control module and the button circuit board of the device under test need to be physically connected by a flying wire.
[0048] In one possible implementation, such as Figure 3The diagram illustrates a flying wire connection method where flying wires extend from the internal button circuit board of the device under test (DUT), with each flying wire corresponding to a physical button. The specific connection method is as follows: For each button, a button signal line is drawn from the button signal input terminal of the button circuit board, and a ground line is also drawn from the ground (GND) terminal of the button circuit board. The button signal line is connected to the output terminal (Output, OUT) of the corresponding channel of the relay control module, and the ground line is connected to the common ground (GND) of the relay control module. The common terminal (COM) of the relay control module is connected to the positive power supply terminal (Voltage Common Collector, VCC) of the DUT via a pull-up resistor, or directly to a high level. When the relay is off, the button signal line remains high through the pull-up resistor, and the DUT detects the high level, determining that the button is not pressed. When the relay is on, the button signal line is connected to the ground through the relay, becoming low, and the DUT detects the low level, determining that the button is pressed. In this way, the level signal generated by the relay's on / off action is transmitted to the button signal input terminal of the button circuit board via the flying wires, thereby simulating a button press.
[0049] It should be noted that in practice, the relay control module typically uses a serial communication protocol to interact with the test computer. Therefore, a communication link needs to be established between the test computer and the relay control module before sending control commands.
[0050] In one embodiment, serial communication parameters between the relay control module and the relay control module can be pre-configured. These parameters include baud rate, data bits, stop bits, and parity bits. Based on these parameters, a serial communication connection is established with the relay control module. Thus, by configuring the serial communication parameters and establishing the connection, a standardized communication link is provided to the relay control module, ensuring stable transmission of control commands.
[0051] Specifically, after startup, the control software first needs to configure the serial communication parameters. These parameters include baud rate (e.g., 9600, 115200), data bits (usually 8 bits), stop bits (usually 1 bit), and parity bits (usually no parity, odd parity, or even parity). These parameters must be consistent with the hardware settings of the relay control module to ensure reliable communication. After configuration, the control software uses the serial port interface functions provided by the operating system to open the serial port device based on the configured parameters and establish a serial communication connection with the relay control module. Once the connection is successful, the control software can send control commands to the relay control module through this serial port and receive the returned echo information.
[0052] In one embodiment, the steps for controlling the relay to perform on / off actions may specifically include: first, determining the target relay channel address and target on / off state based on the button control command; then, generating a control command containing a start byte, the target relay channel address, an on / off state byte, and a checksum based on the target relay channel address and target on / off state; and finally, sending the control command to the relay control module to control the relay of the corresponding channel to perform on / off actions. Thus, by generating a control command containing a start byte, channel address, on / off state byte, and checksum and sending it to the relay control module, precise control of the relay's on / off state is achieved, improving the reliability and identifiability of the control command.
[0053] Specifically, after receiving a button control command, the control software first parses the command to determine the address of the target relay channel to be controlled and the target on / off state of that relay channel. For example, if the button control command instructs the first button to be pressed, the target relay channel address is the first channel, and the target on / off state is on (i.e., pressed); if it instructs the first button to be released, the target on / off state is off (i.e., released). Subsequently, the control software generates control commands that conform to the format requirements according to a preset communication protocol.
[0054] In one possible implementation, such as Figure 4 The diagram shows the working principle of a relay control module. The relay control module can be controlled using a command frame format. Each control command consists of four bytes: a start byte (fixed as hexadecimal A0), a relay channel address (e.g., 0x01 for the first channel, 0x02 for the second channel, and so on), an on / off status byte (0x01 for on, 0x00 for off), and a checksum.
[0055] The calculation method for the checksum can include: for a connection command, the checksum is the sum of the starting byte and the channel address plus 0x01; for a disconnect command, the checksum is the sum of the starting byte and the channel address plus 0x00. A specific example is as follows: To control the first relay to turn on, send the command A0 01 01 A2, where the checksum A2 is calculated as 0xA0 + 0x01 + 0x01 = 0xA2; To control the first relay to turn off, send the command A0 01 00 A1, where the checksum A1 is calculated as 0xA0 + 0x01 + 0x00 = 0xA1; To control the second relay to turn on, send the command A0 02 01 A3, where the checksum A3 is calculated as 0xA0 + 0x02 + 0x01 = 0xA3; To control the second relay to turn off, send the command A0 02 00 A2, where the checksum A2 is calculated as 0xA0 + 0x02 + 0x00 = 0xA2.
[0056] Furthermore, after generating the control command, the control software sends the command in binary or ASCII hexadecimal form to the relay control module via the established serial communication connection. Upon receiving the command, the relay control module parses the command frame and, based on the channel address and on / off status bytes, controls the corresponding channel's relay to perform the on or off action. It then returns echo information (usually the content of the received command frame) via the serial port to confirm the command execution status. This achieves precise control over the relay's on / off actions.
[0057] In this embodiment of the application, when the relay control module performs the relay connection or disconnection action according to the received control command, the level signal generated by the connection or disconnection action is transmitted to the key signal input terminal of the key circuit board inside the device under test via a flying wire.
[0058] Specifically, when the relay is on, the flying wire outputs a first-level signal to the button signal input terminal, simulating a button press; when the relay is off, the flying wire outputs a second-level signal to the button signal input terminal, simulating a button release. By precisely controlling the timing of the relay's on and off states, various types of button operations can be simulated, including single clicks, long presses, double clicks, and combination key presses.
[0059] It should be noted that during actual testing, the control software not only needs to send relay on / off commands, but also needs to precisely control the timing of these commands to achieve accurate adjustment of parameters such as button press duration and button interval. For example... Figure 5 The diagram shown is a timing diagram for simulating key operations. By setting different delay parameters, different types of key operations can be simulated.
[0060] In one embodiment, the button operation includes simulating a single click, and the button control command is used to control the relay of the corresponding channel to perform an on action. The step of simulating the button operation by outputting a level signal via a flying wire specifically includes: outputting a first level signal corresponding to the on action to the button signal input terminal of the button circuit board via a flying wire to simulate a button press; controlling the relay to perform an off action after maintaining the first level signal for a first preset time; and outputting a second level signal corresponding to the off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button release. Therefore, by outputting a first level signal via a flying wire to simulate a button press, and then outputting a second level signal after maintaining the first preset time to simulate a button release, a single click operation is accurately simulated, ensuring the accuracy of the single click timing.
[0061] It should be noted that when simulating a single click operation, the control software can first send a relay activation command to the corresponding channel via serial port based on the button control command. After the relay is activated, the flying wire outputs a first-level signal to the button signal input terminal. At this time, the device under test detects this level change and determines that the button is pressed. After sending the activation command, the control software starts a delay timer, maintaining the first-level signal for a first preset time (e.g., 0.1 seconds). The first preset time can be configured according to the typical button response duration of the device under test, usually between 50 milliseconds and 200 milliseconds. After the first preset time ends, the control software sends a relay deactivation command to the corresponding channel. After the relay deactivates, the flying wire outputs a second-level signal to the button signal input terminal. The device under test detects the restoration of the level and determines that the button is released. Thus, a complete single click operation simulation is completed.
[0062] In another embodiment, the button operation includes simulating a long press operation. The button control command is used to control the relay of the corresponding channel to perform an on action. The step of simulating the button operation by outputting a level signal via a flying wire can specifically include: outputting a first level signal corresponding to the on action to the button signal input terminal of the button circuit board via a flying wire to simulate a button press; controlling the relay to perform an off action after maintaining the output of the first level signal for a second preset time, wherein the second preset time is longer than the first preset time corresponding to the simulated single click operation; and outputting a second level signal corresponding to the off action to the button signal input terminal of the button circuit board via a flying wire to simulate a button release. Thus, by outputting a first level signal via a flying wire to simulate a button press, maintaining it for a second preset time, and then outputting a second level signal to simulate a button release, and with the second preset time being longer than the first preset time, a long press operation is accurately simulated, achieving accurate control of the long press timing.
[0063] It should be noted that the basic process of a long press operation is the same as that of a single click operation, the difference being that the button is held down for a longer period. After sending the relay activation command, the control software can maintain the first-level signal for a second preset time. The second preset time is set according to the minimum duration required for the device under test to recognize the long press operation. For example, in portable field recording devices, a long press of the marker button to trigger an emergency warning typically requires 3 to 5 seconds. Therefore, the second preset time can be set to 3 seconds, 4 seconds, or 10 seconds, depending on the actual function definition of the device under test. After the second preset time ends, the control software sends a relay deactivation command, and the flywire outputs a second-level signal, simulating button release. By setting the second preset time to be longer than the first preset time, accurate simulation of the long press operation is achieved.
[0064] In another embodiment, the button operation includes simulating a double-click operation. The button control command is used to control the relay of the corresponding channel to perform on / off actions. The step of simulating the button operation by outputting a level signal via a flying wire can specifically include: performing a first simulated button click operation, wherein the simulated button click operation includes: outputting a first level signal corresponding to the relay's on action via a flying wire to simulate a button press; after maintaining the output of the first level signal for a first preset time, outputting a second level signal corresponding to the relay's off action via a flying wire to simulate a button release; and after waiting for a third preset time, performing a second simulated button click operation. Thus, by sequentially performing the first simulated button click operation, waiting for the third preset time, and performing the second simulated button click operation, a double-click operation is accurately simulated, ensuring accurate control of the interval between the two clicks.
[0065] It should be noted that when simulating a double-click operation, the control software first executes a simulated single-click operation, outputting a first-level signal for a first preset time, followed by a second-level signal to complete the first button press and release. Subsequently, the control software waits for a third preset time (e.g., 0.2 seconds), representing the interval between the two clicks. This third preset time is typically set according to the double-click recognition window of the device under test, generally between 100 and 300 milliseconds. After the wait period, the control software executes a second simulated single-click operation to complete the second button press and release. Through this process, accurate simulation of the double-click operation is achieved, ensuring that the interval between the two button presses is accurately controllable.
[0066] In another embodiment, the button operation includes simulating a combination button operation. The button control command is used to simultaneously control the relays of multiple channels to perform on / off actions. Specifically, the step of simulating button operation by outputting level signals via a flying wire may include: simultaneously outputting a first level signal corresponding to the on action of each channel relay to the button signal input terminal corresponding to multiple buttons via a flying wire, to simulate multiple buttons being pressed simultaneously; after maintaining the output of the first level signal for a fourth preset time, simultaneously controlling the relays of multiple channels to perform off actions; and simultaneously outputting a second level signal corresponding to the off action of each channel relay to the button signal input terminal corresponding to multiple buttons via a flying wire, to simulate multiple buttons being released simultaneously. Thus, by simultaneously outputting the first level signal to the button signal input terminal corresponding to multiple buttons, maintaining it for a fourth preset time, and then simultaneously outputting the second level signal, the simultaneous pressing and releasing of multiple buttons is accurately simulated, achieving accurate simulation of combination button operation.
[0067] It should be noted that combination key operations require simulating the simultaneous pressing of multiple keys. The control software can determine the multiple target channel addresses that need to be operated simultaneously based on the key control commands. Subsequently, the control software sends multiple relay activation commands at once via serial port, or sequentially at very short time intervals (e.g., less than 1 millisecond), ensuring that multiple relays are macroscopically activated simultaneously. After the relays are activated, the flying leads simultaneously output a first-level signal to the key signal input terminals corresponding to multiple keys. The device under test detects that multiple key signals simultaneously become low-level, determining that the combination key is pressed. After sending the activation command, the control software maintains the first-level signal for a fourth preset time (e.g., 0.1 seconds), which can be configured according to the response requirements of the device under test to the combination key. After the fourth preset time ends, the control software simultaneously sends multiple relay deactivation commands, and the flying leads simultaneously output a second-level signal, simulating the simultaneous release of multiple keys. In this way, accurate simulation of combination key operations (such as simultaneously pressing a function key and a record key to trigger a recording alert) is achieved.
[0068] Furthermore, after completing the above-mentioned button operation simulation, the control software can further ensure the reliability and improve the efficiency of the testing process.
[0069] In one embodiment, after completing the above-mentioned key operation simulation, the control command echo information returned by the relay control module can be received; based on the echo information, the execution result of the control command can be verified; if the verification result is unsuccessful, a retry operation can be performed or an error log can be recorded. Therefore, by receiving the echo information returned by the relay control module and verifying the command execution result, and performing a retry or recording a log when a failure occurs, the reliability and traceability of the testing process are improved.
[0070] It should be noted that after the control software sends a control command to the relay control module, the relay control module typically returns echo information via the serial port. This echo information can be the content of the received command frame (binary or ASCII hexadecimal format). After sending the command, the control software sets a timeout (e.g., 1 second) and checks the serial port receive buffer during this period. If echo information is received, it is compared with the sent command to verify consistency. If they match, the command execution is confirmed as successful; if they do not match or no echo information is received, the command execution is considered a failure. In the event of a failure, the control software can retry according to a preset retry strategy, such as a maximum of 3 retries with a 200-millisecond interval between each retry. If the retry still fails, an error log is recorded, containing the failure time, the failed command, the echo information (if any), and the reason for the failure, for subsequent troubleshooting. This mechanism significantly improves the reliability and traceability of the testing process.
[0071] In one embodiment, button control commands from multiple devices under test (DUTs) can be acquired simultaneously. These DUTs are connected to different channel groups of a relay control module via jumpers. Based on the button control commands of each DUT, control commands are simultaneously sent to the corresponding multiple channels in the relay control module to simulate button operations on multiple DUTs simultaneously. Therefore, by acquiring button control commands from multiple DUTs and simultaneously sending control commands to the corresponding multiple channels, parallel testing of multiple DUTs is achieved, improving testing efficiency.
[0072] It should be noted that when multiple devices under test (DUTs) need to be tested in parallel, a relay control module with multiple channels (e.g., 8-channel, 16-channel, etc.) can be selected, and the fly wires of each DUT can be connected to different channel groups of the relay control module. For example, the first DUT occupies channels 1 to 4, the second DUT occupies channels 5 to 8, and so on. After receiving key control commands for multiple DUTs, the control software determines the channel address range corresponding to each command based on the DUT identifier specified in each command. Then, within the same time window, the control software sends the corresponding control commands to each channel group. Since serial communication is a single-channel transmission, in actual implementation, commands can be sent sequentially at extremely short time intervals, as long as the key operations of multiple DUTs are triggered simultaneously on a macroscopic time scale. This parallel testing method allows for simultaneous simulation of key operations on multiple DUTs, significantly improving test throughput.
[0073] In one possible implementation, the control software also provides a wealth of auxiliary functions to support a complete automated testing process. Specifically, a typical automated testing process includes: test preparation (connecting jumper wires, configuring the serial port, and starting the control software), test case writing (writing test cases in the automated testing framework and calling the control software interface to define key operation sequences), test execution (running test cases and automatically executing key operations by the control software), result verification (verifying whether the function is normal by querying warning records, video files, etc. through the interface of the device under test, such as the Hypertext Transfer Protocol (HTTP) API), and test report generation (recording test results and generating a test report containing test case execution status, warning triggering status, abnormal situations, etc.).
[0074] The device testing method disclosed in the above embodiments of this application firstly obtains a button control command for the device under test; then, according to the button control command, it controls the relay of the corresponding channel in the relay control module to perform an on / off action, and outputs a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through a flying wire to simulate button operation on the device under test. Thus, by obtaining button control commands and controlling the relay on / off, and outputting a corresponding level signal to the button circuit board through a flying wire to simulate button operation, automated control of button operation is achieved, improving the consistency of test conditions.
[0075] The embodiments described above can be used in various testing scenarios. For example, in a video recording alert testing scenario, the control software simulates the combined operation of pressing the function key and the recording key simultaneously to trigger the video recording alert function, verifying whether the device can normally start recording and mark the alert information. In an emergency alert testing scenario, the control software simulates the operation of long-pressing the mark key to trigger an emergency alert, verifying whether the device correctly reports the alert signal and activates the associated linkage mechanism. In a remote alert testing scenario, the control software simulates the key operation sequence corresponding to the alert trigger command issued by the remote server, verifying whether the device can correctly respond and execute the corresponding alert action after receiving the remote alert signal. In an alert type testing scenario, by setting different key operation sequences, the different behaviors of the device when the alert type is set to "alert" or "event" can be tested. In an alert linkage testing scenario, the linkage relationship between the alert and other functions (such as recording, file upload, etc.) can be verified to meet the design requirements.
[0076] See Figure 6 The diagram shows a structural schematic of a device testing apparatus provided in an embodiment of this application. This apparatus is applied to the aforementioned device testing system. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0077] The equipment testing apparatus may specifically include the following modules: The command acquisition module 601 is used to acquire key control commands for the device under test through the relay control module.
[0078] The test control module 602 is used to control the relays of the corresponding channels in the relay control module to perform on / off actions according to the button control commands, and outputs the level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through a flying wire to simulate the button operation of the device under test.
[0079] The device testing apparatus disclosed in the above embodiments of this application first obtains a button control command for the device under test (DUT). Then, according to the button control command, it controls the relays in the corresponding channels of the relay control module to perform on / off actions, and outputs a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via a flying wire to simulate button operation on the DUT. Thus, by obtaining button control commands and controlling the relays to turn on and off, and outputting a corresponding level signal to the button circuit board via a flying wire to simulate button operation, automated control of button operation is achieved, improving the consistency of test conditions.
[0080] Furthermore, in one possible implementation of this application embodiment, the above-mentioned equipment testing device may further include the following modules: The communication establishment module is used to configure the serial communication parameters with the relay control module before obtaining the key control commands for the device under test. The serial communication parameters include baud rate, data bits, stop bits, and parity bits. Based on the serial communication parameters, a serial communication connection with the relay control module is established.
[0081] Therefore, by configuring serial communication parameters and establishing a serial communication connection, a standardized communication link is provided for the relay control module, ensuring the stable transmission of control commands.
[0082] Furthermore, in another possible implementation of this application embodiment, the test control module 602 may specifically include the following units: The first determining unit is used to determine the target relay channel address and the target on / off state according to the key control command.
[0083] The first generation unit is used to generate a control command containing a start byte, a target relay channel address, an on / off status byte, and a checksum, based on the target relay channel address and the target on / off status.
[0084] The first transmitting unit is used to send control commands to the relay control module to control the relays of the corresponding channel to perform on / off actions.
[0085] Therefore, by generating control commands containing start bytes, channel address, on / off status bytes, and check codes and sending them to the relay control module, precise control of the relay's on / off status is achieved, improving the reliability and recognizability of the control commands.
[0086] Furthermore, in another possible implementation of this application embodiment, the button operation includes a simulated click operation, and the button control command is used to control the relay of the corresponding channel to perform an on action; the above-mentioned test control module 602 may specifically include the following units: The first output unit is used to output a first level signal corresponding to the activation action to the key signal input terminal of the key circuit board via a flying wire, so as to simulate the key being pressed.
[0087] The first control unit is used to control the relay to perform a disconnection action after maintaining the first level signal for a first preset time.
[0088] The second output unit is used to output a second level signal corresponding to the disconnection action to the key signal input terminal of the key circuit board via a flying wire, so as to simulate key release.
[0089] Therefore, by outputting a first-level signal via a flying wire to simulate a button being pressed, and holding it for a first preset time before outputting a second-level signal to simulate a button being released, a single-click operation is precisely simulated, ensuring the accuracy of the timing of the single-click action.
[0090] Furthermore, in another possible implementation of this application embodiment, the button operation includes a simulated long press operation, and the button control command is used to control the relay of the corresponding channel to perform an on action; the above-mentioned test control module 602 may specifically include the following units: The third output unit is used to output a first-level signal corresponding to the activation action to the key signal input terminal of the key circuit board via a flying wire, so as to simulate the key being pressed.
[0091] The second control unit is used to control the relay to perform a disconnection action after maintaining the output first level signal for a second preset time, wherein the second preset time is longer than the first preset time corresponding to the simulated click operation.
[0092] The fourth output unit is used to output a second-level signal corresponding to the disconnection action to the key signal input terminal of the key circuit board via a flying wire, so as to simulate key release.
[0093] Therefore, by outputting a first-level signal via a flying wire to simulate a button being pressed, and holding it for a second preset time, outputting a second-level signal to simulate a button being released, and the second preset time being longer than the first preset time, the long-press operation is accurately simulated, thus achieving accurate control of the long-press timing.
[0094] Furthermore, in another possible implementation of this application embodiment, the button operation includes a simulated double-click operation, and the button control command is used to control the relay of the corresponding channel to perform on / off actions; the above-mentioned test control module 602 may specifically include the following units: The first execution unit is used to perform a first simulated key click operation, wherein the simulated key click operation includes: outputting a first level signal corresponding to the relay connection action through a flying wire to simulate key pressing, and after maintaining the output of the first level signal for a first preset time, outputting a second level signal corresponding to the relay disconnect action through a flying wire to simulate key release.
[0095] The second execution unit is used to execute a second simulated key click operation after waiting for a third preset time. Thus, by sequentially executing the first simulated key click operation, waiting for the third preset time, and then executing the second simulated key click operation, a double-click operation is accurately simulated, ensuring precise control of the interval between the two clicks.
[0096] Furthermore, in another possible implementation of this application embodiment, the button operation includes simulated combination button operation, and the button control command is used to simultaneously control the relays of multiple channels to perform on / off actions; the above-mentioned test control module 602 may specifically include the following units: The fifth output unit is used to simultaneously output a first-level signal corresponding to the activation action of each channel relay to the key signal input terminal of multiple keys via a flying wire, so as to simulate the simultaneous pressing of multiple keys.
[0097] The third control unit is used to simultaneously control the relays of multiple channels to perform disconnection actions after maintaining the output first level signal for a fourth preset time.
[0098] The sixth output unit is used to simultaneously output a second-level signal corresponding to the disconnection action of each channel relay to the key signal input terminals of multiple keys via a flying wire, so as to simulate the simultaneous release of multiple keys.
[0099] Therefore, by simultaneously outputting a first-level signal to the key signal input terminals corresponding to multiple keys, and maintaining it for a fourth preset time before simultaneously outputting a second-level signal, the simultaneous pressing and releasing of multiple keys can be accurately simulated, thus achieving accurate simulation of combination key operations.
[0100] Furthermore, in another possible implementation of this application embodiment, the above-mentioned equipment testing device may further include the following modules: The result verification module is used to receive the control command echo information returned by the relay control module; verify the execution result of the control command based on the echo information; and perform a retry operation or record an error log if the verification result is unsuccessful.
[0101] Therefore, by receiving the echo information returned by the relay control module and verifying the command execution results, retrying or logging can be performed in case of failure, thereby improving the reliability and traceability of the testing process.
[0102] Furthermore, in another possible implementation of the embodiments of this application, the above-mentioned equipment testing device may further include the following modules: The parallel testing module is used to acquire button control commands from multiple devices under test (DUTs). These DUTs are connected to different channel groups of the relay control module via jumpers. Based on the button control commands of each DUT, control commands are simultaneously sent to the corresponding multiple channels in the relay control module to simulate button operations on multiple DUTs at the same time.
[0103] Therefore, by acquiring the button control commands of multiple devices under test and simultaneously sending control commands to the corresponding multiple channels, parallel testing of multiple devices under test can be achieved, thereby improving testing efficiency.
[0104] The device testing apparatus provided in this application embodiment can be applied in the foregoing method embodiment. For details, please refer to the description of the above method embodiment, which will not be repeated here.
[0105] Figure 7 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. For example... Figure 7 As shown, the electronic device 700 of this embodiment includes: at least one processor 710 ( Figure 7 The diagram shows only one processor, a memory 720, and a computer program 721 stored in the memory 720 and executable on the at least one processor 710. When the processor 710 executes the computer program 721, it implements the steps in the above-described device testing method embodiments.
[0106] The electronic device 700 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 710 and a memory 720. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 700 and does not constitute a limitation on electronic device 700. It may include more or fewer components than shown, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0107] The processor 710 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0108] In some embodiments, the memory 720 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. In other embodiments, the memory 720 may be an external storage device of the electronic device 700, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 700. Furthermore, the memory 720 may include both internal and external storage units of the electronic device 700. The memory 720 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 720 can also be used to temporarily store data that has been output or will be output.
[0109] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0110] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0111] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0112] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0115] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0116] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the various method embodiments described above.
[0117] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A device testing method, characterized in that, The method is applied to an equipment testing system, which includes a relay control module connected to the button signal input terminal of the internal button circuit board of the device under test via a flying wire; the method includes: The relay control module acquires key control commands for the device under test; According to the button control command, the relay of the corresponding channel in the relay control module is controlled to perform on / off action, and the level signal corresponding to the on / off action is output to the button signal input terminal of the button circuit board through the flying wire to simulate the button operation of the device under test.
2. The method according to claim 1, characterized in that, Before the relay control module acquires the key control command for the device under test, the method further includes: Configure serial communication parameters with the relay control module, wherein the serial communication parameters include baud rate, data bits, stop bits, and parity bits; Based on the serial communication parameters, a serial communication connection is established with the relay control module.
3. The method according to claim 1, characterized in that, The step of controlling the relays of the corresponding channels in the relay control module to perform on / off actions according to the button control command includes: Based on the key control command, determine the target relay channel address and the target on / off state; Based on the target relay channel address and the target on / off status, generate a control command containing a start byte, the target relay channel address, the on / off status byte, and a checksum. The control command is sent to the relay control module to control the relay of the corresponding channel to perform on / off actions.
4. The method according to claim 1, characterized in that, The button operation includes simulating a single click operation; the button control command is used to control the relay of the corresponding channel to perform an on / off action; the step of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through the flying wire to simulate button operation on the device under test includes: The first level signal corresponding to the activation action is output to the button signal input terminal of the button circuit board through the flying wire to simulate the button being pressed. After maintaining the first level signal for a first preset time, control the relay to perform a disconnection action; The flying wire outputs a second-level signal corresponding to the disconnection action to the button signal input terminal of the button circuit board to simulate button release.
5. The method according to claim 1, characterized in that, The button operation includes simulating a long press operation; the button control command is used to control the relay of the corresponding channel to perform an on / off action; the step of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through the flying wire to simulate button operation on the device under test includes: The first level signal corresponding to the activation action is output to the button signal input terminal of the button circuit board through the flying wire to simulate the button being pressed. After maintaining the output of the first level signal for a second preset time, the relay is controlled to perform a disconnection action, wherein the second preset time is longer than the first preset time corresponding to the simulated click operation; The flying wire outputs a second-level signal corresponding to the disconnection action to the button signal input terminal of the button circuit board to simulate button release.
6. The method according to claim 1, characterized in that, The button operation includes simulating a double-click operation. The button control command is used to control the relay of the corresponding channel to perform on / off actions. The step of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via the flying wire to simulate button operation on the device under test includes: Perform the first simulated button click operation, wherein the simulated button click operation includes: outputting a first level signal corresponding to the relay connection action through the flying wire to simulate button pressing, and after maintaining the output of the first level signal for a first preset time, outputting a second level signal corresponding to the relay disconnect action through the flying wire to simulate button release; After waiting for the third preset time, perform the second simulated key click operation.
7. The method according to claim 1, characterized in that, The button operation includes simulated combination button operation. The button control command is used to simultaneously control the relays of multiple channels to perform on / off actions. The step of outputting a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board via the flying wire to simulate button operation on the device under test includes: Through the flying wire, a first-level signal corresponding to the activation action of each channel relay is simultaneously output to the button signal input terminal corresponding to multiple buttons, so as to simulate the simultaneous pressing of multiple buttons; After maintaining the first level signal output for a fourth preset time, the relays of the multiple channels are simultaneously controlled to perform a disconnection action; Through the flying wire, a second-level signal corresponding to the disconnection action of each channel relay is simultaneously output to the key signal input terminals corresponding to multiple keys, so as to simulate the simultaneous release of multiple keys.
8. The method according to claim 1, characterized in that, The method further includes: Receive control command echo information returned by the relay control module; Verify the execution result of the control command based on the echoed information; If the verification fails, either retry the operation or log the error.
9. The method according to claim 1, characterized in that, The method further includes: Acquire button control commands from multiple devices under test, wherein the multiple devices under test are respectively connected to different channel groups of the relay control module via flying wires; Based on the button control commands of each device under test, control commands are simultaneously sent to multiple corresponding channels in the relay control module to simulate button operations on the multiple devices under test at the same time.
10. A device testing apparatus, characterized in that, An application in an equipment testing system, the equipment testing system including a relay control module, the relay control module being connected to the button signal input terminal of the button circuit board inside the device under test via a flying wire; the device includes: The command acquisition module is used to acquire key control commands for the device under test through the relay control module. The test control module is used to control the relays of the corresponding channels in the relay control module to perform on / off actions according to the button control command, and to output a level signal corresponding to the on / off action to the button signal input terminal of the button circuit board through the flying wire, so as to simulate the button operation of the device under test.