Electronic equipment, testing method and device thereof and storage medium

Through the testing method of determining, downloading, recording or executing action files on electronic devices, the problems of high testing costs and high risks in the prior art are solved, and low-cost, accurate and comprehensive large-scale electronic device testing is achieved.

CN119988206APending Publication Date: 2025-05-13BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311480786.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing electronic equipment testing methods are costly and have testing risks. Robot testing requires specialized equipment and is costly, while serial port testing is highly invasive and cannot be carried out on ordinary user versions.

Method used

Provides a test method for an electronic device, by determining whether the device stores an action file, downloading, recording or executing an action file to complete the test. This method does not require additional robotic equipment, reduces testing costs and enables black box testing on user versions, reducing the risk of intrusion.

Benefits of technology

It reduces testing costs, expands the testing scope, and can conduct testing before and after the product leaves the factory, improves testing accuracy and comprehensiveness, and does not invade product code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988206A_ABST
    Figure CN119988206A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides electronic equipment, a testing method and device thereof and a storage medium. The test method is applied to the electronic equipment and comprises the steps that whether an action file is stored in the electronic equipment or not is determined, and the action file comprises action information indicating the electronic equipment to execute a to-be-tested action; if the electronic equipment does not comprise the action file, downloading the action file stored in test equipment; if the test equipment does not store the action file, recording the action to be tested to obtain the action file; and executing the action to be tested in the action file to obtain a test result. According to the embodiment of the invention, the electronic equipment is used for executing the existing action file, so that the purpose of automatic testing is achieved, the testing efficiency can be improved, and the risk and the testing cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic devices, and in particular to an electronic device and a testing method, device, and storage medium thereof. Background Art

[0002] In the field of software automation testing technology for electronic products such as smart watches, there have been significant developments and innovations in recent years. With the rapid growth of the smart electronic device market and the continuous increase in functionality, the quality and stability of software have become key issues. In order to improve testing efficiency, ensure software quality, and speed up product launch, automated testing technology has been widely used. In related technologies, a manipulator can be used to simulate user use for testing, or a serial interface can be used to communicate with electronic devices and send specific instructions to perform tests. However, using a manipulator for testing requires a series of test equipment, which is expensive and can only achieve a small range of testing; using a serial port to send instructions for testing is essentially a "white box test" and requires writing a large amount of test code, which is invasive and risky, and usually cannot be tested on ordinary user versions. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an electronic device and a testing method, device, and storage medium thereof, so as to overcome the problems of high testing cost and high testing risk of existing electronic devices.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for testing an electronic device is provided. The method is applied to the electronic device and includes:

[0005] Determining whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0006] If the electronic device does not include the action file, downloading the action file stored in the test device;

[0007] If the test device does not store the action file, recording the action to be tested to obtain the action file;

[0008] Execute the action to be tested in the action file to obtain a test result.

[0009] In some embodiments, recording the action to be tested to obtain the action file includes:

[0010] Receive user operation commands;

[0011] Execute the action to be tested based on the operation command;

[0012] The action information corresponding to the action to be tested is recorded to obtain the action file.

[0013] In some embodiments, the recording of the action information corresponding to the action to be tested to obtain the action file includes:

[0014] Receiving a start recording command sent by the test device;

[0015] Based on the start recording command, recording the action information corresponding to the execution of the action to be tested;

[0016] Receiving a recording end command sent by the test device;

[0017] Based on the end recording command, the recording of the action information is stopped, and the action file is generated.

[0018] In some embodiments, the method further comprises:

[0019] Generate file name information corresponding to the action file, and send the file name information to the test device; wherein the file name information is used by the test device to generate a corresponding test script;

[0020] The executing the to-be-tested action in the action file to obtain a test result includes:

[0021] receiving a test command sent by the test device based on the test script;

[0022] The to-be-tested action in the action file is executed based on the test command to obtain a test result.

[0023] In some embodiments, executing the to-be-tested action in the action file based on the test command includes:

[0024] The test command is verified, and if the verification passes, the to-be-tested action in the action file is executed based on the test command.

[0025] In some embodiments, receiving a user operation command includes:

[0026] Receiving a touch operation command from a user via the touch screen of the electronic device;

[0027] The recording of the action information corresponding to the action to be tested to obtain the action file includes:

[0028] The action file is obtained by recording the touch point information detected by the touch screen when executing the action to be tested.

[0029] In some embodiments, executing the to-be-tested action in the action file to obtain a test result includes:

[0030] Execute the action to be tested in the action file, and obtain the test result through the test device; wherein, during the execution of the action to be tested, the test device records a first execution image of a predetermined step, and compares the first execution image with a second execution image when recording the action information to obtain the test result; the second execution image is obtained by recording the predetermined step through the test device during the recording of the action to be tested.

[0031] In some embodiments, the method further comprises:

[0032] Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device.

[0033] In some embodiments, the method further comprises:

[0034] Defining the data format of the data transmission channel;

[0035] A command format of the command transmission channel is defined.

[0036] In some embodiments, the downloading the action file stored in the test device includes:

[0037] receiving a file download command through the command transmission channel;

[0038] The file download command is verified, and if the verification passes, the action file is downloaded from the test device through the data transmission channel.

[0039] In some embodiments, the method further comprises:

[0040] Receiving a file upload command through the command transmission channel;

[0041] The file upload command is verified, and if the verification passes, the action file is uploaded to the test device through the data transmission channel.

[0042] In some embodiments, the method is applied to the electronic device having a real-time operating system (RTOS).

[0043] According to a second aspect of an embodiment of the present disclosure, a method for testing an electronic device is provided. The method is applied to a testing device and includes:

[0044] Determining whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0045] If the electronic device does not include the action file, transmitting the pre-stored action file to the electronic device;

[0046] If the test device does not store the action file, instructing the electronic device to record the action to be tested to obtain the action file;

[0047] Instruct the electronic device to execute the action to be tested in the action file to obtain a test result.

[0048] In some embodiments, the instructing the electronic device to record the action to be tested includes:

[0049] Sending a start recording command to the electronic device; wherein the electronic device records the action information corresponding to the execution of the action to be tested based on the start recording command;

[0050] Sending an end recording command to the electronic device; wherein the electronic device stops recording the action information and generates the action file based on the end recording command.

[0051] In some embodiments, the method further comprises:

[0052] Receiving file name information corresponding to the action file sent by the electronic device;

[0053] Generate a corresponding test script based on the file name information;

[0054] A test command is sent to the electronic device based on the test script; wherein the electronic device executes the action to be tested in the action file based on the test command to obtain a test result.

[0055] In some embodiments, the method further comprises:

[0056] During the process of the electronic device executing the action to be tested, recording a first execution image of a predetermined step;

[0057] The test result is obtained by comparing the first execution image with the second execution image when the action information is recorded.

[0058] In some embodiments, the method further comprises:

[0059] During the process of the electronic device recording the action to be tested, the second execution image of the predetermined step is recorded.

[0060] In some embodiments, the method further comprises:

[0061] Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device.

[0062] In some embodiments, the method further comprises:

[0063] Defining the data format of the data transmission channel;

[0064] A command format of the command transmission channel is defined.

[0065] In some embodiments, the transmitting the pre-stored action file to the electronic device includes:

[0066] Sending a file download command through the command transmission channel;

[0067] After the electronic device verifies and passes the file download command, the action file is sent to the electronic device through the data transmission channel.

[0068] In some embodiments, the method further comprises:

[0069] Sending a file upload command to the electronic device through the command transmission channel;

[0070] After the electronic device verifies and passes the file upload command, the action file sent by the electronic device is received through the data transmission channel.

[0071] According to a third aspect of an embodiment of the present disclosure, a testing device for an electronic device is provided. The device is applied to the electronic device and includes:

[0072] A first determination module is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0073] A first downloading module, configured to download the action file stored in the test device if the electronic device does not include the action file;

[0074] A recording module, configured to record the action to be tested to obtain the action file if the test device does not store the action file;

[0075] The execution module is configured to execute the action to be tested in the action file to obtain a test result.

[0076] In some embodiments, the recording module includes:

[0077] A first receiving submodule, configured to receive a user operation command;

[0078] A first execution submodule, configured to execute the action to be tested based on the operation command;

[0079] The first recording submodule is configured to record the action information corresponding to the execution of the action to be tested to obtain the action file.

[0080] In some embodiments, the first recording submodule includes:

[0081] A second receiving submodule is configured to receive a start recording command sent by the test device;

