CN114490228A - Bluetooth automatic test method and related device - Google Patents

Bluetooth automatic test method and related device Download PDF

Info

Publication number
CN114490228A
CN114490228A CN202110826439.XA CN202110826439A CN114490228A CN 114490228 A CN114490228 A CN 114490228A CN 202110826439 A CN202110826439 A CN 202110826439A CN 114490228 A CN114490228 A CN 114490228A
Authority
CN
China
Prior art keywords
electronic device
electronic equipment
bluetooth
application program
electronic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110826439.XA
Other languages
Chinese (zh)
Other versions
CN114490228B (en
Inventor
付雷
李文姣
林士博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110826439.XA priority Critical patent/CN114490228B/en
Publication of CN114490228A publication Critical patent/CN114490228A/en
Application granted granted Critical
Publication of CN114490228B publication Critical patent/CN114490228B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/263Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Abstract

The application provides a Bluetooth automatic test method and a related device. The method can comprise the following steps: the first electronic device can control an application program on the second electronic device or the third electronic device through the automatic script, and then control the Bluetooth function of the fourth electronic device through the application program, so that the Bluetooth test of the fourth electronic device is realized. In addition, the first electronic device can also judge the bluetooth connection state between the fourth electronic device and the third electronic device through the prompt tone of the fourth electronic device. According to the method, a large amount of money cost and human resources are not required to be consumed, the efficiency of the Bluetooth automatic test is improved, and the accuracy of the Bluetooth test is also improved.

Description

Bluetooth automatic test method and related device
Technical Field
The present application relates to the field of bluetooth testing, and in particular, to an automatic bluetooth testing method and related apparatus.
Background
When performing bluetooth tests, it is generally necessary to consume a lot of manpower. In order to reduce labor costs, device manufacturers are beginning to seek out bluetooth automated testing solutions. Devices such as cell phones, tablet computers, etc. have operating systems (e.g., android systems, etc.), and may implement automation control through some interfaces. Therefore, the Bluetooth automatic test scheme for the devices such as the mobile phone and the tablet personal computer is mature.
However, since devices such as bluetooth headsets and bluetooth speakers do not have an operating system and no interface capable of realizing automatic control, it is impossible to adopt a bluetooth automatic test scheme suitable for devices such as mobile phones and tablets for devices such as bluetooth headsets and bluetooth speakers. Generally, the bluetooth automatic test scheme for devices such as bluetooth headsets, bluetooth speakers, etc. is mainly implemented by hardware. For example, the equipment is disassembled and the control unit or pins of the equipment are soldered to the automated control cables. For another example, bluetooth automated testing is achieved through robotic control. It can be appreciated that the above-described bluetooth automated testing scheme not only requires a significant expenditure of money and time costs, but is also inefficient.
Therefore, how to improve the efficiency of the bluetooth automation test while reducing the cost of the bluetooth automation test is an urgent problem to be solved at present.
Disclosure of Invention
The application provides a Bluetooth automatic test method and a related device, which can control an application program on second electronic equipment or third electronic equipment through an automatic script, and further control the Bluetooth function of fourth electronic equipment through the application program, so that the Bluetooth test of the fourth electronic equipment is realized. Need not to consume a large amount of money costs and manpower resources, improved the efficiency of the automatic test of bluetooth. In addition, the Bluetooth connection state between the fourth electronic device and the third electronic device can be judged through the prompt tone of the fourth electronic device, and the accuracy of Bluetooth test is improved.
In a first aspect, the present application provides a bluetooth automated testing method. The method may be applied to a first electronic device. The method can comprise the following steps: the first electronic device may select an automation script associated with the fourth electronic device based on the identification information; the first electronic device may also control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script. It is understood that the identification information is used to identify the fourth electronic device. The automation script is used for testing the Bluetooth function between the fourth electronic device and the third electronic device. The fourth electronic device and the third electronic device are connected through Bluetooth.
In the scheme provided by the application, the first electronic device can control the bluetooth function between the fourth electronic device (bluetooth device) and the third electronic device through the automation script. For example, the first electronic device may disconnect or connect bluetooth between the fourth electronic device and the third electronic device via the automation script. As another example, the first electronic device may implement switching to the next song through an automation script. It is understood that the music software on the third electronic device switches to the next music track, and the fourth electronic device correspondingly switches to the next music track. It can be understood that the method can complete the Bluetooth test of the fourth electronic device without disassembling the fourth electronic device and adding a mechanical arm, thereby saving money cost and labor cost and improving the efficiency of the Bluetooth automatic test.
With reference to the first aspect, in a possible implementation manner of the first aspect, the application program X is installed on the second electronic device. The application program X is used to control the bluetooth function of the fourth electronic device. Before the first electronic device selects the automation script according to the identification information, the method may further include: the first electronic equipment can receive first information of the application program X sent by the second electronic equipment; the first electronic device may further acquire a control flow based on the first information; the first electronic device may also generate an automation script associated with the fourth electronic device according to the control flow. It can be appreciated that the first information is used to identify application X and a control of application X. The control flow is for controlling the application program X.
In the solution provided by the application, the first electronic device may obtain, by the second electronic device, the package name, the control information, and other relevant information (first information) of the application program X, and obtain the control flow according to the information. It is understood that the control flow may be code written by the tester based on the first information. The control flow may control application X. For example, the control flow may control a control in application program X, so that application program X displays a new interface. The first electronic device may also generate an automation script associated with the fourth electronic device according to the control flow. That is to say, the first electronic device may control the application program X through an automation script generated based on the control flow, so as to control the bluetooth function of the fourth electronic device, and complete the bluetooth test of the fourth electronic device. As can be understood, the method does not need to consume a large amount of money cost and labor cost, and the efficiency of the Bluetooth automatic test is improved.
With reference to the first aspect, in a possible implementation manner of the first aspect, the third electronic device is installed with an application program X. The application program X is used to control the bluetooth function of the fourth electronic device. Before the first electronic device selects the automation script according to the identification information, the method may further include: the first electronic equipment can receive first information of the application program X sent by the third electronic equipment; the first electronic device may acquire a control flow based on the first information; the first electronic device may generate an automation script associated with the fourth electronic device according to the control flow. It can be appreciated that the first information is used to identify application X and a control of application X. The control flow is for controlling the application program X.
In the solution provided by the application, the first electronic device may obtain, by the third electronic device, the package name, the control information, and other relevant information (first information) of the application program X, and obtain the control flow according to the information. It is understood that the control flow may be code written by the tester based on the first information. The control flow may control application X. For example, the control flow may control a control in application program X, so that application program X displays a new interface. The first electronic device may also generate an automation script associated with the fourth electronic device according to the control flow. That is to say, the first electronic device may control the application program X through an automation script generated based on the control flow, so as to control the bluetooth function of the fourth electronic device, and complete the bluetooth test of the fourth electronic device. As can be understood, the method does not need to consume a large amount of money cost and labor cost, and the efficiency of the Bluetooth automatic test is improved.
With reference to the first aspect, in a possible implementation manner of the first aspect, the application program X is installed on the second electronic device. The first electronic device controls a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, and may specifically include: the first electronic device may send the first instruction to the second electronic device according to the automation script. The first instruction is used for controlling an application program X in the second electronic equipment to send a second instruction to the fourth electronic equipment. The second instruction is used for controlling the Bluetooth function between the fourth electronic equipment and the third electronic equipment.
In the scheme provided by the application, the first electronic device can control the application program X on the second electronic device through the automation script, and then control the Bluetooth function of the fourth electronic device. Specifically, the first electronic device may send the first instruction to the second electronic device according to the automation script. The first instructions may be for controlling an application program X in the second electronic device. The application program X sends a second instruction to the fourth electronic device. The second instructions may be for controlling bluetooth functionality between the fourth electronic device and the third electronic device. It can be understood that the first electronic device can complete the Bluetooth test of the fourth electronic device by running the automatic script, so that a large amount of money cost and labor cost are saved, and the efficiency of the Bluetooth test is improved.
In some embodiments of the present application, the first electronic device may generate an automation script based on the application program X on the second electronic device, and control the application program X on the second electronic device by running the automation script, thereby completing the bluetooth automation test for the fourth electronic device.
In some embodiments of the present application, the first electronic device may generate an automation script based on the application program X on the third electronic device, and control the application program X on the second electronic device by running the automation script, thereby completing the bluetooth automation test on the fourth electronic device.
With reference to the first aspect, in a possible implementation manner of the first aspect, the third electronic device is installed with an application program X. The first electronic device controls a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, and may specifically include: and the first electronic equipment sends a third instruction to the third electronic equipment according to the automation script. The third instruction is used for controlling the application program X in the third electronic device to send the second instruction to the fourth electronic device. The second instruction is used for controlling the Bluetooth function between the fourth electronic equipment and the third electronic equipment.
In the scheme provided by the application, the first electronic device can control the application program X on the third electronic device through the automatic script, and further control the Bluetooth function of the fourth electronic device. In particular, the first electronic device may send the third instruction to the third electronic device according to the automation script. The third instructions may be for controlling an application program X in the third electronic device. The application program X sends a second instruction to the fourth electronic device. The second instructions may be for controlling bluetooth functionality between the fourth electronic device and the third electronic device. It can be understood that the first electronic device can complete the Bluetooth test of the fourth electronic device by running the automatic script, so that a large amount of money cost and labor cost are saved, and the efficiency of the Bluetooth test is improved.
In some embodiments of the present application, the first electronic device may generate an automation script based on the application program X on the second electronic device, and control the application program X on the third electronic device by running the automation script, thereby completing the bluetooth automation test on the fourth electronic device.
In some embodiments of the present application, the first electronic device may generate an automation script based on the application program X on the third electronic device, and control the application program X on the third electronic device by running the automation script, thereby completing the bluetooth automation test on the fourth electronic device.
With reference to the first aspect, in a possible implementation manner of the first aspect, the method may further include: the first electronic equipment can receive the prompt tone sent by the fourth electronic equipment; the first electronic device can also compare the prompt tone sent by the fourth electronic device with the prompt tone in the prompt tone set S stored in the fourth electronic device, and determine the bluetooth connection state M. The alert tone set S includes alert tones of the fourth electronic device in different connection states. A communication connection exists between the first electronic device and the fourth electronic device.
In the solution provided by the present application, the first electronic device may determine a bluetooth connection state between the fourth electronic device and the third electronic device based on an alert tone of the fourth electronic device. Specifically, the first electronic device may compare the received alert tone sent by the fourth electronic device with the alert tone in the alert tone set S stored in advance, find the alert tone consistent with the alert tone sent by the fourth electronic device in the alert tone set S, and determine the bluetooth connection state M according to the bluetooth connection state corresponding to the alert tone. The Bluetooth connection state between the third electronic equipment and the fourth electronic equipment is not determined directly by checking the Bluetooth connection state of the third electronic equipment, so that the probability of misjudgment is reduced. The accuracy of bluetooth connection state detection has been improved promptly.
With reference to the first aspect, in a possible implementation manner of the first aspect, before the first electronic device receives the alert tone sent by the fourth electronic device, the method may further include: the first electronic equipment receives and stores a prompt tone set S recorded by a tester.
In the scheme provided by the application, a tester can record prompt tones of fourth electronic equipment with different models in different connection states and send the prompt tones to the first electronic equipment. The first electronic device may receive and store these alert tones for later bluetooth status detection during a bluetooth automation test.
With reference to the first aspect, in a possible implementation manner of the first aspect, the method may further include: the first electronic device can determine the Bluetooth connection state N through the third electronic device; the first electronic device can determine the bluetooth connection state between the fourth electronic device and the third electronic device according to the bluetooth connection state M and the bluetooth connection state N.
In the solution provided in the application, the first electronic device may further determine, through the third electronic device, a bluetooth connection state N, which is a bluetooth connection state between the fourth electronic device and the third electronic device, and finally determine, according to the bluetooth connection state N and the bluetooth connection state M, the bluetooth connection state between the fourth electronic device and the third electronic device. The method combines various detection modes to judge the Bluetooth connection state, and improves the accuracy of the Bluetooth connection state detection.
With reference to the first aspect, in a possible implementation manner of the first aspect, the method may include: if the Bluetooth connection state indicated by the instruction in the automation script is inconsistent with the Bluetooth connection state between the fourth electronic device and the third electronic device, the first electronic device judges that the Bluetooth connection is abnormal. The first electronic equipment can remind a tester of abnormal Bluetooth connection through controlling sound and/or light.
In the scheme provided by the application, the first electronic device may determine whether the bluetooth connection between the fourth electronic device and the third electronic device is abnormal. If judge unusually, then can remind the tester through control sound or light, the tester of being convenient for in time takes notes and adjusts, can improve the accuracy of the automatic test of bluetooth.
In a second aspect, the present application provides an automated bluetooth test system, which may include: a first electronic device, a third electronic device, and a fourth electronic device. The first electronic device may be configured to select an automation script associated with the fourth electronic device according to the identification information. The first electronic device can also be used for controlling the Bluetooth function between the fourth electronic device and the third electronic device according to the automation script. It is understood that the identification information is used to identify the fourth electronic device. The automation script is used for testing the Bluetooth function between the fourth electronic device and the third electronic device. And the third electronic equipment can be used for establishing Bluetooth connection with the fourth electronic equipment. And the fourth electronic equipment is used for establishing Bluetooth connection with the third electronic equipment.
With reference to the second aspect, in a possible implementation manner of the second aspect, the system may further include a second electronic device. The second electronic device is installed with an application program X. The application program X may be used to control the bluetooth function of the fourth electronic device. The first electronic device, prior to being configured to select the automation script based on the identification information, may be further configured to: receiving first information of an application program X sent by second electronic equipment; acquiring a control flow based on the first information; and generating an automation script associated with the fourth electronic device according to the control flow. It can be appreciated that the first information is used to identify application X and a control of application X. The control flow is for controlling the application program X.
With reference to the second aspect, in a possible implementation manner of the second aspect, the third electronic device is installed with an application program X. The application program X may be used to control the bluetooth function of the fourth electronic device. The first electronic device, prior to being configured to select the automation script based on the identification information, may be further configured to: receiving first information of an application program X sent by third electronic equipment; acquiring a control flow based on the first information; and generating an automation script associated with the fourth electronic device according to the control flow. It can be appreciated that the first information is used to identify application X and a control of application X. The control flow is for controlling the application program X.
With reference to the second aspect, in a possible implementation manner of the second aspect, the first electronic device, when configured to control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, may specifically be configured to: and sending a first instruction to the second electronic equipment according to the automation script. The first instruction may be used to control an application X in the second electronic device to send the second instruction to the fourth electronic device. The second instruction is used for controlling the Bluetooth function between the fourth electronic equipment and the third electronic equipment.
With reference to the second aspect, in a possible implementation manner of the second aspect, the system further includes a second electronic device. The second electronic device is installed with an application program X. The first electronic device, when being configured to control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, may specifically be configured to: and sending a first instruction to the second electronic equipment according to the automation script. The first instruction may be used to control an application X in the second electronic device to send the second instruction to the fourth electronic device. The second instruction is used for controlling the Bluetooth function between the fourth electronic equipment and the third electronic equipment.
With reference to the second aspect, in a possible implementation manner of the second aspect, the third electronic device is installed with an application program X. The first electronic device, when being configured to control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, may specifically be configured to: and sending a third instruction to the third electronic equipment according to the automation script. The third instruction is used for controlling the application program X in the third electronic device to send the second instruction to the fourth electronic device. The second instruction is used for controlling the Bluetooth function between the fourth electronic equipment and the third electronic equipment.
With reference to the second aspect, in a possible implementation manner of the second aspect, the fourth electronic device may further be configured to: and sending a prompt tone to the first electronic equipment. A communication connection exists between the first electronic device and the fourth electronic device. The first electronic device may be further to: receiving a prompt tone sent by fourth electronic equipment; and comparing the prompt tone sent by the fourth electronic equipment with the prompt tone in the prompt tone set S to determine the Bluetooth connection state M. The alert tone set S includes alert tones of the fourth electronic device in different connection states.
With reference to the second aspect, in a possible implementation manner of the second aspect, before the first electronic device is configured to receive the alert tone sent by the fourth electronic device, the first electronic device may further be configured to: and receiving and storing a prompt tone set S recorded by the tester.
With reference to the second aspect, in a possible implementation manner of the second aspect, the first electronic device may further be configured to: determining a Bluetooth connection state N through the third electronic device; and determining the Bluetooth connection state between the fourth electronic equipment and the third electronic equipment according to the Bluetooth connection state M and the Bluetooth connection state N.
With reference to the second aspect, in a possible implementation manner of the second aspect, the first electronic device may further be configured to: if the Bluetooth connection state indicated by the instruction in the automatic script is inconsistent with the Bluetooth connection state between the fourth electronic device and the third electronic device, judging that the Bluetooth connection is abnormal, and reminding a tester of the Bluetooth connection abnormality by controlling sound and/or light.
In a third aspect, the present application provides an electronic device. The electronic device may include: memory, one or more processors. The memory is coupled to the one or more processors. The memory is for storing computer program code. The computer program code includes computer instructions. The one or more processors are configured to invoke computer instructions to cause the electronic device to perform any of the possible implementations of the first aspect described above.
In a fourth aspect, the present application provides a computer storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform any one of the possible implementations of the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip applied to an electronic device, where the chip includes one or more processors, and the processor is configured to invoke computer instructions to cause the electronic device to execute any one of the possible implementation manners of the first aspect.
In a sixth aspect, an embodiment of the present application provides a computer program product including instructions, which, when run on a device, cause the electronic device to perform any one of the possible implementations of the first aspect.
It is understood that the bluetooth automation test system provided by the second aspect, the electronic device provided by the third aspect, the computer storage medium provided by the fourth aspect, the chip provided by the fifth aspect, and the computer program product provided by the sixth aspect are all used to execute the method provided by the embodiments of the present application. Therefore, the beneficial effects achieved by the method can refer to the beneficial effects in the corresponding method, and are not described herein again.
Drawings
Fig. 1 is a system architecture of a bluetooth automation test provided in an embodiment of the present application;
FIGS. 2A-2G are a set of user interfaces provided by embodiments of the present application;
FIG. 3 is a method for generating an automation script according to an embodiment of the present application;
fig. 4 is a method for detecting a bluetooth connection status according to an embodiment of the present application;
fig. 5 is a diagram illustrating an automatic bluetooth testing method according to an embodiment of the present disclosure;
fig. 6 is a schematic hardware structure diagram of an electronic device 100 according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
This application relates to the field of bluetooth testing, and to facilitate understanding of the methods provided herein, some terms of the field of bluetooth testing are described below.
1. Bluetooth test
Bluetooth testing can be roughly divided into three categories: the method comprises the steps of Bluetooth equipment authentication testing, Bluetooth protocol consistency testing and software testing.
The bluetooth device authentication test is generally performed according to a bluetooth device test specification. The bluetooth device test specification includes a series of tests designed to authenticate bluetooth devices. The Bluetooth equipment verifies all Bluetooth equipment test cases in the Bluetooth equipment test specification one by one. The bluetooth protocol conformance test is used to check whether the implementing entity of the bluetooth protocol conforms to the intrinsic dynamic specification requirements of the protocol.
It is understood that the device referred to herein is a device that includes a bluetooth module. Such as a cell phone, bluetooth headset, bluetooth speaker, etc.
In addition to the above tests, attention should also be paid to software testing of bluetooth. Because of the good and bad function of the bluetooth module, the software implementation of the whole device is also relied on. Meanwhile, the function realization of the bluetooth module also influences the performance and the function of the device software.
2. Bluetooth software testing
Bluetooth software testing can be basically divided into three categories: functional testing, system testing, and interoperability testing.
The function test is to test the functions that the bluetooth module can realize. The function test comprises the verification of function points and human-computer interfaces realized by various application specifications (profiles) of the Bluetooth. The system test is to ensure the software system of the whole device to have certain stability. The system test comprises interface test, interaction test, performance test, pressure test, interoperability test and the like. The interface test is to test whether the function of the calling interface between the bluetooth module and other modules is normal. The interaction test is to test the interaction of the bluetooth module with other modules. The performance test is to test whether the function of the bluetooth module can meet the user requirement when in use. Pressure testing generally tests the stability of the system by repeating the operation. The interoperability test is to test whether one bluetooth device is compatible with other bluetooth devices and works properly.
Generally, a lot of manpower is required when performing bluetooth test. For example, manual testing is typically required when performing functional testing. For another example, when performing system testing, repeated operations are required, and much labor is consumed.
In order to reduce labor costs, device manufacturers are beginning to seek out bluetooth automated testing solutions. Devices such as cell phones, tablet computers, etc. have operating systems (e.g., android systems, etc.), and may implement automation control through some interfaces. Therefore, the bluetooth automatic test scheme for the devices such as mobile phones and tablet computers is mature.
However, since devices such as bluetooth headsets and bluetooth speakers do not have an operating system and no interface capable of realizing automatic control, it is impossible to adopt a bluetooth automatic test scheme suitable for devices such as mobile phones and tablets for devices such as bluetooth headsets and bluetooth speakers.
Generally, the bluetooth automatic test scheme for devices such as bluetooth headsets, bluetooth speakers, etc. is mainly implemented by hardware. For example, the equipment is disassembled and the control unit or pins of the equipment are soldered to the automated control cables. For another example, bluetooth automated testing is achieved through robotic control.
It can be appreciated that the above-described bluetooth automated test scheme requires a significant cost in money and time.
The application provides a Bluetooth automatic test method and a related device. The first electronic device can control an Application (APP) on the second electronic device or the third electronic device through the automation script, and the APP is used for controlling the bluetooth of the fourth electronic device, so that the bluetooth test of the fourth electronic device is realized. In addition, the first electronic device may further determine a bluetooth connection state between the fourth electronic device and the third electronic device through the third electronic device and/or the fourth electronic device.
It can be understood that the method does not need to consume a large amount of money cost and human resources, improves the efficiency of the Bluetooth automatic test, and also improves the accuracy of the Bluetooth test.
The system architecture provided by the present application is described below in conjunction with fig. 1.
As shown in fig. 1, communication connections are established between the first electronic device and the second electronic device, between the second electronic device and the fourth electronic device, between the third electronic device and the fourth electronic device, and between the first electronic device and the fourth electronic device. And the fourth electronic equipment and the third electronic equipment establish Bluetooth connection.
It is understood that the communication connection between the first electronic device and the second electronic device may include, but is not limited to, a Wireless communication mode such as a Wireless Local Area Network (WLAN) and a wired communication mode. For example, the communication connection is established over a Wireless Fidelity (Wi-Fi) network. For another example, the communication connection may be established using a medium such as coaxial cable, twisted pair, fiber optics, and the like.
Similarly, the communication connection mode between the second electronic device and the fourth electronic device may also include, but is not limited to, a wireless communication mode and a wired communication mode.
It is understood that the first electronic device is a terminal that can interact with the second electronic device. For example, the first electronic device may be any one of terminal devices such as a Personal Computer (PC). The second electronic device is a terminal capable of interacting with the first electronic device and the fourth electronic device. For example, the second electronic device may be any one of terminal devices such as a smartphone and a tablet computer. The third electronic device is a terminal capable of interacting with the second electronic device and the fourth electronic device. For example, the third electronic device may be any one of terminal devices such as a smartphone and a tablet computer. The fourth electronic device is a bluetooth device capable of interacting with the second electronic device and the third electronic device. For example, the fourth electronic device may be any one of bluetooth devices such as a bluetooth headset and a bluetooth speaker.
In some embodiments of the present application, there is an APP on the second electronic device that controls bluetooth functionality of the fourth electronic device. The first electronic device can acquire information of each function control of the APP, and based on the information, a control flow of a Bluetooth function of the fourth electronic device is acquired, and then an automation script is generated. When the automation script runs on the first electronic device, the first electronic device sends an instruction A to the second electronic device according to the content of the automation script, the second electronic device sends an instruction B to the fourth electronic device according to the instruction A, the fourth electronic device sends an instruction C to the third electronic device according to the instruction B, the third electronic device sends an instruction D to the fourth electronic device, and the Bluetooth function of the fourth electronic device is controlled according to the instruction D, so that the Bluetooth function of the fourth electronic device is tested.
It is appreciated that the APP on the second electronic device may be used to control bluetooth functionality between the fourth electronic device and the third electronic device.
In some embodiments of the present application, a communication connection may be established between the first electronic device and the third electronic device. There is an APP on the third electronic device that controls the bluetooth function of the fourth electronic device. The first electronic device can acquire information of each function control of the APP, and based on the information, a control flow of a Bluetooth function of the fourth electronic device is acquired, and then an automation script is generated. When the automation script runs on the first electronic device, the first electronic device sends an instruction E to the third electronic device according to the content of the automation script, and the third electronic device controls the Bluetooth function of the fourth electronic device according to the instruction E, so that the Bluetooth function of the fourth electronic device is tested. It will be appreciated that in these embodiments, the testing of the bluetooth functionality of the fourth electronic device may be accomplished without the second electronic device.
It is understood that the communication connection mode between the second electronic device and the fourth electronic device may also include, but is not limited to, a wireless communication mode and a wired communication mode. The APP on the third electronic device may be used to control bluetooth functionality between the fourth electronic device and the third electronic device.
Some user interfaces provided by embodiments of the present application are described below in conjunction with fig. 2A-2G.
It is understood that the term "user interface" in the description and claims and drawings of the present application is a media interface for interaction and information exchange between an application or operating system and a user that enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in the display screen of the electronic device, where the control may include a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
The following description will be given taking a scenario in which the second electronic device exists in the system architecture shown in fig. 1 as an example.
1. Establishing communication connections between electronic devices (FIGS. 2A-2C)
The first electronic device and the second electronic device are in communication connection, the second electronic device and the fourth electronic device are in Bluetooth connection, and the third electronic device and the fourth electronic device are in Bluetooth connection. Wherein, can install the APP of the bluetooth function of control fourth electronic equipment on the second electronic equipment.
It is understood that other wireless communication manners (for example, Wi-Fi and the like) or wired communication manners may also be adopted between the second electronic device and the fourth electronic device, which is not limited in this application.
Fig. 2A illustrates a user interface 210 on a second electronic device for exposing applications installed by the second electronic device.
The user interface 210 displays a page with application icons placed therein, which may include a plurality of application icons (e.g., a weather application icon, a calendar application icon, an album application icon, a notes application icon, an email application icon, an application store application icon, a settings application icon, a bluetooth device control application icon 211, etc.). And page indicators can be displayed below the application icons to indicate the position relationship between the currently displayed page and other pages. Below the page indicator are a plurality of tray icons (e.g., camera application icon, browser application icon, information application icon, dialing application icon). The tray icon remains displayed upon page switching. The embodiments provided herein do not limit the content displayed on the user interface 210. In addition, the embodiments provided in the present application do not limit the names of the above icons. Accordingly, the name of the application program corresponding to the icon is not limited.
It should be noted that the application program corresponding to the bluetooth device control application icon 211 is a bluetooth device control application program. It is understood that the application is an APP controlling the bluetooth functionality of the fourth electronic device.
It is understood that the second electronic device may detect a user operation (such as a touch/click operation) acting on the bluetooth device control icon 211, and in response to the operation, the electronic device 100 may display the user interface 220 illustrated in fig. 2B.
Fig. 2B illustrates a user interface 220 of a bluetooth device control application on the second electronic device. As shown in fig. 2B, the user interface 220 may include a device display area 221, a bluetooth connection display area 222, and a play display area 223.
The device display area 221 is used for displaying a name, power, and the like of a fourth electronic device controlled by the second electronic device.
The bluetooth connection display area 222 is used for displaying the bluetooth connection status of the fourth electronic device with other devices. As shown in FIG. 2B, the DEVICEs to which the fourth electronic DEVICE is connected include DEVICE 2 and DEVICE 3. Wherein DEVICE 2 denotes a second electronic DEVICE and DEVICE 3 denotes a third electronic DEVICE. In addition, the icon behind DEVICE 3 indicates that the fourth electronic DEVICE is playing the content played by the third electronic DEVICE.
The play display area 223 is used for displaying the play content of the fourth electronic device. As shown in fig. 2B, the fourth electronic device plays the song "north arrow", and the currently played lyrics are "people world, not known to home". It is to be appreciated that the play display area 223 can include a switch previous track control 2231, a pause control 2232, a switch next track control 2233, a play progress control 2234, and a volume control 2235. The last song switching control 2231 is configured to switch a currently playing song to a last song. Pause control 2232 is used to pause a currently playing song. The switch next song control 2233 is used to switch the currently playing song to the next song. The play progress control 2234 is used to display and adjust the play progress of the current song. Volume control 2235 is used to adjust volume.
Fig. 2C illustrates a user interface 230 of a music playing application on the third electronic device. As shown in fig. 2C, user interface 230 may include a play progress control 233 and a display area 232.
The playing progress control 233 is used to display and adjust the playing progress of the current song.
The display area 232 may include a switch previous song control 2321, a pause control 2322, and a switch next song control 2323. The previous song switching control 2321 is used to switch the currently played song to the previous song. Pause control 2322 is used to pause a currently playing song. The switch next song control 2323 is used to switch the currently playing song to the next song.
2. Carry out Bluetooth automatic test (fig. 2D-2F)
After the first electronic device and the second electronic device are in communication connection and the second electronic device and the fourth electronic device and the third electronic device and the fourth electronic device are in Bluetooth connection, the first electronic device can select the automatic script according to the identification information and run the automatic script to perform Bluetooth automatic testing. It is understood that the specific method for performing the bluetooth automation test will be described in the following embodiments, and will not be described herein.
In some embodiments of the present application, a pause/start play control flow exists in an automation script run by the first electronic device. That is to say, the first electronic device may simulate a user operation acting on the pause control 2322, so that the second electronic device sends an instruction to the fourth electronic device, and then the fourth electronic device sends an instruction to the third electronic device, so that the third electronic device stops playing, and finally the third electronic device sends the instruction to stop playing to the fourth electronic device, so that the fourth electronic device also stops playing. Similarly, the first electronic device may also enable the third electronic device to start playing by controlling the second electronic device.
Fig. 2D illustrates a user interface 240 of a bluetooth device control application on the second electronic device. User interface 240 simulates for the first electronic device the user interface displayed by the second electronic device after the user operation acting on pause control 2322. The controls in user interface 240 are substantially identical to the controls in user interface 220. The difference is that user interface 240 also includes a play control 241, but not a pause control 2322. It is understood that the play control 241 is used to play the currently paused song.
Fig. 2E illustrates a user interface 250 of a music playing application on the third electronic device. User interface 250 simulates for the first electronic device the user interface displayed by the third electronic device after the user operation acting on pause control 2322. The controls in user interface 250 are substantially identical to the controls in user interface 230. The difference is that user interface 250 also includes a play control 251, and does not include a pause control 2322. It is understood that the play control 251 is used to play the currently paused song.
In some embodiments of the present application, bluetooth automated testing may also be implemented in other scenarios (e.g., scenarios in which no second electronic device is present in the system architecture shown in fig. 1). The first electronic device can establish communication connection with a third electronic device, and Bluetooth connection is established between the third electronic device and a fourth electronic device. It is understood that the third electronic device may have a bluetooth device control application (as shown in fig. 2A) and a music playback application installed thereon.
Fig. 2F illustrates the user interface 260 of the bluetooth device control application on the third electronic device. The controls in user interface 260 are substantially identical to the controls in user interface 220. The bluetooth connection display area 222 is used for displaying the bluetooth connection status of the fourth electronic device with other devices. As shown in fig. 2B, the fourth electronic DEVICE connected DEVICE includes DEVICE 3. DEVICE 3 denotes a third electronic DEVICE. In addition, the icon behind DEVICE 3 indicates that the fourth electronic DEVICE is playing the content played by the third electronic DEVICE.
It is appreciated that the music playing application is running in the background while the third electronic device is displaying the user interface 260. If the music playing application on the third electronic device exits the background operation, the third electronic device may display the user interface 230 shown in fig. 2C.
In some embodiments of the present application, a pause/start play control flow exists in an automation script run by the first electronic device. That is, the first electronic device may simulate a user operation acting on the pause control 2322 to control the bluetooth device control application on the third electronic device, so that the third electronic device stops playing, and finally, the third electronic device sends an instruction to stop playing to the fourth electronic device, so that the fourth electronic device also stops playing. It can be understood that the process of starting playing is similar to the process of pausing playing, and reference is made to the above contents, which are not described herein again.
In particular, the first electronic device simulates a user operation acting on the pause control 2322, and the third electronic device may display the user interface 240 as shown in fig. 2D. If the music playing application on the third electronic device exits the background operation, the third electronic device may display the user interface 250 shown in fig. 2E. That is, the third electronic device stops playing music.
It can be understood that the Bluetooth automatic test can be completed only by some electronic equipment, so that a large amount of money cost and human resources are not required to be consumed, and the efficiency of the Bluetooth automatic test is improved.
3. Detecting Bluetooth connection state (fig. 2G)
The first electronic device can judge the bluetooth connection state of the fourth electronic device and the third electronic device according to the prompt tone sent by the fourth electronic device. The first electronic device may also determine a bluetooth connection status between the fourth electronic device and the third electronic device according to a user interface displayed by the second electronic device and/or a user interface displayed by the third electronic device.
As shown in fig. 2B and 2D, the DEVICEs in the bluetooth connection display area 222 that show that the fourth electronic DEVICE is connected include DEVICE 2 and DEVICE 3. DEVICE 2 represents the second electronic DEVICE. DEVICE 3 denotes a third electronic DEVICE. That is, according to the user interface 220 and the user interface 240 displayed by the second electronic device: the Bluetooth connection state of the fourth electronic equipment and the third electronic equipment is a connection state.
Fig. 2G illustrates a bluetooth connection interface 270 on the third electronic device. The bluetooth connection interface 270 includes a display area 271, a display area 272, and a display area 273.
The display area 271 is used for displaying whether the bluetooth of the third electronic device is turned on or not and the device name when the device is used for bluetooth connection. As shown in fig. 2G, the DEVICE name is DEVICE 3, i.e., the DEVICE is a third electronic DEVICE.
The display area 272 is used to display the devices to which the third electronic device is connected. As shown in fig. 2G, the DEVICE to which the third electronic DEVICE is connected comprises DEVICE 4, i.e. there is a bluetooth connection between the third electronic DEVICE and the fourth electronic DEVICE.
The display area 273 is used to display devices that have bluetooth enabled and can establish a bluetooth connection, which can be detected by the third electronic device. As shown in FIG. 2G, the third electronic DEVICE detects that both DEVICE 1 and DEVICE 2 are Bluetooth enabled and that these DEVICEs can establish a Bluetooth connection with the third electronic DEVICE. DEVICE 1 denotes a first electronic DEVICE, and DEVICE 2 denotes a second electronic DEVICE.
It is understood that the first electronic device may choose to detect the bluetooth connection status between the third electronic device and the fourth electronic device in different ways. The first electronic device may compare the detection result with a control flow in the automation script, so as to determine whether the bluetooth connection state between the third electronic device and the fourth electronic device is normal. The above mode can improve the accuracy of the Bluetooth automatic test.
A method for generating an automation script provided by the present application is described in detail below with reference to fig. 3.
S301: the first electronic device and the second electronic device are connected in a communication mode, the second electronic device and the fourth electronic device are connected in a communication mode, and the third electronic device and the fourth electronic device are connected in a Bluetooth mode.
It is understood that the communication connection established between the first electronic device and the second electronic device may include, but is not limited to, a wireless communication mode and a wired communication mode.
Similarly, the communication connection mode between the second electronic device and the fourth electronic device may also include a wireless communication mode such as bluetooth and Wi-Fi, and a wired communication mode.
It should be noted that the APP capable of controlling the bluetooth function between the fourth electronic device and the third electronic device is installed on the second electronic device. It will be appreciated that the APP may be the bluetooth device control application mentioned in the above embodiments. For convenience of the following description, the APP is denoted as application X.
S302: the second electronic device sends the first information of the application program X to the first electronic device.
The second electronic device may transmit the first information of the application program X to the first electronic device. It is understood that the first information of the application program X may include, but is not limited to, a package name and control information. That is, the first information may be used to identify application X and the control of application X.
It is understood that the package name is a unique identification of the APP. The package names of different APPs are typically different. The control information may include a launch page activity name, a control text, a control id, and the like. The starting page is a page displayed after the application program X is started. The control text is text information for identifying the control. The control id is also used to identify the control. The control id of different controls typically differs.
Illustratively, as shown in fig. 2B, the control text of the volume control 2235 is "volume".
For example, as shown in fig. 2B, the second electronic device transmits control text and control id for switching the previous-song control 2231, the pause control 2232, the next-song control 2233, the play progress control 2234, and the volume control 2235 to the first electronic device.
S303: the first electronic equipment receives first information of the application program X sent by the second electronic equipment.
Correspondingly, after the second electronic device sends the first information of the package name and the control information of the application program X to the first electronic device, the first electronic device may receive the package name and the control information of the application program X.
It is understood that the first electronic device can find a specific control according to the control text and the control id.
S304: the first electronic device obtains a control flow.
Specifically, the tester may write one or more control flows on the first electronic device, and the first electronic device may acquire the one or more control flows. If the first electronic device executes the one or more control processes, the application program X on the second electronic device may be controlled to make corresponding adjustments, so as to control the fourth electronic device and the third electronic device.
It can be understood that the control flow is used to control the application program X on the second electronic device to perform corresponding adjustment. In some embodiments of the present application, the control flow is code written by a tester.
For example, the control flow may include a next song switching control flow, a previous song switching control flow, a pause/start play control flow, a volume control flow, a bluetooth connection and disconnection control flow, an answering/hang-up call control flow, and the like.
Specifically, the first electronic device may control the application program X on the second electronic device to execute a command to switch the next song by switching the next song control flow. The first electronic device can control the application program X on the second electronic device to execute the command of switching the previous song by switching the previous song control flow. The first electronic device can control the application program X on the second electronic device to execute a command for switching to pause playback or start playback by switching to pause/start playback control flow. The first electronic device may control the application program X on the second electronic device to execute the command for adjusting the volume through the volume control flow. The first electronic device may control the application program X on the second electronic device to execute a command to disconnect/connect bluetooth between the fourth electronic device and the third electronic device through the bluetooth connection and disconnection control flow. The first electronic device can control the application program X on the second electronic device to execute the command of answering/hanging up the incoming call through the answering/hanging up incoming call control process.
It is understood that the control flow may also include other content, and the above examples should not be construed as limiting the present application.
Generally, a control flow includes one or more operations.
In some embodiments of the present application, the control flow may include operations on a control. Specifically, the control process may include searching for a corresponding control according to the control text and the control id, and then implementing the simulation operation on the control. It is understood that the simulation operation refers to a simulation of a user operation. For example, the simulated operation may include a simulation of a user operation such as a single click, a single click by character, a single click by control, a double click, a slide control to the left, a slide control to the right, and so on. The effect achieved by the first electronic device performing the simulated operation is generally the same as the effect achieved by the operation of the user acting on the application program X.
It is appreciated that the first electronic device can utilize the ADB to implement simulated operation of the controls of application X on the second electronic device. ADB is called Android Debug Bridge in full, and Chinese meaning is Android Debug Bridge. The ADB is a tool in android sdk with which the android simulator or real android devices can be directly operated and managed. An ADB may also be understood as a client-server side program. The client is a device (e.g., a first electronic device in the present application) for operation, and the server is an android device (e.g., a second electronic device in the present application).
The main functions of ADB are: 1) running the shell (command line) of the device; 2) managing port mapping of a simulator or device; 3) uploading/downloading files between a computer and a device; 4) installing local Android installation Package (APK) software to a simulator or Android device.
In particular, the first electronic device may enable simulated operation of a control on the second electronic device by running ADBshell on the second electronic device.
In some embodiments of the present application, the control flow may include launching application program X. That is, the control flow may include displaying a start page of the application program X. Specifically, the control flow may include finding the application program X from the package name and the activity name, and opening a start page of the application program X.
It should be noted that, for convenience of operation, the tester may first define an operation object (e.g., a start page, a control, etc.) in the application program X. In order to realize the control of the control in the application program X, the tester may further associate the operation object with the received first information of the application program X. That is, the tester may associate the received first information of the application program X with the defined operation object before performing step S304. When the tester writes in the control flow, the tester can directly search the operation object, and realize the simulation operation of the operation object without searching the control according to the control text and the control id.
For example, the tester may define the start page in application X as win _ name, the play & pause control in application X as play _ pause _ button, the previous _ button in application X as previous _ button, the next _ button in application X as next _ button, and the volume control in application X as volume _ slider.
The control flow is given as an example below.
1. Control flow for switching next yeast
The first electronic device starts an application program X and displays a starting page of the application program X.
Specifically, the first electronic device finds an APP with a package name xxx _ apk.win _ name, and starts the APP. It is understood that APP is application X.
And the first electronic equipment switches the next song.
Specifically, the first electronic device performs a single-click operation on the next _ button through the ADB.
2. Volume control process
The first electronic device starts an application program X and displays a starting page of the application program X.
Specifically, the first electronic device finds an APP with a package name xxx _ apk.win _ name, and starts the APP. It is understood that APP is application X.
And increasing the volume of the first electronic equipment.
Specifically, the first electronic device performs a rightward sliding operation on the volume _ slider through the ADB.
And the volume of the first electronic equipment is reduced.
Specifically, the first electronic device performs a leftward sliding operation on the volume _ slider through the ADB.
It is understood that the above two examples are illustrative of the control flow and should not be construed as limiting the control flow. The control flow may include, but is not limited to, the two examples described above.
S305: and the first electronic equipment generates an automation script according to the acquired control flow.
In particular, a first electronic device generates one or more automation scripts. It is understood that the automation script may include a single control flow executed repeatedly, and may also include a plurality of control flows executed sequentially, which is not limited in this application.
For example, the bluetooth connection and disconnection control flow may be repeatedly executed (e.g., repeatedly executed 500 times) in the automation script.
For example, the automation script may include a sequence of power-on and power-off control processes, call answering and call hanging control processes. Wherein, the number of sequential executions can be one or more. For example, the first electronic device may sequentially execute the two control flows 300 times.
For example, the automation script may include a control flow for sequentially executing a next song switching control flow, a previous song switching control flow, a pause/start playing control flow, a volume control flow, a bluetooth connection and disconnection control flow, a startup and shutdown control flow, and an incoming call answering and hang-up incoming call control flow. Wherein, the number of sequential executions can be one or more.
The automation script generated by the first electronic device according to the method is an automation script associated with the fourth electronic device.
In some embodiments of the present application, the automation script may be generated without the second electronic device. Specifically, the first electronic device may receive first information of the application program X sent by the third electronic device, and obtain a control flow based on the first information, thereby generating an automation script associated with the fourth electronic device. That is, the application program X may be installed on the third electronic device, and the application program X on the third electronic device may control the bluetooth function between the third electronic device and the fourth electronic device.
In addition, the first electronic device can control the application program X on the third electronic device through the acquired control flow. It should be noted that, if the control flow is a bluetooth connection and disconnection control flow, the first electronic device changes the bluetooth connection state by controlling the application program X on the third electronic device. If the first electronic device controls the application program X to disconnect the bluetooth connection between the third electronic device and the fourth electronic device, the tester may manually connect the bluetooth connection between the third electronic device and the fourth electronic device.
The method for detecting the bluetooth connection status provided by the present application is specifically described below with reference to fig. 4.
S401: the first electronic device establishes a communication connection with the fourth electronic device.
It is understood that the communication connection established between the first electronic device and the fourth electronic device may include, but is not limited to, a wireless communication mode and a wired communication mode.
S402: and the fourth electronic equipment sends the prompt tone of the equipment to the first electronic equipment.
Specifically, the fourth electronic device may collect the alert tone of the device in real time and send it to the first electronic device.
S403: the first electronic equipment receives the prompt tone sent by the fourth electronic equipment.
After the fourth electronic device sends the alert tone to the first electronic device, the first electronic device may receive the alert tone. It can be understood that the fourth electronic device may perform power amplification processing on the alert tone and then transmit the alert tone to the first electronic device, or the first electronic device may perform amplification processing after receiving the alert tone.
S404: the first electronic equipment determines the Bluetooth connection state M according to the prompt tone.
The first electronic device may compare the received alert tone sent by the fourth electronic device with the alert tone stored in the first electronic device, thereby determining the bluetooth connection state M. That is, the bluetooth connection state M is a bluetooth connection state between the fourth electronic device and the third electronic device determined by the first electronic device according to the alert tone. It is understood that the bluetooth connection status may include connected, disconnected, configured, etc., and the present application is not limited in this respect.
It should be noted that the first electronic device stores pairing prompt tones, connection prompt tones, disconnection prompt tones, and the like of bluetooth devices of different models. The first electronic device can judge the current state of the Bluetooth device according to different prompt tones.
It is understood that the first electronic device may establish a communication connection with a different model of bluetooth device. The tester can adjust the connection state of the Bluetooth devices of different models and record the prompt tone of the Bluetooth devices of different models in different connection states. The tester may also input the recorded alert tone and related information to the first electronic device. It is understood that the related information may include, but is not limited to, the model number, connection status, etc. of the bluetooth device. First electronic equipment can receive and store the bluetooth equipment of the different models that the tester recorded under different connection status prompt tone to and with the corresponding connection status of this prompt tone. In addition, the first electronic device may further store the model of the corresponding bluetooth device.
TABLE 1
ID Type number Type (B) Status of state Audio content
1_1 Bluetooth headphone-type 1 Connection prompt tone Connection of Audio 1
1_2 Bluetooth headphone-type 1 Disconnection prompt tone Disconnect Audio 2
1_3 Bluetooth earphone-type 1 Pairing prompt tone Completing pairing Audio 3
2_1 Bluetooth earphone model 2 Connection prompt tone Connection of Audio 4
2_2 Bluetooth earphone model 2 Disconnection prompt tone Disconnect Audio 5
3_1 Bluetooth sound box-type 3 Connection prompt tone Connection of Audio 6
…… …… …… …… ……
Illustratively, as shown in table 1, the first electronic device stores alert tones of different models of bluetooth devices (e.g., bluetooth headsets, etc.) in different states. When the Bluetooth headset of the model 1 is in a connected state, the corresponding prompt tone is audio 1. When the model 1 bluetooth headset is in the off state, the corresponding prompt tone is audio 2. When the Bluetooth headset of the model 1 is paired, the corresponding prompt tone is audio 3. When the model 2 bluetooth headset is in a connected state, the corresponding prompt tone is audio 4. When the model 2 bluetooth headset is in the off state, the corresponding prompt tone is audio 5.
It is understood that the audio content of the alert tone (e.g., audio 1-audio 6, etc.) may include, but is not limited to, speech, singing or instrumental sounds, which are not limited in this application.
For convenience of description, the alert tone sent by the first electronic device to the fourth electronic device may be referred to as an alert tone R, and the alert tone stored in the fourth electronic device may be referred to as an alert tone set S. It is understood that the set of alert tones S includes at least one alert tone.
The first electronic device may compare the received alert tone R with stored alert tones in the alert tone set S, and determine that the alert tone Q in the alert tone set S is the same as the alert tone R. The first electronic device searches the corresponding state according to the prompt tone R.
For example, after the first electronic device compares the first electronic device and determines that the prompt tone Q is the same as the audio 4, the first electronic device may determine that the current state of the fourth electronic device is a connection state according to the audio 4.
It should be noted that, in some embodiments of the present application, the first electronic device may also determine, directly according to the third electronic device, a bluetooth connection state between the third electronic device and the fourth electronic device. For convenience of description, the bluetooth connection state is referred to as a bluetooth connection state N. It can be understood that the tester may directly obtain the bluetooth connection state N according to the user interface (e.g., the bluetooth connection interface shown in fig. 2G) displayed by the third electronic device, and then input the bluetooth connection state N to the first electronic device. In addition, the third electronic device can also directly transmit the bluetooth connection state N between the third electronic device and the fourth electronic device to the first electronic device.
In some embodiments of the present application, the first electronic device may further determine a bluetooth connection status between the third electronic device and the fourth electronic device according to a user interface displayed by the second electronic device (e.g., the user interfaces shown in fig. 2B, 2D, and 2F).
In some embodiments of the present application, the first electronic device may determine that the bluetooth connection state M is a bluetooth connection state between the fourth electronic device and the third electronic device.
In some embodiments of the present application, the first electronic device may determine that the bluetooth connection state N is a bluetooth connection state between the fourth electronic device and the third electronic device.
In some embodiments of the present application, the first electronic device may determine a bluetooth connection state between the fourth electronic device and the third electronic device according to the bluetooth connection state M and the bluetooth connection state N.
TABLE 2
Bluetooth connection state M Bluetooth connection state N Bluetooth connection state between fourth electronic device and third electronic device
Connection of Connection of Connection of
Connection of Disconnect Connection of
Disconnect Connection of Connection of
Disconnect Disconnect Disconnect
For example, as shown in table 2, if the bluetooth connection state M and/or the bluetooth connection state N are connected, the first electronic device determines that the bluetooth connection state between the fourth electronic device and the third electronic device is a connection state. If the bluetooth connection state M and the bluetooth connection state N are both disconnected, the first electronic device determines that the bluetooth connection state between the fourth electronic device and the third electronic device is a disconnected state.
It is understood that the manner in which the first electronic device determines the bluetooth connection state between the fourth electronic device and the third electronic device according to the bluetooth connection state M and the bluetooth connection state N is not limited to the above table 2. The manner shown in table 2 is merely an example and should not be construed as limiting the present application.
The following describes a bluetooth automation test method provided by the present application with reference to fig. 5.
S501: the first electronic device and the second electronic device are connected in a communication mode, the second electronic device and the fourth electronic device are connected in a communication mode, and the third electronic device and the fourth electronic device are connected in a Bluetooth mode.
It is understood that the communication connection established between the first electronic device and the second electronic device may include, but is not limited to, a wireless communication mode and a wired communication mode.
Similarly, the communication connection mode between the second electronic device and the fourth electronic device may also include a wireless communication mode such as bluetooth and Wi-Fi, and a wired communication mode.
It should be noted that, the APP that can control the bluetooth function between the fourth electronic device and the third electronic device exists on the second electronic device. For convenience of the following description, the APP is denoted as application X.
S502: the first electronic device selects an automation script based on the identification information.
It is understood that the identification information may include a model number and a device type of the fourth electronic device. Also, the first electronic device may store automation scripts for multiple types, multiple models of electronic devices. Accordingly, the first electronic device may determine a model of the fourth electronic device based on the identification information, and thereby select a corresponding automation script based on the model.
S503: the first electronic device runs an automation script.
The first electronic device may control a bluetooth function between the fourth electronic device and the third electronic device according to a control flow in the automation script. Specifically, the first electronic device sends instruction a to the second electronic device. The second electronic device may receive instruction a sent by the first electronic device and simulate a user operation acting on application program X according to instruction a. The second electronic device may send instruction B to the fourth electronic device after detecting the simulated operation acting on application X. The fourth electronic device may receive instruction B sent by the second electronic device, and send instruction C to the third electronic device according to instruction B. And the third electronic equipment receives the instruction C sent by the fourth electronic equipment and carries out corresponding adjustment according to the instruction C. E.g. switching songs, increasing the volume, etc. After the third electronic device makes a corresponding adjustment, an instruction D may be sent to control the fourth electronic device to make a corresponding adjustment.
In some embodiments of the present application, bluetooth automated testing may be implemented without a second electronic device. Specifically, the first electronic device sends an instruction E to the third electronic device. The third electronic device may receive the instruction E sent by the first electronic device, and send an instruction F to the fourth electronic device according to the instruction E. And the fourth electronic equipment receives the instruction F sent by the third electronic equipment and sends an instruction G to the third electronic equipment according to the instruction F. And the third electronic equipment receives the instruction G sent by the fourth electronic equipment and carries out corresponding adjustment according to the instruction G. E.g. switching songs, increasing the volume, etc. After the third electronic device makes a corresponding adjustment, it may send an instruction H to control the fourth electronic device to make a corresponding adjustment.
It can be understood that, if the automation script run by the first electronic device includes the bluetooth connection and disconnection control flow, the first electronic device may determine the bluetooth connection state between the third electronic device and the fourth electronic device, and compare the bluetooth connection state with the instruction in the bluetooth connection and disconnection control flow. And if the Bluetooth connection state is connection and the instruction in the Bluetooth connection and disconnection control instruction is used for indicating that the third electronic equipment and the fourth electronic equipment are connected in a Bluetooth mode, the first electronic equipment determines that the Bluetooth connection state is normal. It is understood that the bluetooth connection state referred to herein is a bluetooth connection state between the third electronic device and the fourth electronic device. Similarly, if the bluetooth connection state is disconnected and the instruction in the bluetooth connection and disconnection control instruction is used to instruct the third electronic device to disconnect the bluetooth connection with the fourth electronic device, the first electronic device determines that the bluetooth connection state is normal. However, if the bluetooth connection state is connected and the instruction in the bluetooth connection and disconnection control instruction is used to instruct the third electronic device to disconnect the bluetooth connection with the fourth electronic device, the first electronic device determines that the bluetooth connection state is abnormal. And if the Bluetooth connection state is disconnected and the instruction in the Bluetooth connection and disconnection control instruction is used for indicating that the third electronic equipment and the fourth electronic equipment are connected by Bluetooth, the first electronic equipment determines that the Bluetooth connection state is abnormal.
It can be understood that, if the first electronic device determines that the bluetooth connection state is abnormal, the tester may be alerted to the bluetooth connection state abnormality between the third electronic device and the fourth electronic device by controlling sound and/or light (e.g., setting an alarm tone). It is understood that the first electronic device may also alert the tester in other ways, and the application is not limited thereto. In addition, the specific content of the warning tone is not limited in the present application.
The following describes an apparatus according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device 100 according to an embodiment of the present disclosure.
It is understood that the electronic apparatus 100 may be the first electronic apparatus, the second electronic apparatus, the third electronic apparatus, and the fourth electronic apparatus in the above-described embodiments.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management Module 140, a power management Module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication Module 150, a wireless communication Module 160, an audio Module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor Module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the Processor 110 may include an Application Processor (AP), a modem Processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband Processor, and/or a Neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
In embodiments provided herein, the electronic device 100 may execute the methods illustrated in fig. 3, 4, and 5 by the processor 110.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices 100, such as AR devices and the like.
The charging management module 140 is configured to receive charging input from a charger. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power Amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194.
The Wireless Communication module 160 may provide solutions for Wireless Communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The Display panel may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), an Active Matrix Organic Light-Emitting Diode (Active-Matrix Organic Light-Emitting Diode, AMOLED), a flexible Light-Emitting Diode (FLED), a Mini LED, a Micro-OLED, a Quantum Dot Light-Emitting Diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement the acquisition function via the ISP, camera 193, video codec, GPU, display screen 194, application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image or video visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a Complementary Metal-Oxide-Semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image or video signal. And the ISP outputs the digital image or video signal to the DSP for processing. The DSP converts the digital image or video signal into image or video signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1. For example, in some embodiments, the electronic device 100 may acquire images of multiple exposure coefficients using the N cameras 193, and further, in video post-processing, the electronic device 100 may synthesize an HDR image by an HDR technique from the images of multiple exposure coefficients.
The digital signal processor is used for processing digital signals, and can process digital images or video signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a Neural-Network (NN) computing processor, which processes input information quickly by using a biological Neural Network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image and video playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. The electronic device 100 may be provided with at least one microphone 170C.
The headphone interface 170D is used to connect a wired headphone.
The sensor module 180 may include 1 or more sensors, which may be of the same type or different types. It is understood that the sensor module 180 shown in fig. 1 is only an exemplary division, and other division is possible, which is not limited in this application.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment 100, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100.
The ambient light sensor 180L is used to sense the ambient light level.
The fingerprint sensor 180H is used to acquire a fingerprint.
The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
In one embodiment of the present application, a user may need to acquire a series of images using the electronic device 100 for time-lapse photography or continuous shooting. In a delayed shooting or continuous shooting scenario, the electronic device 100 may assume the AE mode. That is, the electronic apparatus 100 automatically adjusts the AE value, and may trigger the touchAE mode if the user touches the display screen 194 during the preview of the series of images. In the touchAE mode, the electronic apparatus 100 may adjust the brightness of the corresponding position where the user touches the display screen and perform high-weight photometry. When the average brightness of the picture is calculated, the weight of the user touch area is obviously higher than that of other areas, and the finally calculated average brightness of the picture is closer to the average brightness of the user touch area.
The bone conduction sensor 180M may acquire a vibration signal.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
Fig. 7 is a block diagram of a software structure of an electronic device 100 according to an embodiment of the present disclosure.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the system is divided into four layers, an application layer, an application framework layer, a Runtime (Runtime) and system library, and a kernel layer, from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 7, the application package may include applications (also referred to as applications) such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The Application framework layer provides an Application Programming Interface (API) and a Programming framework for the Application program of the Application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 7, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog interface. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Runtime (Runtime) includes a core library and a virtual machine. Runtime is responsible for scheduling and management of the system.
The core library comprises two parts: one part is a function that a programming language (for example, java language) needs to call, and the other part is a core library of the system.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes programming files (e.g., java files) of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface Manager (Surface Manager), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), two-dimensional graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provides a fusion of two-Dimensional (2-Dimensional, 2D) and three-Dimensional (3-Dimensional, 3D) layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing 3D graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer at least comprises a display driver, a camera driver, an audio driver, a sensor driver and a virtual card driver.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (22)

