Testing method and device of equipment interface, equipment and storage medium

By setting up a proxy interface in the device and recording the correspondence between the test instructions and the native interface, the problem that the existing technology cannot remotely test the native interface of the device is solved, and the technical effect of remote testing and result preservation is achieved.

CN119668964AActive Publication Date: 2025-03-21深圳开鸿数字产业发展有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411580257.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-21
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

The prior art cannot implement the native interface of remote testing equipment.

Method used

By setting up a proxy interface, the proxy interface records the correspondence between the test instructions and the native interface, so that the native interface of the device can be called through the proxy interface to test the native interface.

Benefits of technology

The technical effect of remote testing of the device's native interface is realized, and the test results are saved through the proxy interface, saving the device's storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668964A_ABST
    Figure CN119668964A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of equipment testing, in particular to an equipment interface testing method and device, equipment and a storage medium. Firstly, a remote test instruction is received through a proxy interface; then controlling the proxy interface to call a native interface of equipment through the test instruction so as to test the native interface of the equipment; and finally, obtaining a test result sent by the equipment through the proxy interface, wherein the test result is a test result of the native interface. According to the analysis, the proxy interface is arranged, and the proxy interface records the corresponding relation between the test instruction and the native interface, so that the native interface of the equipment can be called through the proxy interface to test the native interface, and the technical effect of remotely testing the native interface of the equipment is achieved. And the test result can be stored on the cloud platform through the proxy interface, so that the storage space of the equipment is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of equipment testing, and in particular to a method, device, equipment and storage medium for testing an equipment interface. Background Art

[0002] There are many native interfaces on the device, each of which represents a function of the device. By testing the native interface to test whether the function of the device is normal, the existing technology directly operates the native interface on the device to test whether its function is normal. For example, if the device is a smart lock, when the native interface of the smart lock needs to be tested, the existing technology can only directly start the native interface on the smart lock to test whether it is abnormal, but cannot remotely call the native interface to test whether it is abnormal.

[0003] In summary, the existing technology cannot realize the native interface of the remote test device.