[0082] A second recording submodule is configured to record action information corresponding to the execution of the action to be tested based on the start recording command;

[0083] A third receiving submodule is configured to receive a recording end command sent by the test device;

[0084] The generating submodule is configured to stop recording the action information and generate the action file based on the end recording command.

[0085] In some embodiments, the apparatus further comprises:

[0086] A first generating module is configured to generate file name information corresponding to the action file, and send the file name information to the test device; wherein the file name information is used by the test device to generate a corresponding test script;

[0087] The execution module comprises:

[0088] a fourth receiving submodule, configured to receive a test command sent by the test device based on the test script;

[0089] The second execution submodule is configured to execute the to-be-tested action in the action file based on the test command to obtain a test result.

[0090] In some embodiments, the second execution submodule is specifically configured as follows:

[0091] The test command is verified, and if the verification passes, the to-be-tested action in the action file is executed based on the test command.

[0092] In some embodiments, the first receiving submodule is specifically configured as follows:

[0093] Receiving a touch operation command from a user via the touch screen of the electronic device;

[0094] The first recording submodule is specifically configured as follows:

[0095] The action file is obtained by recording the touch point information detected by the touch screen when executing the action to be tested.

[0096] In some embodiments, the execution module is specifically configured as follows:

[0097] Execute the action to be tested in the action file, and obtain the test result through the test device; wherein, during the execution of the action to be tested, the test device records a first execution image of a predetermined step, and compares the first execution image with a second execution image when recording the action information to obtain the test result; the second execution image is obtained by recording the predetermined step through the test device during the recording of the action to be tested.

[0098] In some embodiments, the apparatus further comprises:

[0099] The first definition module is configured to define a data transmission channel and a command transmission channel between the electronic device and the test device based on a protocol; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit commands sent by the test device to the electronic device.

[0100] In some embodiments, the apparatus further comprises:

[0101] A second definition module is configured to define a data format of the data transmission channel;

[0102] The third definition module is configured to define the command format of the command transmission channel.

[0103] In some embodiments, the first download module includes:

[0104] A first receiving module, configured to receive a file download command through the command transmission channel;

[0105] The first verification module is configured to verify the file download command, and if the verification passes, download the action file from the test device through the data transmission channel.

[0106] In some embodiments, the apparatus further comprises:

[0107] A second receiving module is configured to receive a file upload command through the command transmission channel;

[0108] The second verification module is configured to verify the file upload command, and if the verification passes, upload the action file to the test device through the data transmission channel.

[0109] In some embodiments, the apparatus is applied to the electronic device having an RTOS.

[0110] According to a fourth aspect of an embodiment of the present disclosure, a testing device for an electronic device is provided, the device being applied to the testing device, comprising:

[0111] A second determination module is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0112] a transmission module, configured to transmit the pre-stored action file to the electronic device if the electronic device does not include the action file;

[0113] A first instruction module, configured to instruct the electronic device to record the action to be tested to obtain the action file if the test device does not store the action file;

[0114] The second instruction module is configured to instruct the electronic device to execute the action to be tested in the action file to obtain a test result.

[0115] In some embodiments, the first indication module includes:

[0116] A first sending submodule is configured to send a start recording command to the electronic device; wherein the electronic device records the action information corresponding to the execution of the action to be tested based on the start recording command;

[0117] The second sending submodule is configured to send a recording end command to the electronic device; wherein the electronic device stops recording the action information and generates the action file based on the recording end command.

[0118] In some embodiments, the apparatus further comprises:

[0119] A third receiving module is configured to receive file name information corresponding to the action file sent by the electronic device;

[0120] A second generating module is configured to generate a corresponding test script based on the file name information;

[0121] The first sending module is configured to send a test command to the electronic device based on the test script; wherein the electronic device executes the to-be-tested action in the action file based on the test command to obtain a test result.

[0122] In some embodiments, the apparatus further comprises:

[0123] A first recording module, configured to record a first execution image of a predetermined step during the process in which the electronic device executes the action to be tested;

[0124] A comparison module is configured to compare the first execution image with a second execution image when recording the action information to obtain the test result.

[0125] In some embodiments, the apparatus further comprises:

[0126] The second recording module is configured to record the second execution image of a predetermined step during the process of the electronic device recording the action to be tested.

[0127] In some embodiments, the apparatus further comprises:

[0128] The fourth definition module is configured to define a data transmission channel and a command transmission channel between the electronic device and the test device based on a protocol; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit commands sent by the test device to the electronic device.

[0129] In some embodiments, the apparatus further comprises:

[0130] A fifth definition module, configured to define a data format of the data transmission channel;

[0131] The sixth definition module is configured to define the command format of the command transmission channel.

[0132] In some embodiments, the transmission module includes:

[0133] A third sending submodule is configured to send a file download command through the command transmission channel;

[0134] The fourth sending submodule is configured to send the action file to the electronic device through the data transmission channel after the electronic device verifies the file download command.

[0135] In some embodiments, the apparatus further comprises:

[0136] A second sending module is configured to send a file upload command to the electronic device through the command transmission channel;

[0137] The fourth receiving module is configured to receive the action file sent by the electronic device through the data transmission channel after the electronic device verifies the file upload command.

[0138] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing processor executable commands; wherein the processor is configured to: implement the steps in any of the above-mentioned electronic device testing methods when executed.

[0139] According to a sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, which, when commands in the storage medium are executed by a processor of an information processing device, enables the device to execute the steps in any of the above-mentioned electronic device testing methods.

[0140] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0141] The disclosed embodiment provides a method for testing an electronic device, which achieves the purpose of testing by re-executing a recorded action file. Compared with the method of testing using a manipulator in the prior art, this method can effectively reduce costs and is easier to execute. It has a wide range of applicable test targets and can also be applied to large-scale equipment testing. Moreover, compared with the method of testing by sending instructions through a serial port, this method does not need to rely on communication protocols and command sets, and can achieve black box testing of user interfaces, thereby having higher test accuracy and reducing the risk of intrusion.

[0142] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0143] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0144] Figure 1 The process of a method for testing an electronic device according to an exemplary embodiment is shown Figure 1 ;

[0145] Figure 2 The process of a method for testing an electronic device according to an exemplary embodiment is shown Figure 2 ;

[0146] Figure 3 The process of a method for testing an electronic device according to an exemplary embodiment is shown Figure 3 ;

[0147] Figure 4 The structure of the test device of the electronic device according to an exemplary embodiment is shown in FIG. Figure 1 ;

[0148] Figure 5The structure of the test device of the electronic device according to an exemplary embodiment is shown in FIG. Figure 2 ;

[0149] Figure 6 is a system architecture diagram according to an exemplary embodiment;

[0150] Figure 7 is a diagram of an electronic device end test architecture according to an exemplary embodiment;

[0151] Figure 8 is a schematic diagram of Bluetooth transmission between a smart watch and a mobile phone according to an exemplary embodiment;

[0152] Fig. 9 is a flowchart of interaction between a smart watch end and a PC end (or a mobile phone end) according to an exemplary embodiment;

[0153] Fig.10 The process of a method for testing an electronic device according to an exemplary embodiment is shown Figure 4 ;

[0154] Fig.11 The hardware structure frame of a testing device for an electronic device according to an exemplary embodiment is shown. Figure 1 ;

[0155] Fig.12 The hardware structure frame of a testing device for an electronic device according to an exemplary embodiment is shown. Figure 2 . DETAILED DESCRIPTION

[0156] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0157] There are two main ways to automate software testing for electronic devices such as smart watches, smart bracelets, and wireless headphones. One is to use a robot to operate the device to achieve automated testing, and the other is to send specific instructions through the serial port to achieve automated testing.

[0158] The solution of using a manipulator to automate testing is a physical automated testing solution that performs various test tasks by simulating the operation of human hands. This solution usually involves the use of specially designed manipulators or robots to simulate finger movements, such as clicking, sliding, rotating, etc. The manipulator can perform a series of operations according to predetermined test cases, record test results and collect data. The advantage of using a manipulator to operate the device is that it can simulate the operation behavior of real users, conduct a comprehensive test of the functions and interactions of the watch, and check the response and accuracy of various operating elements such as touch screens, buttons, knobs, etc. However, the implementation of this solution requires additional equipment and hardware support, as well as a complex setup and calibration process. This solution is suitable for scenarios where the watch is directly operated for testing, such as: opening the settings interface and setting specific functions, calculating application startup delays, etc.