1. An automatic Bluetooth testing method is applied to a first electronic device and comprises the following steps:
the first electronic equipment selects an automation script associated with the fourth electronic equipment according to the identification information; the identification information is used for identifying a fourth electronic device; the automation script is used for testing the Bluetooth function between the fourth electronic equipment and the third electronic equipment; the fourth electronic equipment and the third electronic equipment are connected through Bluetooth;
and the first electronic equipment controls the Bluetooth function between the fourth electronic equipment and the third electronic equipment according to the automation script.
2. The method of claim 1, wherein the second electronic device has an application program X installed; the application program X is used for controlling the Bluetooth function of the fourth electronic equipment; before the first electronic device selects an automation script according to the identification information, the method further comprises:
the first electronic equipment receives first information of the application program X sent by the second electronic equipment; the first information is used for identifying the application program X and a control of the application program X;
the first electronic equipment acquires a control flow based on the first information; the control flow is used for controlling the application program X;
and the first electronic equipment generates the automation script associated with the fourth electronic equipment according to the control flow.
3. The method of claim 1, wherein the third electronic device has an application program X installed; the application program X is used for controlling the Bluetooth function of the fourth electronic equipment; before the first electronic device selects an automation script according to the identification information, the method further comprises:
the first electronic equipment receives first information of the application program X sent by the third electronic equipment; the first information is used for identifying the application program X and a control of the application program X;
the first electronic equipment acquires a control flow based on the first information; the control flow is used for controlling the application program X;
and the first electronic equipment generates the automation script associated with the fourth electronic equipment according to the control flow.
4. The method of claim 2, wherein the first electronic device controls a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, and specifically comprises:
the first electronic equipment sends a first instruction to the second electronic equipment according to the automation script; the first instruction is used for controlling the application program X in the second electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
5. The method of claim 3, wherein a second electronic device has the application X installed; the first electronic device controls a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, and the method specifically includes:
the first electronic equipment sends a first instruction to the second electronic equipment according to the automation script; the first instruction is used for controlling the application program X in the second electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
6. A method according to claim 2 or 3, wherein the third electronic device is installed with the application X; the first electronic device controls a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, and the method specifically includes:
the first electronic equipment sends a third instruction to the third electronic equipment according to the automation script; the third instruction is used for controlling the application program X in the third electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
7. The method of any one of claims 1-6, further comprising:
the first electronic equipment receives a prompt tone sent by the fourth electronic equipment; a communication connection exists between the first electronic device and the fourth electronic device;
the first electronic equipment compares the prompt tone sent by the fourth electronic equipment with the prompt tone in the prompt tone set S stored in the fourth electronic equipment to determine a Bluetooth connection state M; the warning tone set S includes warning tones of the fourth electronic device in different connection states.
8. The method of claim 7, wherein before the first electronic device receives an alert tone sent by the fourth electronic device, the method further comprises:
and the first electronic equipment receives and stores the prompt tone set S recorded by the tester.
9. The method of claim 7 or 8, wherein the method further comprises:
the first electronic device determines a Bluetooth connection state N through the third electronic device;
and the first electronic equipment determines the Bluetooth connection state between the fourth electronic equipment and the third electronic equipment according to the Bluetooth connection state M and the Bluetooth connection state N.
10. The method of claim 9, wherein the method further comprises:
if the Bluetooth connection state indicated by the instruction in the automation script is inconsistent with the Bluetooth connection state between the fourth electronic device and the third electronic device, the first electronic device judges that the Bluetooth connection is abnormal;
the first electronic equipment reminds the tester of abnormal Bluetooth connection through controlling sound and/or light.
11. An automated bluetooth test system, the system comprising: a first electronic device, a third electronic device, and a fourth electronic device;
the first electronic equipment is used for selecting an automation script associated with the fourth electronic equipment according to the identification information; the identification information is used for identifying the fourth electronic equipment; the automation script is used for testing the Bluetooth function between the fourth electronic equipment and the third electronic equipment; controlling a Bluetooth function between the fourth electronic device and the third electronic device according to the automation script;
the third electronic device is used for establishing Bluetooth connection with the fourth electronic device;
and the fourth electronic equipment is used for establishing Bluetooth connection with the third electronic equipment.
12. The system of claim 11, wherein the system further comprises a second electronic device; the second electronic equipment is provided with an application program X; the application program X is used for controlling the Bluetooth function of the fourth electronic equipment;
the first electronic device, prior to being configured to select the automation script based on the identification information, is further configured to:
receiving first information of the application program X sent by the second electronic equipment; the first information is used for identifying the application program X and a control of the application program X;
acquiring a control flow based on the first information; the control flow is used for controlling the application program X;
and generating the automation script associated with the fourth electronic device according to the control flow.
13. The system of claim 11, wherein the third electronic device has an application program X installed; the application program X is used for controlling the Bluetooth function of the fourth electronic equipment; before the first electronic device selects the automation script according to the identification information, the method is further configured to:
receiving first information of the application program X sent by the third electronic equipment; the first information is used for identifying the application program X and a control of the application program X;
acquiring a control flow based on the first information; the control flow is used for controlling the application program X;
generating the automation script associated with the fourth electronic device according to the control flow.
14. The system of claim 12, wherein the first electronic device, when configured to control bluetooth functionality between the fourth electronic device and the third electronic device according to the automation script, is specifically configured to:
sending a first instruction to the second electronic equipment according to the automation script; the first instruction is used for controlling the application program X in the second electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
15. The system of claim 13, wherein the system further comprises a second electronic device; the second electronic equipment is provided with the application program X; the first electronic device, when being configured to control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, is specifically configured to:
sending a first instruction to the second electronic equipment according to the automation script; the first instruction is used for controlling the application program X in the second electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
16. The system according to claim 12 or 13, wherein the third electronic device is installed with the application program X; the first electronic device, when being configured to control a bluetooth function between the fourth electronic device and the third electronic device according to the automation script, is specifically configured to:
sending a third instruction to the third electronic device according to the automation script; the third instruction is used for controlling the application program X in the third electronic equipment to send a second instruction to the fourth electronic equipment; the second instruction is used for controlling a Bluetooth function between the fourth electronic device and the third electronic device.
17. The system of any of claims 11-16, wherein the fourth electronic device is further configured to: sending a prompt tone to the first electronic device; a communication connection exists between the first electronic device and the fourth electronic device;
the first electronic device is further configured to: receiving a prompt tone sent by the fourth electronic equipment; comparing the prompt tone sent by the fourth electronic device with the prompt tone in the prompt tone set S to determine a Bluetooth connection state M; the warning tone set S includes warning tones of the fourth electronic device in different connection states.
18. The system of claim 17, wherein the first electronic device, prior to being configured to receive the alert tone transmitted by the fourth electronic device, is further configured to: and receiving and storing the prompt tone set S recorded by the tester.
19. The system of claim 17 or 18, wherein the first electronic device is further configured to:
determining, by the third electronic device, a Bluetooth connection state N;
and determining the Bluetooth connection state between the fourth electronic equipment and the third electronic equipment according to the Bluetooth connection state M and the Bluetooth connection state N.
20. The system of claim 19, wherein the first electronic device is further configured to:
if the Bluetooth connection state indicated by the instruction in the automation script is inconsistent with the Bluetooth connection state between the fourth electronic device and the third electronic device, judging that the Bluetooth connection is abnormal, and reminding the tester of the Bluetooth connection abnormality by controlling sound and/or light.
21. An electronic device, characterized in that the electronic device comprises: a memory, one or more processors; the memory coupled with the one or more processors, the memory to store computer program code, the computer program code comprising computer instructions; the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method of any of claims 1-10.
22. A computer-readable storage medium, comprising: computer instructions; the computer instructions, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-10.
CN202110826439.XA 2021-07-21 2021-07-21 Bluetooth automatic test method and related device Active CN114490228B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110826439.XA CN114490228B (en) 2021-07-21 2021-07-21 Bluetooth automatic test method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110826439.XA CN114490228B (en) 2021-07-21 2021-07-21 Bluetooth automatic test method and related device