[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a method, apparatus, device and storage medium for testing a device interface, which solves the problem that the prior art cannot realize remote testing of the native interface of the device.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for testing a device interface, comprising:

[0008] Receive remote test instructions through the proxy interface;

[0009] Controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device;

[0010] The test result sent by the device is obtained through the proxy interface, and the test result is the test result of the native interface.

[0011] In one implementation, the receiving of the remote test instruction through the proxy interface includes:

[0012] The remote interface of the device is used to register the proxy interface, and the registered proxy interface receives the remote test instruction sent by the remote interface.

[0013] In one implementation, the definition of the proxy interface includes:

[0014] The proxy interface is defined by defining the corresponding relationship between the remote test instruction and the native interface.

[0015] In one implementation, controlling the proxy interface to call a native interface of a device through the test instruction to test the native interface of the device includes:

[0016] Monitoring current test process information of the native interface;

[0017] Determine the test time according to the current test process information;

[0018] At the test time, the proxy interface is controlled by the test instruction to call the native interface of the device to test the native interface of the device.

[0019] In one implementation, obtaining the test result sent by the device through the proxy interface includes:

[0020] The test result sent by the device and the log formed by the device generating the test result are obtained through the proxy interface.

[0021] In one implementation, when the device is an interactive device, controlling the proxy interface to call a native interface of the device through the test instruction to test the native interface of the device also includes:

[0022] Creating a supporting service interface corresponding to an interactive object of the device;

[0023] and returning the supporting service interface to the proxy replacement interface of the device, so that the proxy replacement interface has the function of the service interface of the interactive object;

[0024] The proxy replacement interface and the native interface are controlled to interact with each other to test the interactive function of the device.

[0025] In one implementation, the creating a supporting service interface corresponding to the interactive object of the device includes:

[0026] A test instruction of the service interface sent by the device through the proxy replacement interface is obtained, and the supporting service interface is created according to the test instruction.

[0027] In a second aspect, an embodiment of the present invention further provides a device for testing a device interface, wherein the device comprises the following components:

[0028] An instruction receiving module, used for receiving remote test instructions through an agent interface;

[0029] A sending module, used for controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device;

[0030] The test module is used to obtain the test result sent by the device through the proxy interface, and the test result is the test result of the native interface.

[0031] In one implementation, the instruction receiving module includes:

[0032] The instruction receiving unit is used to register the proxy interface with the remote interface of the device, and receive the remote test instruction sent by the remote interface through the registered proxy interface.

[0033] In one implementation, it also includes a definition model for defining a proxy interface by defining a corresponding relationship between remote test instructions and the native interface.

[0034] In one implementation, the sending module includes:

[0035] A monitoring unit, used to monitor the current test process information of the native interface;

[0036] A test time calculation unit, used to determine the test time according to the current test process information;

[0037] The instruction control unit is used to control the proxy interface to call the native interface of the device through the test instruction at the test time to test the native interface of the device.

[0038] In one implementation, the test module includes:

[0039] The testing unit is used to obtain the test result sent by the device and the log formed by the device generating the test result through the proxy interface.

[0040] In one implementation, when the device is an interactive device, it further includes:

[0041] An interface creation module, used to create a support service interface corresponding to the interactive object of the device;

[0042] An interface returning module, used to return the supporting service interface to the proxy replacement interface of the device, so that the proxy replacement interface has the function of the service interface of the interactive object;

[0043] The interaction module is used to control the proxy replacement interface and the native interface to interact so as to test the interaction function of the device.

[0044] In one implementation, the interface creation module includes:

[0045] The interface creation unit is used to obtain the test instruction of the service interface sent by the device through the proxy replacement interface, and create the supporting service interface according to the test instruction.

[0046] In a third aspect, an embodiment of the present invention further provides a terminal device, wherein the terminal device comprises a memory, a processor, and a device interface test program stored in the memory and executable on the processor, and when the processor executes the device interface test program, the steps of the device interface test method described above are implemented.

[0047] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a test program for a device interface is stored. When the test program for the device interface is executed by a processor, the steps of the above-mentioned device interface test method are implemented.

[0048] Beneficial effect: The present invention sets up a proxy interface, which records the correspondence between the test instructions and the native interface, so that the native interface of the device can be called through the proxy interface to test the native interface, thereby achieving the technical effect of remote testing the native interface of the device. Moreover, the test results of the present invention can be saved on the cloud platform through the proxy interface, thereby saving the storage space of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is the overall flow chart of the present invention;

[0050] Figure 2 is a schematic diagram of interaction between a controller and a device in an embodiment of the present invention;

[0051] Figure 3 Construct a flow chart for a distributed testing framework in an embodiment of the present invention;

[0052] Figure 4 A structural diagram of a test device for an equipment interface provided by the present invention;

[0053] Figure 5 This is a block diagram of the internal structure principle of the terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments and the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] After research, it was found that there are many native interfaces on the device, each of which represents a function of the device. By testing the native interface to test whether the function of the device is normal, the existing technology directly operates the native interface on the device to test whether its function is normal. For example, if the device is a smart lock, when the native interface of the smart lock needs to be tested, the existing technology can only directly start the native interface on the smart lock to test whether it is abnormal, but cannot remotely call the native interface to test whether it is abnormal.

[0056] In order to solve the above technical problems, the present invention provides a device interface testing method, apparatus, equipment and storage medium, which solves the problem that the prior art cannot realize remote testing of the native interface of the device. In specific implementation, firstly, the remote test instruction is received through the proxy interface; then, the proxy interface is controlled by the test instruction to call the native interface of the device to test the native interface of the device; finally, the test result sent by the device is obtained through the proxy interface, and the test result is the test result of the native interface. The present invention can achieve the technical effect of remote testing the native interface through the proxy interface.

[0057] For example, taking a smart door lock as an example, the specific process of testing a smart door lock in the prior art is as follows:

[0058] First, power on the smart door lock and the display screen. After they are powered on, they will automatically form a network, that is, a communication channel will be established between the smart door lock and the display screen. When a visitor presses the doorbell on the smart door lock, the image acquisition function of the display screen can be started to capture the visitor's face image, and then the smart door lock recognizes the face image to determine whether to allow the visitor to enter. The recognition result is the test result of the smart door lock. Recognizing the face image and controlling the switch of the smart door lock according to the recognition result is a native interface of the smart door lock.

[0059] From the above test process of the prior art, it can be seen that the prior art requires a visitor to stand in front of the smart door lock, and the visitor must press the doorbell to test the native interface of the smart door lock. Since the smart door lock cannot be tested remotely, the testing work is greatly inconvenient.

[0060] In order to solve the above technical problems, the present application first creates a proxy interface agent in the controller on the support frame. At the same time, the support frame also provides the software and hardware environment required for testing the smart door lock. The role of the proxy interface agent is to act as the native interface of the smart door lock on the support frame, that is, the proxy interface agent records the correspondence between the test instruction and the native interface. When a test instruction for testing the native interface of the smart door lock is sent to the proxy interface agent (the content of the test instruction can be "testing the smart door lock with a face image"), the proxy interface agent calls the native interface of the smart door lock to test the recognition result of the smart door lock for the face image, and then tests the opening and closing function of the smart door lock according to the face image to realize the test of the native interface. The present application only needs to call the native interface through the proxy interface agent, and does not require the tester or visitor to stand in front of the smart door lock to provide the smart door lock with a face image, so that the remote testing of the smart door lock can be realized to improve the convenience of the test.

[0061] The device interface testing method of this embodiment can be applied to a terminal device, which can be a terminal product with a data processing function, such as a test framework. Figure 1 As shown in , the device interface testing method specifically includes the following steps:

[0062] S100, receiving a remote test instruction through a proxy interface;

[0063] S200, controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device;

[0064] S300, obtaining a test result sent by the device through the proxy interface, wherein the test result is a test result of the native interface.

[0065] Example 1: Before testing the example, it is necessary to establish a communication link between the controller and the device (test object). Websocket communication is used between the controller and the device. Websocket communication supports full-duplex communication between the controller and the device, that is, the controller can send instructions to the device, and the device can also send instructions to the controller. The specific communication process of the websocket communication protocol is as follows:

[0066] When the controller sends a request to the device, the device receives the request and sends a response, which means that the controller and the device are connected successfully. The controller and the device only need to be connected once to continuously transmit data or instructions without closing, connecting, or repeating operations. Therefore, multiple tests can be performed between the controller and the device without the need for communication connection in each test, thereby improving the convenience of the test.

[0067] The use of websocket communication between the controller and the device has the following technical effects:

[0068] The controller can send test instructions to the device directly without waiting for the device to request a connection. After the device and the controller complete the handshake, the controller can continue to send test instructions to the device without disconnecting the connection to open the connection when needed. Because the websocket protocol has a smaller data packet header, the websocket occupies less memory space. Websocket has more real-time and efficient characteristics in transmitting test instructions, and the generated instructions are smaller and do not contain a lot of unnecessary information.

[0069] Embodiment 2, as Figure 2 As shown, the agent on the controller side is the proxy interface. The proxy interface is registered using the device's remote interface. After registration, the proxy interface has the function of sending the controller's test instructions to the server on the device. The remote interface is a functional interface within the oh device. The main function of this functional interface is to receive data information sent from the outside of the device. Registering the controller's proxy interface with this functional interface makes the proxy interface have the function of the device's remote interface. Therefore, the controller can send test instructions to the device through the proxy interface agent on it to test the device's native interface.

[0070] This embodiment also defines the correspondence between remote test instructions and native interfaces, that is, the device includes several native interfaces, each native interface corresponds to different functions, and the correspondence between remote test instructions and native interfaces is defined by defining a proxy interface. That is, when the proxy interface receives a remote test instruction, the proxy interface needs to know which native interface of the test device it is.

[0071] The proxy interface of this embodiment is located on the controller on the framework. The function of the framework is to provide the required software and hardware environment for testing. Multiple proxy interfaces are set on the framework so that the native interfaces of multiple different devices can be tested simultaneously through the framework, that is, one proxy interface can be used to test the native interface of a device, and multiple proxy interfaces can enable the framework to test the native interfaces of multiple devices at the same time. The multiple proxy interfaces on the framework are distributed, so that the framework can test multiple devices at the same time to improve the test efficiency. The distributed test framework can provide device scheduling capabilities and software and hardware service preset capabilities, provide support for test case development, and integrate existing test tools and frameworks. The preset conditions required for the test are completed by the device requesting the host computer without manual operation. Test cases are written on the host computer to control the testing of multiple devices at the same time. The distributed framework provides long-term stable testing services to monitor the test conditions of each device for a long time to avoid loss of information and cause positioning difficulties, that is, to avoid the phenomenon that the test results and devices do not correspond. Distributed test frameworks schedule each device for testing, that is, the distributed test framework controls the test sequence of each device.

[0072] The framework of this embodiment solves the problems of multi-device interaction, scenario construction, software and hardware environment dependence, device performance indicator monitoring and test result collection in distributed communication function testing, and provides the ability to integrate various types of test tools, and can be used in conjunction with the functions of the test platform. The stability test tool improves the efficiency of testers in stability testing. With the help of the tool, stability test scenarios can be quickly constructed and text use cases for stability testing can be generated. At the same time, the definition of model data and test methods can help locate problems in the test and collect device performance data and test results.

[0073] The distributed testing framework of this embodiment has the following main features: resource networking, node distribution, synchronous real-time, dynamic deployment, high reliability, and good security.

[0074] Among them, resource networking means using the characteristics of the network to achieve the most basic connectivity function between multiple test nodes, realize resource sharing, and build the underlying support structure of the distributed test system.

[0075] Node distribution means that the processing nodes deployed in the distributed test system should be distributed not only physically but also in computing logic. However, the system is transparent to users, and users do not know which processing node the specific test takes place on. Synchronous real-time means that the distributed test system needs to schedule the processing nodes deployed in the system, mainly to coordinate the work between tasks to process various test information, and the synchronization between nodes and between processes needs to be strictly guaranteed in real time. Deployment dynamics means that in order to ensure the coordination and load balancing between test subsystems, the distributed test system needs to dynamically adjust the coordination relationship between subsystems and dynamically synchronize the distribution of test tasks between systems.

[0076] Strong fault tolerance. High reliability and good security. That is, the distributed test system generally adopts the client / server design mode, which consists of multiple test servers and several test service terminals. The server and the client are connected through the Internet. With the development of hardware, devices such as GPIB-ENT can be directly connected to the Internet, thus replacing the test server.

[0077] The distributed testing framework of this embodiment is constructed as follows Figure 3 As shown, it will include the construction of scenario models, monitoring of device performance indicators, archiving of text test cases, multi-device interaction test scenarios, preparation of software and hardware preset environments, and integration of automated testing tools.

[0078] MBT can be applied to embedded systems, transaction processing, communication applications and other fields; at the same time, MBT technology can also be applied to systems that adopt development process models such as waterfall, agile, incremental and V models.

[0079] The MBT testing tool can simplify the construction of test scenarios, monitor the performance indicators of the device during the API testing and long-term stability testing of the scenario model, and can produce text use cases for the model to reduce the workload of testers.

[0080] Embodiment three, in this embodiment, in step S200, controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device includes: monitoring the current test process information of the native interface; determining the test time according to the current test process information; at the test time, controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device.

[0081] For example, if the device is a rotating seat, to test the rotating function of the seat, first monitor the current test process of the rotating seat. For example, if the current test process is the lifting test of the rotating seat, then monitor the lifting test process, and then test the rotating function after the lifting test is completed. This is because rotation and lifting are two independent functions in the actual use of the seat, so these two functions need to be tested separately.

[0082] If the device includes two related functions, namely a first function and a second function, the two functions affect each other, and the first function is currently being tested, the test progress of the first function is detected, and the second function must be started before the test of the first function is completed.

[0083] Embodiment 4. In this embodiment, the test result sent by the device is obtained through the proxy interface in step S300. The test result is the test result of the native interface, including: obtaining the test result sent by the device through the proxy interface and a log formed by the device generating the test result.

[0084] That is, the device not only sends the test results to the framework, but also sends the logs generated by executing the test instructions to the framework, so that the framework can save the test results and logs, and then facilitate the subsequent analysis of the device performance based on the test results and logs. If the test result is abnormal, the cause of the abnormality is analyzed according to the log, so that maintenance personnel can repair the equipment according to the cause of the abnormality.

[0085] Embodiment 5. In this embodiment, when the device is an interactive device, that is, when the interactive device needs to interact with another device for information to realize its function, the step of testing the native interface of the interactive device includes: obtaining a test instruction of the service interface sent by the device through the proxy replacement interface, and creating the supporting service interface according to the test instruction; and returning the supporting service interface to the proxy replacement interface of the device, so that the proxy replacement interface has the function of the service interface of the interactive object; controlling the proxy replacement interface to interact with the native interface to test the interactive function of the device, and controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device.

[0086] like Figure 2 As shown, the framework supports the calling and execution of existing single-device use cases, and also provides additional callable framework support service interfaces for single-device use case execution. The device can automatically test the required support services by calling the framework support service remote interface through a proxy.

[0087] like Figure 2The framework support service interface, server, agent, and framework support service remote interface in the technical route are used to create the proxy replacement interface agent inside the device. After creating the proxy replacement interface agent, start executing Figure 2 The proxy interface agent in the agent, calling the oh native interface for testing, server, returning the test results and logs is used to test the interactive function between the interactive device and the created proxy alternative interface agent.

[0088] That is, first establish a proxy replacement interface inside the device to simulate the interacted device with the proxy replacement interface. That is, register the support service remote interface provided by the framework to the proxy replacement interface so that the registered proxy replacement interface has the function of the support service (that is, the device that needs to interact with the device).

[0089] For example, the oh device being tested is a computer, and the interaction function between the computer and the printer needs to be tested. Now there is only a computer, but no printer. If you need to test the computer's native interface that drives the printer, then you need to use the support remote service interface on the framework to register a proxy replacement interface agent inside the oh device to use the proxy replacement interface agent as the driver interface of the printer. The computer also sends a request to the framework to call the support service (that is, the auxiliary support service required to test the original interface of the computer) interface to support the test. After receiving the above request, the framework sends the corresponding service to the proxy replacement interface agent inside the computer. The above work is completed before the test starts. When the test starts, the tester sends a test request to the proxy interface agent of the controller on the framework to call the computer's native interface to drive the proxy replacement interface agent created inside the computer through the native interface to test whether the computer can drive the printer. After the test is completed, the computer will feedback the test results and logs to the framework.

[0090] Example 6: The framework provides the required test resources for the test, that is, the framework provides the resources required for the test. Taking the smart door lock as an example, the function of the smart door lock to open the smart door lock by identifying fingerprints or faces is tested. In order to test the anti-noise ability of the smart door lock to fingerprints, the fingerprint provided by the framework has noise to test the anti-noise ability of the smart door lock. The methods of adding noise to the fingerprint include:

[0091] 100 fingerprint images were collected, each corresponding to an identity, and 10 seed images were obtained for each main fingerprint through fingerprint simulation, totaling 3000 seed fingerprint images. Then the CycleGAN model was used to convert these seed images into real fingerprint images, and in order to keep consistent with the resolution and aspect ratio of the PolyU dataset images, SRGAN was used to increase the model-converted images (256×256) by 4 times, and the resized images were cropped from the center and adjusted to 504×480 resolution fingerprint images to form the final fingerprint image data. Different types of noise were added to all fingerprint images, including Gaussian noise, Rayleigh noise, gamma noise, exponential distribution noise, uniform distribution noise, and impulse noise.