[0159] Using a robot for automated testing is costly and complex. Robot-related equipment requires additional investment and technical support and is expensive. In addition, this method limits operational simulation. It may not be able to fully simulate the fine movements and touch of a human hand. It lacks interaction between the internal code or underlying functions of electronic devices, which may result in certain specific interaction scenarios or functions not being accurately tested. In addition, the calibration and stability of the robot may also affect the test results. If the robot is not calibrated or calibrated incorrectly or is unstable, the test may be inaccurate or inconsistent.

[0160] Sending commands through the serial port for automated testing involves writing scripts or using a test framework to connect to the electronic device through the serial port and send commands and data for testing. The scheme of sending specific commands through the serial port usually requires understanding the communication protocol and command set of the electronic device in order to accurately send commands and parse the returned data. It can perform various functional and performance tests, such as sending messages, simulating sensor data, reading device status, etc. This scheme is suitable for test scenarios that require direct communication with the watch, such as: stress testing of repeated power on and off, sending and receiving message notifications, etc.

[0161] However, this method lacks user interface testing. The solution mainly focuses on functional and performance testing, and still belongs to the category of code testing code, that is, white box testing. It cannot achieve complete user simulation, and the use of serial ports cannot directly test the usability and interactive experience of the user interface. In addition, this method relies on communication protocols and command sets, and generally requires additional development and debugging work to ensure that instructions are sent and parsed correctly. Writing a large amount of test code within the project is somewhat invasive and risky, and it is usually impossible to test it on ordinary user versions, and it does not have a completely typical meaning. This method is also limited to defined instruction sets and can only execute defined instructions and operations, which may not cover all functions and interactive scenarios of electronic devices, limiting the comprehensiveness of the test.

[0162] The disclosed embodiment provides an automated testing solution for electronic devices, which implements automated testing by reproducing action files of recorded operation actions. The solution does not require additional dedicated testing equipment, and the relevant communication channels can transmit relevant data simulating user operation behaviors, and can also be used as an entry for other debugging or functions. There is no barrier between the underlying codes, which is suitable for user version testing, has typical significance, and is applicable to a wide range of test targets.

[0163] The following is a detailed description of the program:

[0164] Figure 1 is a flow chart of a method for testing an electronic device provided by an embodiment of the present disclosure, the method is applied to the electronic device, such as Figure 1 As shown, the method includes:

[0165] In step 101, it is determined whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0166] In step 102, if the electronic device does not include the action file, downloading the action file stored in the test device;

[0167] In step 103, if the test device does not store the action file, the action to be tested is recorded to obtain the action file;

[0168] In step 104, the action to be tested in the action file is executed to obtain a test result.

[0169] Here, the electronic device may be a terminal device with a human-computer interaction function, such as a mobile phone, a tablet computer, a vehicle-mounted device, and a wearable electronic device such as a smart watch, a smart bracelet, and smart glasses. This article takes a smart watch as an example for explanation.

[0170] Test equipment is an electronic device with file and data processing capabilities, such as mobile phones, computers, laptops, and tablets.

[0171] Testing the above electronic devices may be a test of whether the electronic devices accurately perform various actions to be tested, for example, for electronic devices with touch screens, testing whether various operations based on touch operations are accurate. For another example, for electronic devices with gravity, direction and other sensing functions, testing whether the corresponding operations performed when the direction changes are accurate.

[0172] The above action file contains the action information of the action to be tested required for testing the electronic device, and the electronic device performs the corresponding operation based on the action information. For example, for touch operation, the action information can be the touch position reporting information generated after the touch screen is touched, and for the direction change operation of gravity sensing, the action information can be the rotation angle information of the electronic device based on the coordinate axis, etc.

[0173] The electronic device to be tested may store the above-mentioned action file, and when the test is required, the action to be tested in the action file may be directly executed to complete the test and obtain the test result. If the electronic device does not store the action file, the action file may be downloaded from the test device, and the action to be tested in the downloaded action file may be executed to complete the test and obtain the test result.

[0174] If the test device does not store an action file, the action to be tested can be recorded to obtain an action file. The electronic device can record the corresponding action when the user performs the operation, and generate the above-mentioned action file based on the recorded action. When testing is required, the test can be completed by executing the action file. The electronic device can store the action file for subsequent testing, or upload the action file to the test device. When testing is required, the electronic device can download the action file from the test device before testing.

[0175] In this way, the test of electronic equipment does not require additional testing devices such as manipulators, and the purpose of testing is achieved by reproducing the actions during actual operation. Compared with the testing method using manipulators, this method can reduce the testing cost, expand the testing scope, and can be tested before and after the product leaves the factory. Compared with the testing method of sending instructions through the serial port, the method provided by the embodiment of the present disclosure belongs to black box testing, which is not invasive to the code of the product itself, and the test object can be the user version, which has complete typical significance.

[0176] In some embodiments, Figure 2 As shown, in the above step 103, recording the action to be tested to obtain the action file includes:

[0177] Step 201, receiving a user operation command;

[0178] Step 202, executing the action to be tested based on the operation command;

[0179] Step 203: record the action information corresponding to the action to be tested, and obtain the action file.

[0180] In the embodiment of the present disclosure, during the process of recording the action to be tested, a user operation command may be received, and the electronic device executes corresponding actions based on the user operation command. The actions executed at this time are the actions to be tested.

[0181] In other words, the purpose of recording is to record the actions performed by the electronic device when the user performs some operations. In the subsequent test, these actions are performed based on the recorded action file without user operation. If there is a difference in the results of the two executions, it means that there is an abnormality in the electronic device. If the results of the executions are the same, it means that there is no abnormality in the electronic device.

[0182] In some embodiments, receiving a user operation command includes:

[0183] Receiving a touch operation command from a user via the touch screen of the electronic device;

[0184] The recording of the action information corresponding to the action to be tested to obtain the action file includes:

[0185] The action file is obtained by recording the touch point information detected by the touch screen when executing the action to be tested.

[0186] The above test can be a test related to the touch screen of the electronic device and the response to the operation performed by the touch screen. The electronic device detects the touch operation command of the touch screen, obtains the corresponding touch point information, and records this point information to obtain the corresponding action file. In other words, the action file stores the information detected by the electronic device under the touch operation. Therefore, the response made by the electronic device based on the action file should be the same as the response made based on the touch operation. If they are different, it means that there is an abnormality in the touch operation of the electronic device.

[0187] In some embodiments, the recording of the action information corresponding to the action to be tested to obtain the action file includes:

[0188] Receiving a start recording command sent by the test device;

[0189] Based on the start recording command, recording the action information corresponding to the execution of the action to be tested;

[0190] Receiving a recording end command sent by the test device;

[0191] Based on the end recording command, the recording of the action information is stopped, and the action file is generated.

[0192] In the disclosed embodiment, the operation of the electronic device to perform the recording action file can be performed based on the command of the test device. That is, the test device sends a command to the electronic device to instruct the electronic device to start recording and end recording. During this period, any operation of the electronic device is an action to be tested, which is recorded to generate an action file.

[0193] In some embodiments, the method further comprises:

[0194] Generate file name information corresponding to the action file, and send the file name information to the test device; wherein the file name information is used by the test device to generate a corresponding test script;

[0195] The executing the to-be-tested action in the action file to obtain a test result includes:

[0196] receiving a test command sent by the test device based on the test script;

[0197] The to-be-tested action in the action file is executed based on the test command to obtain a test result.

[0198] After recording the action file, the electronic device can generate a corresponding file name based on the action. Here, different action files have different file names, that is, each action file has a unique file name, so the file name information can be sent to the test device, and the test device generates a corresponding test script based on the file name. Exemplarily, the file name in MD5 format can be obtained by calculating the content of the action file.

[0199] The test script may include instructions for executing the actions in the action file. The test device may initiate a test and notify the electronic device to execute the instructions in the test script, and the electronic device may execute the actions in the action file according to the instructions. It should be noted that when the electronic device executes the action, the electronic device stores the above-mentioned action file, and the test script may only include instructions for executing the action file.

[0200] In some embodiments, executing the to-be-tested action in the action file based on the test command includes:

[0201] The test command is verified, and if the verification passes, the to-be-tested action in the action file is executed based on the test command.

[0202] When an electronic device receives a test command sent by a test device, it can verify the test command. For example, it can verify whether the test device that sends the test command is a specified legal device based on the test command, or verify whether the test command is a legal command for the electronic device. If the verification passes, the action to be tested in the action file is executed to complete the test indicated by the test command. If the verification fails, the relevant test is not executed. In this way, the security of the test can be improved and the test management is convenient.

[0203] In some embodiments, executing the to-be-tested action in the action file to obtain a test result includes:

[0204] Execute the action to be tested in the action file, and obtain the test result through the test device; wherein, during the execution of the action to be tested, the test device records a first execution image of a predetermined step, and compares the first execution image with a second execution image when recording the action information to obtain the test result; the second execution image is obtained by recording the predetermined step through the test device during the recording of the action to be tested.

[0205] Here, since the electronic device often displays the relevant screen on the display screen when performing an action based on the user operation, the result of the action can be recorded by the image when the key action is performed, or the video recording (continuous multiple images) of the entire action process. Accordingly, during the test, the electronic device executes the action to be tested in the action file, which should essentially be the same as the action performed based on the user operation, so the image or video recording when the key action is performed can also be recorded. In this way, by comparing the images corresponding to the same action in these two processes, it is possible to know whether the action performed during the test is consistent with the actual operation, thereby obtaining the test result.

[0206] It should be noted that, here, recording the predetermined image can also be performed by the test device or a third-party device (such as a camera), for example, the test device takes a photo to record the test process. Similarly, during the recording process, the test device also takes a photo to record the recording process.

[0207] In some embodiments, the method further comprises:

[0208] Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device.

[0209] The above-mentioned protocol can be a communication protocol between electronic devices, including: Bluetooth protocol. Exemplarily, the BLE (Bluetooth Low Energy) function possessed by the electronic device and the test device can be used to define the data transmission channel and command transmission channel related to the test involved in the above-mentioned embodiment. For example, using BLE L2CAP COC (BLELogical Link Control and Adaptation Protocol Connection-orientated channel Bluetooth low energy logical link control and adaptation protocol layer connection-oriented channel), the above-mentioned data transmission channel is defined for data transmission. The command transmission channel can be dedicated to command transmission between the test device and the electronic device, including: test command, recording start command, recording end command, upload action file command, download action file command, etc.

[0210] The data transmission channel can be used exclusively for data transmission between the test equipment and the electronic equipment, including: transmission of action files, transmission of relevant images recorded during the test process, etc.

[0211] In some embodiments, the method further comprises:

[0212] Defining the data format of the data transmission channel;

[0213] A command format of the command transmission channel is defined.

[0214] The application layer data packet format of the command transmission channel and the data transmission channel can be defined by the application program of the electronic device automated test. In other embodiments, it can also be defined by the application program of the test device or other device and applied to the automated test of the electronic device. In this way, a communication protocol for the automated test is established between the test device and the electronic device.

[0215] In some embodiments, the downloading the action file stored in the test device includes:

[0216] receiving a file download command through the command transmission channel;

[0217] The file download command is verified, and if the verification passes, the action file is downloaded from the test device through the data transmission channel.

[0218] The test device can transmit a file download command to the electronic device through the command transmission channel based on the Bluetooth protocol, and the electronic device can verify the command to confirm the legitimacy of the command or the legitimacy of the test device sending the command. If the verification is passed, the action file can be downloaded from the test device through the data transmission channel based on the Bluetooth protocol. The test device will receive the verification feedback sent by the electronic device, and then send the action file to the electronic device based on the feedback.

[0219] If the verification fails, the electronic device may send feedback information indicating the verification failure to the test device, and the test device stops sending the action file.

[0220] In some embodiments, the method further comprises:

[0221] Receiving a file upload command through the command transmission channel;

[0222] The file upload command is verified, and if the verification passes, the action file is uploaded to the test device through the data transmission channel.

[0223] When the electronic device saves the action file, or after the electronic device completes recording the action file, if the test device does not save the action file, the electronic device can be instructed to upload the action file. That is, a file upload command is sent to the electronic device through the above command transmission channel. Similar to downloading the action file, the electronic device can also verify the file upload command to verify the legitimacy of the command or the legitimacy of the test device, and then determine whether to upload the action file based on the verification result.

[0224] If the verification passes, the electronic device can feedback verification pass information to the test device, and then upload the action file through the data transmission channel; if the verification fails, the electronic device can feedback verification fail information to the test device and end the upload process.

[0225] In addition, if the electronic device receives a file upload command from the test device, but the electronic device has not recorded the action file and has not saved the action file locally, it can also feedback information that the verification failed and end the upload process.

[0226] In some embodiments, the method is applied to the electronic device having a real-time operating system (RTOS).

[0227] RTOS is an operating system designed specifically for real-time applications. Compared with general-purpose operating systems, RTOS pays more attention to task response time and reliability. It provides functions such as real-time task scheduling, resource management, interrupt processing and communication mechanisms to meet the time constraints of real-time applications.

[0228] RTOS is widely used in various real-time application fields, including industrial automation, medical equipment, aerospace, automotive electronics, smart home and consumer electronics. RTOS can provide reliable and efficient operating system support, enabling real-time applications to meet strict time requirements and have high predictability and stability.

[0229] Exemplarily, the electronic device in the embodiments of the present disclosure may be a smart watch, a smart bracelet, etc. having an RTOS.

[0230] Figure 3 is a flow chart of another electronic device testing method provided by an embodiment of the present disclosure, wherein the method is applied to a testing device, such as Figure 3 As shown, the method includes:

[0231] In step 301, it is determined whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0232] In step 302, if the electronic device does not include the action file, the pre-stored action file is transmitted to the electronic device;

[0233] In step 303, if the test device does not store the action file, instruct the electronic device to record the action to be tested to obtain the action file;

[0234] In step 304, the electronic device is instructed to execute the action to be tested in the action file to obtain a test result.

[0235] Testing the above electronic devices may be a test of whether the electronic devices accurately perform various actions to be tested, for example, for electronic devices with touch screens, testing whether various operations based on touch operations are accurate. For another example, for electronic devices with gravity, direction and other sensing functions, testing whether the corresponding operations performed when the direction changes are accurate.

[0236] The above action file contains the action information of the action to be tested required for testing the electronic device, and the electronic device performs the corresponding operation based on the action information. For example, for touch operation, the action information can be the touch position reporting information generated after the touch screen is touched, and for the direction change operation of gravity sensing, the action information can be the rotation angle information of the electronic device based on the coordinate axis, etc.

[0237] The electronic device to be tested may store the above-mentioned action file. When a test is required, the test device may directly instruct the electronic device to execute the action to be tested in the action file, thereby completing the test and obtaining the test result. If the electronic device does not store the action file, the test device may send the action file to the electronic device, and then instruct the electronic device to execute the action to be tested in the action file, thereby completing the test and obtaining the test result.

[0238] If the test device also does not store the action file, the electronic device can be instructed to record the action to be tested to obtain the action file. The electronic device can record the corresponding action when the user performs the operation, and generate the above-mentioned action file based on the recorded action. When testing is required, the electronic device can be instructed to complete the test by executing the action file. The test device can also instruct the electronic device to store the action file for subsequent testing, or instruct the electronic device to upload the action file to the test device. When testing is required, the test device can send the action file to the electronic device to be tested, and instruct the electronic device to execute the action file for testing.

[0239] In this way, the test of electronic equipment does not require additional testing devices such as manipulators, and the purpose of testing is achieved by reproducing the actions during actual operation. Compared with the testing method using manipulators, this method can reduce the testing cost, expand the testing scope, and can be tested before and after the product leaves the factory. Compared with the testing method of sending instructions through the serial port, the method provided by the embodiment of the present disclosure belongs to black box testing, which is not invasive to the code of the product itself, and the test object can be the user version, which has complete typical significance.

[0240] In some embodiments, the instructing the electronic device to record the action to be tested includes:

[0241] Sending a start recording command to the electronic device; wherein the electronic device records the action information corresponding to the execution of the action to be tested based on the start recording command;

[0242] Sending an end recording command to the electronic device; wherein the electronic device stops recording the action information and generates the action file based on the end recording command.

[0243] The test device in the embodiment of the present disclosure can control the electronic device to record the actions it performs by sending a start recording command and an end recording command. That is, during the period between when the electronic device receives the start recording command and the end recording command, all actions performed by the electronic device are recorded and saved as an action file. When a test is required later, the test can be completed by reproducing the actions in the action file.

[0244] In some embodiments, the method further comprises:

[0245] Receiving file name information corresponding to the action file sent by the electronic device;

[0246] Generate a corresponding test script based on the file name information;

[0247] A test command is sent to the electronic device based on the test script; wherein the electronic device executes the action to be tested in the action file based on the test command to obtain a test result.

[0248] Since each action file has a unique file name, the test device can instruct the electronic device to send the file name information corresponding to the action file, and generate a corresponding test script based on the file name information. The test script at least contains the relevant commands for executing each action in the action file. Therefore, when a test is required, a test command can be sent to the electronic device based on the test script, so that the electronic device can execute the corresponding action to be tested according to the test command, thereby completing the test and obtaining the test result.

[0249] In some embodiments, the method further comprises:

[0250] During the process of the electronic device executing the action to be tested, recording a first execution image of a predetermined step;

[0251] The test result is obtained by comparing the first execution image with the second execution image when the action information is recorded.

[0252] When the electronic device performs the action to be tested, the display screen can display the relevant screen. The test device can obtain the first execution image (image or multiple consecutive images) by taking pictures or other means when the electronic device performs the key action, thereby recording the result of the execution action. The test device can also pre-store the second execution image recorded when recording the action file, which is also the image recorded when the key action is performed. Therefore, by comparing the difference between the two sets of images, it can be determined whether the test passes.

[0253] In some embodiments, the method further comprises:

[0254] During the process of the electronic device recording the action to be tested, the second execution image of the predetermined step is recorded.

[0255] Here, during the process of the electronic device recording the action to be tested, the testing device can obtain the above-mentioned second execution image by taking pictures or the like, and save it for comparison with the first execution image obtained during the test.

[0256] In some embodiments, the method further comprises:

[0257] Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device.

[0258] Exemplarily, the BLE function of the electronic device and the test device can be used to define the data transmission channel and command transmission channel related to the test involved in the above embodiment through the test application of the test device. For example, using BLE L2CAP COC, define the above data transmission channel for data transmission. The command transmission channel can be dedicated to command transmission between the test device and the electronic device, including: test command, recording start command, recording end command, upload action file command, download action file command, etc.

[0259] The data transmission channel can be used exclusively for data transmission between the test equipment and the electronic equipment, including: transmission of action files, transmission of relevant images recorded during the test process, etc.

[0260] In some embodiments, the method further comprises:

[0261] Defining the data format of the data transmission channel;

[0262] A command format of the command transmission channel is defined.

[0263] Here, the test application of the test device can also define the data packet format of the application layer based on the above channel, including the data format and the command format. In this way, a communication protocol for the above automated test is established between the test device and the electronic device.

[0264] In some embodiments, the transmitting the pre-stored action file to the electronic device includes:

[0265] Sending a file download command through the command transmission channel;

[0266] After the electronic device verifies and passes the file download command, the action file is sent to the electronic device through the data transmission channel.

[0267] The test device can transmit a file download command to the electronic device through the command transmission channel based on the Bluetooth protocol, and the electronic device can verify the command to confirm the legitimacy of the command or the legitimacy of the test device sending the command. If the verification is passed, the action file can be downloaded from the test device through the data transmission channel based on the Bluetooth protocol. The test device will receive the verification feedback sent by the electronic device, and then send the action file to the electronic device based on the feedback.

[0268] If the verification fails, the electronic device may send feedback information indicating the verification failure to the test device, and the test device stops sending the action file.

[0269] In some embodiments, the method further comprises:

[0270] Sending a file upload command to the electronic device through the command transmission channel;

[0271] After the electronic device verifies and passes the file upload command, the action file sent by the electronic device is received through the data transmission channel.

[0272] When the electronic device saves the action file, or after the electronic device completes recording the action file, if the test device does not save the action file, the electronic device can be instructed to upload the action file. That is, a file upload command is sent to the electronic device through the above command transmission channel. Similar to downloading the action file, the electronic device can also verify the file upload command to verify the legitimacy of the command or the legitimacy of the test device, and then determine whether to upload the action file based on the verification result.

[0273] If the verification passes, the electronic device can feedback verification pass information to the test device, and then upload the action file through the data transmission channel; if the verification fails, the electronic device can feedback verification fail information to the test device and end the upload process.

[0274] In addition, if the electronic device receives a file upload command from the test device, but the electronic device has not recorded the action file and has not saved the action file locally, it can also feedback information that the verification failed and end the upload process.

[0275] Therefore, when the test device receives the verification failure information, the upload process is stopped and the data of the action file is no longer received.

[0276] Figure 4 A testing device for an electronic device provided in an embodiment of the present disclosure is applied to the electronic device, such as Figure 4 As shown, the device 100 includes:

[0277] A first determination module 110 is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0278] A first downloading module 120, configured to download the action file stored in the test device if the electronic device does not include the action file;

[0279] The recording module 130 is configured to record the action to be tested to obtain the action file if the test device does not store the action file;

[0280] The execution module 140 is configured to execute the to-be-tested action in the action file to obtain a test result.

[0281] In some embodiments, the recording module includes:

[0282] A first receiving submodule, configured to receive a user operation command;

[0283] A first execution submodule, configured to execute the action to be tested based on the operation command;

[0284] The first recording submodule is configured to record the action information corresponding to the execution of the action to be tested to obtain the action file.

[0285] In some embodiments, the first recording submodule includes:

[0286] A second receiving submodule is configured to receive a start recording command sent by the test device;

[0287] A second recording submodule is configured to record action information corresponding to the execution of the action to be tested based on the start recording command;

[0288] A third receiving submodule is configured to receive a recording end command sent by the test device;

[0289] The generating submodule is configured to stop recording the action information and generate the action file based on the end recording command.

[0290] In some embodiments, the apparatus further comprises:

[0291] A first generating module is configured to generate file name information corresponding to the action file, and send the file name information to the test device; wherein the file name information is used by the test device to generate a corresponding test script;

[0292] The execution module comprises:

[0293] a fourth receiving submodule, configured to receive a test command sent by the test device based on the test script;

[0294] The second execution submodule is configured to execute the to-be-tested action in the action file based on the test command to obtain a test result.

[0295] In some embodiments, the second execution submodule is specifically configured as follows:

[0296] The test command is verified, and if the verification passes, the to-be-tested action in the action file is executed based on the test command.

[0297] In some embodiments, the first receiving submodule is specifically configured as follows:

[0298] Receiving a touch operation command from a user via the touch screen of the electronic device;

[0299] The first recording submodule is specifically configured as follows:

[0300] The action file is obtained by recording the touch point information detected by the touch screen when executing the action to be tested.

[0301] In some embodiments, the execution module is specifically configured as follows:

[0302] Execute the action to be tested in the action file, and obtain the test result through the test device; wherein, during the execution of the action to be tested, the test device records a first execution image of a predetermined step, and compares the first execution image with a second execution image when recording the action information to obtain the test result; the second execution image is obtained by recording the predetermined step through the test device during the recording of the action to be tested.

[0303] In some embodiments, the apparatus further comprises:

[0304] The first definition module is configured to define a data transmission channel and a command transmission channel between the electronic device and the test device based on a protocol; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit commands sent by the test device to the electronic device.

[0305] In some embodiments, the apparatus further comprises:

[0306] A second definition module is configured to define a data format of the data transmission channel;

[0307] The third definition module is configured to define the command format of the command transmission channel.

[0308] In some embodiments, the first download module includes:

[0309] A first receiving module, configured to receive a file download command through the command transmission channel;

[0310] The first verification module is configured to verify the file download command, and if the verification passes, download the action file from the test device through the data transmission channel.

[0311] In some embodiments, the apparatus further comprises:

[0312] A second receiving module is configured to receive a file upload command through the command transmission channel;

[0313] The second verification module is configured to verify the file upload command, and if the verification passes, upload the action file to the test device through the data transmission channel.

[0314] In some embodiments, the apparatus is applied to the electronic device having an RTOS.

[0315] Figure 5 An electronic device testing device provided in an embodiment of the present disclosure is applied to a testing device, such as Figure 5 As shown, the device 200 includes:

[0316] A second determination module 210 is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested;

[0317] The transmission module 220 is configured to transmit the pre-stored action file to the electronic device if the electronic device does not include the action file;

[0318] A first instruction module 230 is configured to instruct the electronic device to record the action to be tested to obtain the action file if the test device does not store the action file;

[0319] The second instruction module 240 is configured to instruct the electronic device to execute the action to be tested in the action file to obtain a test result.

[0320] In some embodiments, the first indication module includes:

[0321] A first sending submodule is configured to send a start recording command to the electronic device; wherein the electronic device records the action information corresponding to the execution of the action to be tested based on the start recording command;

[0322] The second sending submodule is configured to send a recording end command to the electronic device; wherein the electronic device stops recording the action information and generates the action file based on the recording end command.

[0323] In some embodiments, the apparatus further comprises:

[0324] A third receiving module is configured to receive file name information corresponding to the action file sent by the electronic device;

[0325] A second generating module is configured to generate a corresponding test script based on the file name information;

[0326] The first sending module is configured to send a test command to the electronic device based on the test script; wherein the electronic device executes the to-be-tested action in the action file based on the test command to obtain a test result.

[0327] In some embodiments, the apparatus further comprises:

[0328] A first recording module, configured to record a first execution image of a predetermined step during the process in which the electronic device executes the action to be tested;

[0329] A comparison module is configured to compare the first execution image with a second execution image when recording the action information to obtain the test result.

[0330] In some embodiments, the apparatus further comprises:

[0331] The second recording module is configured to record the second execution image of a predetermined step during the process of the electronic device recording the action to be tested.

[0332] In some embodiments, the apparatus further comprises:

[0333] The fourth definition module is configured to define a data transmission channel and a command transmission channel between the electronic device and the test device based on a protocol; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit commands sent by the test device to the electronic device.

[0334] In some embodiments, the apparatus further comprises:

[0335] A fifth definition module, configured to define a data format of the data transmission channel;

[0336] The sixth definition module is configured to define the command format of the command transmission channel.

[0337] In some embodiments, the transmission module includes:

[0338] A third sending submodule is configured to send a file download command through the command transmission channel;

[0339] The fourth sending submodule is configured to send the action file to the electronic device through the data transmission channel after the electronic device verifies the file download command.

[0340] In some embodiments, the apparatus further comprises:

[0341] A second sending module is configured to send a file upload command to the electronic device through the command transmission channel;

[0342] The fourth receiving module is configured to receive the action file sent by the electronic device through the data transmission channel after the electronic device verifies the file upload command.

[0343] The present disclosure also provides the following examples:

[0344] The disclosed embodiment provides an automated performance testing method for smart watches based on RTOS. The solution can also be extended to other related testing fields, such as performance testing, power consumption testing, battery life testing, stress testing, and functional testing of other wearable devices such as wristbands and headphones.

[0345] In the field of intelligent software automated testing technology, there has been significant development and innovation in recent years. With the rapid growth of the smart watch market and the continuous increase in functions, the quality and stability of smart watch software have become key issues. In order to improve testing efficiency, ensure software quality, and speed up product launch, automated testing technology is widely used.

[0346] Here are some of the trends and innovations in the field of automated software testing for smartwatches:

[0347] Testing frameworks and tools: Many testing frameworks and tools have emerged specifically for automated testing of smartwatch software. These frameworks and tools provide convenient interfaces and functions for writing and executing test scripts, simulating user interactions, collecting test results, etc. For example, some open source testing frameworks and tools have been widely used.

[0348] Script writing and management: In order to simplify the writing and management of test scripts, some advanced script programming languages ​​and test script management tools have emerged. These tools provide a more flexible and easy-to-maintain way to write test scripts and support the organization, version control, and execution of test cases.

[0349] Automatic script generation: In order to reduce the workload of manually writing test scripts, some technologies for automatically generating test scripts have been introduced. These technologies can automatically generate test scripts based on the specifications of the user interface or application, thereby speeding up the development of test scripts.

[0350] Cross-platform testing: Since smartwatch software involves multiple platforms and operating systems, cross-platform testing becomes particularly important. In order to achieve consistency testing on different platforms, some cross-platform testing frameworks and tools have emerged, allowing developers to run the same test scripts on different platforms.

[0351] User-oriented testing: The user experience of smartwatch software is crucial, so user-oriented testing becomes an important area. By simulating the operations and behaviors of real users, the functions, interfaces, and performance of smartwatch software can be fully tested to ensure user satisfaction and product quality.

[0352] In short, the field of smartwatch software automated testing technology is constantly developing and innovating to meet the growing market demand and improve software quality requirements. By introducing new testing frameworks, tools and methods, we can improve testing efficiency, reduce testing costs, and ensure the stability and user experience of smartwatch software.

[0353] The smartwatch in the embodiment of the present disclosure may be a product based on RTOS. The introduction of RTOS is as follows:

[0354] RTOS is an operating system designed specifically for real-time applications. Compared with general-purpose operating systems, RTOS pays more attention to task response time and reliability. It provides functions such as real-time task scheduling, resource management, interrupt processing and communication mechanisms to meet the time constraints of real-time applications.

[0355] Following are some key features and functions of RTOS:

[0356] Real-time scheduling: RTOS has a real-time task scheduler that can schedule tasks according to priority and time limits. It can ensure that critical tasks are executed within a specific time to meet the task response time requirements of real-time applications.

[0357] Interrupt handling: RTOS can effectively handle interrupts, including interrupt requests from external devices. It provides mechanisms such as interrupt service routines and interrupt vector tables to ensure that interrupt requests can be responded to and processed in a timely manner when an interrupt occurs.

[0358] Task management: RTOS can manage multiple tasks and determine the execution order of tasks through the task scheduler. It provides functions such as task creation, deletion, suspension and resumption, making switching and collaboration between tasks simple and reliable.

[0359] Memory management: RTOS provides a memory management mechanism to allocate and release the memory space required by the task. It can manage dynamically allocated memory to meet the running requirements of the task.

[0360] Communication and synchronization: RTOS provides a variety of communication and synchronization mechanisms for data transmission and coordination between tasks. This includes message queues, semaphores, event flags, and mailboxes, so that tasks can communicate and synchronize with each other reliably.

[0361] Energy saving management: Some RTOS provide energy saving management functions, which can dynamically adjust power consumption according to system needs. This is especially important for some mobile devices and embedded systems, which can extend battery life and improve system efficiency.

[0362] RTOS are widely used in various real-time application fields, including industrial automation, medical equipment, aerospace, automotive electronics, smart home and consumer electronics, etc. They can provide reliable and efficient operating system support, enabling real-time applications to meet strict time requirements with high predictability and stability.

[0363] In the field of performance testing of smart watches, the following two methods are generally used for automated testing:

[0364] First, robot automation solution:

[0365] Using a manipulator to operate the device is a physical automation test solution that performs various test tasks by simulating the operation of a human hand. This solution usually involves the use of a specially designed manipulator or robot to simulate finger movements, such as clicking, sliding, rotating, etc. The manipulator can perform a series of operations according to predetermined test cases, record test results and collect data. The advantage of using a manipulator to operate the device is that it can simulate the operation behavior of real users, conduct a comprehensive test of the functions and interactions of the watch, and check the response and accuracy of various operating elements such as touch screens, buttons, and knobs. However, the implementation of this solution requires additional equipment and hardware support, as well as a complex setup and calibration process. This solution is suitable for scenarios where the watch is directly operated for testing, such as: opening the settings interface and setting specific functions, calculating application startup delays, etc.

[0366] Second, serial port automation solution:

[0367] Another automated testing solution is to communicate with the smartwatch through the serial port and send specific instructions to perform test tasks. This solution involves writing scripts or using a test framework to connect to the smartwatch through the serial port and send commands and data for testing. The solution of sending specific instructions through the serial port usually requires understanding the communication protocol and command set of the watch in order to accurately send instructions and parse the returned data. It can perform various functional and performance tests, such as sending messages, simulating sensor data, reading device status, etc. This solution is suitable for test scenarios that require direct communication with the watch, such as: stress testing of repeated power on and off, sending and receiving message notifications, etc.

[0368] However, the above two solutions have the following disadvantages:

[0369] First, robot automation solution:

[0370] High cost and complexity: The introduction of robotic arms or robots increases the cost and complexity of testing. Purchasing, setting up, and maintaining these devices requires additional investment and technical support. They are usually expensive, and mainstream robotic automation solutions often cost six figures.

[0371] Limited operation simulation: Robotic operation devices may not be able to fully simulate the fine movements and touch of human hands. They lack interaction with the internal code or underlying functions of smart watches, which may result in certain specific interaction scenarios or watch functions not being accurately tested.

[0372] Calibration and stability issues: The calibration and stability of the robotic arm or robot may have an impact on the test results. Improper calibration or unstable robotic arms may lead to inaccuracies and inconsistencies in testing.

[0373] Second, serial port automation solution:

[0374] Lack of user interface testing: The solution of sending commands through the serial port mainly focuses on functional and performance testing, and still belongs to the category of code testing code, that is, white box testing. It is impossible to achieve complete user simulation. Therefore, the serial port cannot directly test the usability and interactive experience of the user interface.

[0375] Dependence on communication protocols and command sets: The solution of sending commands through the serial port requires understanding the communication protocol and command set of the watch, and generally requires additional development and debugging work to ensure that the commands are sent and parsed correctly. Writing a large amount of test code within the project is somewhat invasive and risky, and it is usually impossible to test on the ordinary user version, and it is not completely typical.

[0376] Limited to defined instruction sets: The solution of sending instructions through the serial port can only execute defined instructions and operations, which may not cover all functions and interaction scenarios of the smart watch, limiting the comprehensiveness of the test.

[0377] The following will start from the shortcomings and deficiencies of the two automation solutions of the robot and the serial port, and explain how the embodiments of the present disclosure solve and remedy these shortcomings and deficiencies.

[0378] First, from the perspective of cost and complexity, the embodiments of the present application do not involve any other test equipment or devices other than those required for normal testing, and there is no increase in cost compared to the original manual testing solution; secondly, the embodiments of the present disclosure are intended to be completely connected from the communication protocol level. In addition to simulating user operations, the relevant communication channels can also be used as entrances for debugging or other functions. There is no barrier between the underlying code, and because there is no purely physical operation, there is no need to worry about calibration and stability-related issues; thirdly, the overall test service involved in the present invention only requires TP (Touch The overall test business code is deployed outside the code of the product under test itself, and it can simulate operations such as clicking and sliding in full accordance with user behaviors. It is still a black box test on the final form of the product, rather than a white box test. Finally, the disclosed embodiment has almost no intrusion into the code of the product under test itself. It only requires the product under test to implement the corresponding simulation operation function, and all other business logics will be separated from the code of the product under test, and the test object is the formal user version. Therefore, it has complete typical significance. At the same time, the solution in the disclosed embodiment can perform customized operations and is not limited to executing defined instructions and operations, which greatly improves the scalability and comprehensiveness of the test.

[0379] The embodiments of the present disclosure can be applied to almost all test scenarios of various wearable devices such as smart watches and bracelets, for example: automated test scenarios such as performance testing, power consumption testing, battery life testing, stress testing and functional testing.

[0380] The embodiments of the present disclosure are improved in the following aspects:

[0381] First, the communication protocol between the smart watch and the PC and mobile phone was constructed;

[0382] Second, the smart watch records and reproduces the TP reporting information;

[0383] Third, realize bidirectional binary data transmission on both ends of the test equipment;

[0384] Fourth, verify the content of Huang Fang's communication data transmission.

[0385] The overall architecture of the solution in the disclosed embodiment is as follows Figure 6As shown, it includes PC side, mobile phone APP (application) side, and smart watch side. Among them, the PC side is mainly responsible for the overall deployment of the test business, including connecting BLE devices, sending and receiving commands and files, data verification, etc. The mobile phone APP side includes data transmission at the BLE protocol level and image comparison and verification of test results; smart watch side: realizes data transmission and TP reporting point information response using the BLE protocol. In the data interaction layer, the adb (Android Debug Bridge) data channel is used from the PC side to the mobile phone APP side. Specifically, in addition to the business module, the PC side also includes a control module. In addition, the PC side has more functions and tools for data analysis and various processing, including: Android UI (Android interface) automation module, adb broadcast command module, PO (page object) mode, Appium (an automated testing framework) secondary encapsulation module, initialization driver, device information module, parameterization module, report file parsing module, various tools (tools): File, network, log, email, data, chart, etc., as well as various broadcast and other functional instructions (such as adb, windows, linux, Antroid, etc.).

[0386] In addition to the business module, the mobile APP also includes: file transfer module, status reading and command issuing module, image comparison module, protocol analysis module, scanning, connection establishment, data interaction module, and various tools (tools): IO (input and output), UI (interface), logger (log), Permission (permission), etc., BLE (Bluetooth low energy) module, and image SDK (Software Development Kit) module.

[0387] In addition to the business module, the watch also includes: TP reporting point recording module, command receiving and sending module, file and data transmission module, touch response module, protocol analysis module, broadcast and connection module, touch module (Touch) and Bluetooth module (Bluetooth).

[0388] The test architecture of the smart watch is as follows: Figure 7As shown, the test APP on the test watch can record the information of the operation action, start and end the recording based on the touch drive, obtain the TP reporting information, and save the action information of each recording as a file so that the recorded operation action can be repeated later. The smart watch can realize BLE communication through inter-process communication, including "kvdb", "mq" and "socket", so as to communicate data and commands with the mobile phone or PC.

[0389] The format of the recorded information on the smartwatch is as follows:

[0390] 1. Single point format

[0391]

[0392] 2. File Format

[0393] In the file that saves the recorded operation actions, each line represents a complete action, such as: single-click operation, double-click operation, sliding operation, etc.

[0394] / / Each line represents a complete operation

[0395] pointdown,point2,point3,point4,....,pointup

[0396] pointdown,point2,point3,....,pointup

[0397] pointdown,point2,point3,....,pointup

[0398] …

[0399] 3. Interactive commands

[0400] Start recording:

[0401] When the PC or mobile app sends a command to start recording to the smart watch, you can operate the smart watch and record a series of operation actions until the smart watch receives a command to end recording.

[0402]

[0403] End recording:

[0404] When the PC or mobile phone APP sends a command to end recording to the smart watch, the smart watch will stop recording and save all the operations recorded before into a file, and rename the file according to the content of the file. The smart watch receives a start recording command and an end recording command once for a valid recording, and then can send the recorded action file to the host computer via BLE.

[0405]

[0406] File upload:

[0407] Through the file upload command, you can transfer the saved files on the smart watch to the PC or mobile phone APP. Because each action file has a unique file name, you only need to specify the file name of the specific file you want in the command.

[0408]

[0409]

[0410] File Downloads:

[0411] Through the file download command, you can transfer the saved files on the PC or mobile phone APP to the smart watch. Similar to file upload, you only need to specify the file name of the required specific file in the command. After the download is complete, you also need to send a download completion command to end the entire download process.

[0412]

[0413]

[0414] Action Execution:

[0415] When the smart watch has saved the action file to be executed, you can send action execution-related commands to the smart watch through the PC or mobile phone APP. If the verification passes, the smart watch will execute the action in this file.

[0416]

[0417]

[0418] Other commands:

[0419] Custom additions can be made according to specific application scenarios.

[0420] like Figure 8 As shown, it is an implementation scheme of Bluetooth transmission between a smart watch and a mobile phone in an embodiment of the present disclosure.

[0421] Bluetooth transmission mainly realizes point-to-point data interaction between smart watches and mobile phones. The transmission protocol reuses the subpacketization protocol of the SAR layer. The present invention newly adds two channels to realize the automatic test function. During the test, the BLE L2CAPCoC channel is used for data transmission. By default, both channels are not authenticated and can communicate normally. The application layer data packet format, that is, the data format of the command (CMD) channel and the data (DATA) channel is defined by the dual-end automatic test APP.

[0422] Fig. 9 The interactive flow chart of the smart watch and PC (or mobile phone) is shown, where CP and AP are the two cores of the smart watch chip. CP is the Bluetooth core, and AP is the processing core connected to the touch screen. CP acts as a channel to convey commands from the PC to AP, and AP is responsible for recording and executing actions.

[0423] like Fig.10 Shown is a complete flow chart of the testing process:

[0424] First, the test manager proposes the test requirements and starts preparing for the test;

[0425] Step 1: The test app on the PC or mobile phone notifies the smart watch through the BLE protocol to start recording the device's TP reporting information;

[0426] Step 2: Manually operate the smartwatch and complete the recording of the TP reporting information of the test action, and take photos of the pages of the key steps through a third-party camera;

[0427] Step 3: The test app on the PC or mobile phone notifies the smart watch to stop recording TP reporting information through the BLE protocol. The smart watch saves the recorded actions locally and sends the calculated MD5 file name to the PC or mobile phone through the BLE protocol.

[0428] Step 4: The PC or mobile phone will save the received file name information and generate a corresponding test script based on the information;

[0429] Step 5: The test app on the PC or mobile phone sends a command to perform a specific action through the BLE protocol. The smart watch will respond to this command and then start to reproduce the action TP reporting information saved in this action file.

[0430] Step 6: When the smartwatch responds to the specified TP reporting event, take a photo of the execution result of the key step of the test through a third-party camera, and compare it with the image pre-captured and saved in step 2 to finally determine whether the test passes. The test result is generated into a test report and sent to the person who proposed the requirement, forming a closed loop.

[0431] Compared with the robot automation solution, the above solution of the embodiment of the present disclosure has the following beneficial effects:

[0432] Reduced cost and complexity: Compared with the introduction of expensive robotic arms or robots, this solution does not require additional test equipment or devices, thus reducing cost and complexity.

[0433] More accurate operation simulation: This solution implements watch operation through software simulation, which can more accurately simulate the operation of the device by human hands, solving the problem that the robot-operated device cannot accurately test specific interaction scenarios or watch functions.

[0434] No calibration and stability issues: Since the present invention does not rely on a mechanical arm or robot, there are no calibration and stability issues, which improves the accuracy and consistency of the test results.

[0435] Compared with the serial port automation solution, the above solution of the embodiment of the present disclosure has the following advantages:

[0436] Support user interface testing: This solution can simulate user operations, directly test the user interface of the watch, and evaluate its usability and interactive experience, making up for the defect that the serial port solution cannot test the user interface.

[0437] No need to understand the communication protocol and command set: The test solution of this solution does not require in-depth understanding of the communication protocol and command set of the watch. It only needs to use the encapsulated command set, which simplifies the development and testing work, reduces complexity and intrusiveness, and improves maintainability.

[0438] More comprehensive test coverage: Compared with the solution of sending commands through the serial port, this solution provides more extensive test coverage, can simulate various user operations and interaction scenarios, and increase the comprehensiveness and scalability of the test.

[0439] In summary, the embodiments of the present disclosure solve the deficiencies of the robot automation solution and the serial port automation solution, and have the beneficial effects of reducing cost and complexity, more accurate operation simulation, no need for calibration and stability issues, support for user interface testing, no need to understand communication protocols and command sets, and more comprehensive test coverage. These advantages make the present invention a more effective, reliable and comprehensive RTOS-based watch automation testing method and system.

[0440] Fig.11 1 is a block diagram of a testing device 900 for an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a mobile computer, etc.

[0441] Reference Fig.11, the device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .

[0442] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute commands to complete all or part of the steps of the above-mentioned method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0443] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include commands for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0444] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0445] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0446] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0447] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0448] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0449] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0450] In an exemplary embodiment, the apparatus 900 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0451] In an exemplary embodiment, an electronic device is also provided, which is a terminal, and the terminal may include the modules or components in the above-mentioned information processing device, and the terminal also includes a first security chip, and the terminal may also include a second security chip. Exemplarily, the terminal may be a smart phone, a tablet computer, a computer, a smart wearable device, and a vehicle-mounted device.

[0452] In an exemplary embodiment, a non-transitory computer-readable storage medium including commands is also provided, such as a memory 904 including commands, which can be executed by a processor 920 of the device 900 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0453] A non-transitory computer-readable storage medium, when commands in the storage medium are executed by a processor of an information processing device, enables the information processing device to execute any of the methods in the above embodiments.

[0454] Fig.12 1900 is a hardware structure block diagram of a testing device for an electronic device according to an exemplary embodiment. For example, the device 1900 may be provided as a server. Fig.12 , the device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing commands that can be executed by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of commands. In addition, the processing component 1922 is configured to execute commands to perform any of the methods in the above embodiments.

[0455] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output (I / O) interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0456] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present disclosure. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present disclosure, the size of the serial number of the above-mentioned processes does not mean 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 the embodiments of the present disclosure. The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages and disadvantages of the embodiments.

[0457] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0458] In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0459] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0460] In addition, all functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0461] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0462] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for testing an electronic device, characterized in that: The method is applied to the electronic device, comprising: Determining whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested; If the electronic device does not include the action file, downloading the action file stored in the test device; If the test device does not store the action file, recording the action to be tested to obtain the action file; Execute the action to be tested in the action file to obtain a test result.

2. The method according to claim 1, characterized in that The step of recording the action to be tested and obtaining the action file comprises: Receiving a start recording command sent by the test device; Receive user operation commands; Execute the action to be tested based on the operation command; Based on the start recording command, recording the action information corresponding to the execution of the action to be tested; Receiving a recording end command sent by the test device; Based on the end recording command, the recording of the action information is stopped, and the action file is generated.

3. The method according to claim 2, characterized in that The method further comprises: Generate file name information corresponding to the action file, and send the file name information to the test device; wherein the file name information is used by the test device to generate a corresponding test script; The executing the to-be-tested action in the action file to obtain a test result includes: receiving a test command sent by the test device based on the test script; The test command is verified, and if the verification passes, the to-be-tested action in the action file is executed based on the test command to obtain a test result.

4. The method according to claim 2, characterized in that: The receiving of the user operation command comprises: Receiving a touch operation command from a user via the touch screen of the electronic device; The recording of the action information corresponding to the action to be tested to obtain the action file includes: The action file is obtained by recording the touch point information detected by the touch screen when executing the action to be tested.

5. The method according to claim 1, characterized in that The executing the to-be-tested action in the action file to obtain a test result includes: Execute the action to be tested in the action file, and obtain the test result through the test device; wherein, during the execution of the action to be tested, the test device records a first execution image of a predetermined step, and compares the first execution image with a second execution image when recording the action information to obtain the test result; the second execution image is obtained by recording the predetermined step through the test device during the recording of the action to be tested.

6. The method according to claim 1, characterized in that The method further comprises: Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device; A data format of the data transmission channel and a command format of the command transmission channel are defined.

7. A method for testing an electronic device, characterized in that: The method is applied to a test device, comprising: Determining whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested; If the electronic device does not include the action file, transmitting the pre-stored action file to the electronic device; If the test device does not store the action file, instructing the electronic device to record the action to be tested to obtain the action file; Instruct the electronic device to execute the action to be tested in the action file to obtain a test result.

8. The method according to claim 7, characterized in that The instructing the electronic device to record the action to be tested includes: Sending a start recording command to the electronic device; wherein the electronic device records the action information corresponding to the execution of the action to be tested based on the start recording command; Sending an end recording command to the electronic device; wherein the electronic device stops recording the action information and generates the action file based on the end recording command.

9. The method according to claim 8, characterized in that The method further comprises: Receiving file name information corresponding to the action file sent by the electronic device; Generate a corresponding test script based on the file name information; A test command is sent to the electronic device based on the test script; wherein the electronic device executes the action to be tested in the action file based on the test command to obtain a test result.

10. The method according to claim 7, characterized in that The method further comprises: During the process of the electronic device executing the action to be tested, recording a first execution image of a predetermined step; Comparing the first execution image with the second execution image when recording the action information to obtain the test result; During the process of the electronic device recording the action to be tested, the second execution image of the predetermined step is recorded.

11. The method according to claim 7, characterized in that The method further comprises: Based on the protocol, a data transmission channel and a command transmission channel are defined between the electronic device and the test device; wherein the data transmission channel is used to transmit the action file; and the command transmission channel is used to transmit the command sent by the test device to the electronic device; A data format of the data transmission channel and a command format of the command transmission channel are defined.

12. A testing device for electronic equipment, characterized in that: The device is applied to the electronic device, comprising: A first determination module is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested; A first downloading module, configured to download the action file stored in the test device if the electronic device does not include the action file; A recording module, configured to record the action to be tested to obtain the action file if the test device does not store the action file; The execution module is configured to execute the action to be tested in the action file to obtain a test result.

13. A testing device for electronic equipment, characterized in that: The device is applied to a test device, comprising: A second determination module is configured to determine whether the electronic device stores an action file, wherein the action file includes action information instructing the electronic device to perform an action to be tested; a transmission module, configured to transmit the pre-stored action file to the electronic device if the electronic device does not include the action file; A first instruction module, configured to instruct the electronic device to record the action to be tested to obtain the action file if the test device does not store the action file; The second instruction module is configured to instruct the electronic device to execute the action to be tested in the action file to obtain a test result.

14. An electronic device, characterized in that: include: processor; A memory for storing processor executable commands; wherein the processor is configured to: implement the steps in the test method of any one of claims 1 to 6 or 7 to 11 when executed.

15. A non-transitory computer-readable storage medium, when the commands in the storage medium are executed by a processor of an information processing device, the device is enabled to execute the steps in the electronic device testing method of any one of claims 1 to 6 or 7 to 11.