Publications (2)

Publication Number Publication Date
CN114490228A true CN114490228A (en) 2022-05-13
CN114490228B CN114490228B (en) 2022-11-29

Family

ID=81491526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110826439.XA Active CN114490228B (en) 2021-07-21 2021-07-21 Bluetooth automatic test method and related device

Country Status (1)

Country Link
CN (1) CN114490228B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334485A (en) * 2022-09-15 2022-11-11 北京华创互联科技股份有限公司 Bluetooth device testing device and Bluetooth testing system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
US20140178853A1 (en) * 2012-12-21 2014-06-26 General Electric Company Testing system and method
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN106776294A (en) * 2016-11-29 2017-05-31 任子行网络技术股份有限公司 Android mobile phone automated testing method and system
CN106850091A (en) * 2017-02-03 2017-06-13 珠海市杰理科技股份有限公司 Bluetooth equipment method of testing and system
CN108829609A (en) * 2018-07-27 2018-11-16 深圳智芯数据服务有限公司 A kind of test method and system of blue tooth products
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
CN110389886A (en) * 2018-04-16 2019-10-29 腾讯科技(深圳)有限公司 A kind of additional function test method, device and the storage medium of main body application program
CN112839323A (en) * 2020-12-31 2021-05-25 Tcl通力电子(惠州)有限公司 Bluetooth device testing method and device, terminal and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
US20140178853A1 (en) * 2012-12-21 2014-06-26 General Electric Company Testing system and method
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN106776294A (en) * 2016-11-29 2017-05-31 任子行网络技术股份有限公司 Android mobile phone automated testing method and system
CN106850091A (en) * 2017-02-03 2017-06-13 珠海市杰理科技股份有限公司 Bluetooth equipment method of testing and system
WO2019090454A1 (en) * 2017-11-07 2019-05-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
CN110389886A (en) * 2018-04-16 2019-10-29 腾讯科技(深圳)有限公司 A kind of additional function test method, device and the storage medium of main body application program
CN108829609A (en) * 2018-07-27 2018-11-16 深圳智芯数据服务有限公司 A kind of test method and system of blue tooth products
CN112839323A (en) * 2020-12-31 2021-05-25 Tcl通力电子(惠州)有限公司 Bluetooth device testing method and device, terminal and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334485A (en) * 2022-09-15 2022-11-11 北京华创互联科技股份有限公司 Bluetooth device testing device and Bluetooth testing system
CN115334485B (en) * 2022-09-15 2024-01-30 北京华创互联科技股份有限公司 Bluetooth device testing device and Bluetooth testing system