[0092] In summary, the present invention sets up a proxy interface, which records the correspondence between the test instructions and the native interface, so the native interface of the device can be called through the proxy interface to test the native interface, thereby achieving the technical effect of remotely testing the native interface of the device. Moreover, the test results of the present invention can be saved on the cloud platform through the proxy interface, thereby saving the storage space of the device.

[0093] This embodiment also provides a device interface testing device, such as Figure 4 As shown, the device comprises the following components:

[0094] The instruction receiving module 01 is used to receive remote test instructions through the proxy interface;

[0095] A sending module 02, configured to control the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device;

[0096] The test module 03 is used to obtain the test result sent by the device through the proxy interface, and the test result is the test result of the native interface.

[0097] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 5 As shown. The terminal device includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a device interface testing method is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.

[0098] Those skilled in the art will understand that Figure 5 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0099] In one embodiment, a terminal device is provided. The terminal device includes a memory, a processor, and a device interface test program stored in the memory and executable on the processor. When the processor executes the device interface test program, the following operation instructions are implemented:

[0100] Receive remote test instructions through the proxy interface;

[0101] Controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device;

[0102] The test result sent by the device is obtained through the proxy interface, and the test result is the test result of the native interface.

[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for testing a device interface, characterized in that: include: Receive remote test instructions through the proxy interface; Controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device; The test result sent by the device is obtained through the proxy interface, and the test result is the test result of the native interface.

2. The device interface testing method according to claim 1, characterized in that: The receiving of the remote test instruction through the proxy interface includes: The remote interface of the device is used to register the proxy interface, and the registered proxy interface receives the remote test instruction sent by the remote interface.

3. The device interface testing method according to claim 1, characterized in that: The definition of the proxy interface includes: The proxy interface is defined by defining the corresponding relationship between the remote test instruction and the native interface.

4. The device interface testing method according to claim 1, characterized in that: The step of controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device includes: Monitoring current test process information of the native interface; Determine the test time according to the current test process information; At the test time, the proxy interface is controlled by the test instruction to call the native interface of the device to test the native interface of the device.

5. The device interface testing method according to claim 1, characterized in that: The obtaining, through the proxy interface, the test result sent by the device, comprises: The test result sent by the device and the log formed by the device generating the test result are obtained through the proxy interface.

6. The device interface testing method according to claim 1, characterized in that: When the device is an interactive device, the test instruction is used to control the proxy interface to call the native interface of the device to test the native interface of the device, and the method further includes: Creating a supporting service interface corresponding to an interactive object of the device; and returning the supporting service interface to the proxy replacement interface of the device, so that the proxy replacement interface has the function of the service interface of the interactive object; The proxy replacement interface and the native interface are controlled to interact with each other to test the interactive function of the device.

7. The device interface testing method according to claim 6, characterized in that: The creating a supporting service interface corresponding to the interactive object of the device includes: A test instruction of the service interface sent by the device through the proxy replacement interface is obtained, and the supporting service interface is created according to the test instruction.

8. A device interface testing apparatus, characterized in that: The device comprises the following components: An instruction receiving module, used for receiving remote test instructions through an agent interface; A sending module, used for controlling the proxy interface to call the native interface of the device through the test instruction to test the native interface of the device; The test module is used to obtain the test result sent by the device through the proxy interface, and the test result is the test result of the native interface.

9. A terminal device, characterized in that: The terminal device includes a memory, a processor, and a device interface test program stored in the memory and executable on the processor. When the processor executes the device interface test program, the steps of the device interface test method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a device interface test program, and when the device interface test program is executed by a processor, the steps of the device interface test method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Distributed test method, electronic equipment, test system and storage medium

    CN114860587A

  • Equipment test method and device, test control terminal and storage medium

    CN115643281A

  • Remote testing method, system and equipment and storage medium

    CN116684489A

  • Test method, device and system and computer readable storage medium

    CN117951019A

  • Remote Control Of Mobile Devices To Perform Testing Of Wireless Communications Networks

    US20130267179A1