Also Published As

Publication number Publication date
CN114490228B (en) 2022-11-29

Similar Documents

Publication Publication Date Title
CN110381197B (en) Method, device and system for processing audio data in many-to-one screen projection
CN112231025B (en) UI component display method and electronic equipment
CN112148400B (en) Display method and device in locking state
CN111345010A (en) Multimedia content synchronization method and electronic equipment
CN113497909B (en) Equipment interaction method and electronic equipment
US20230021994A1 (en) Cross-Device Content Projection Method and Electronic Device
CN113994317A (en) User interface layout method and electronic equipment
CN113704205B (en) Log storage method, chip, electronic device and readable storage medium
CN113961157B (en) Display interaction system, display method and equipment
CN113254409A (en) File sharing method, system and related equipment
CN113067940A (en) Method for presenting video by electronic equipment in incoming call and electronic equipment
CN114125130A (en) Method for controlling communication service state, terminal device and readable storage medium
CN114371985A (en) Automated testing method, electronic device, and storage medium
CN112383664A (en) Equipment control method, first terminal equipment and second terminal equipment
WO2022127130A1 (en) Method for adding operation sequence, electronic device, and system
CN111031492A (en) Call demand response method and device and electronic equipment
CN115438354A (en) User privacy protection method and device
CN114490228B (en) Bluetooth automatic test method and related device
CN114173184A (en) Screen projection method and electronic equipment
CN113970888A (en) Household equipment control method, terminal equipment and computer readable storage medium
CN113380240B (en) Voice interaction method and electronic equipment
CN113407300B (en) Application false killing evaluation method and related equipment
CN113467821A (en) Application program repairing method, device, equipment and readable storage medium
CN114003241A (en) Interface adaptation display method and system of application program, electronic device and medium
CN113867851A (en) Electronic equipment operation guide information recording method, electronic equipment operation guide information acquisition method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant