CN116028356A - Bluetooth-based terminal software testing method and device - Google Patents

Bluetooth-based terminal software testing method and device Download PDF

Info

Publication number
CN116028356A
CN116028356A CN202211697441.2A CN202211697441A CN116028356A CN 116028356 A CN116028356 A CN 116028356A CN 202211697441 A CN202211697441 A CN 202211697441A CN 116028356 A CN116028356 A CN 116028356A
Authority
CN
China
Prior art keywords
bluetooth
terminal
simulated
test
data
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.)
Pending
Application number
CN202211697441.2A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202211697441.2A priority Critical patent/CN116028356A/en
Publication of CN116028356A publication Critical patent/CN116028356A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a Bluetooth-based terminal software testing method and device, wherein the method comprises the following steps: responding to Bluetooth pairing operation executed by a user, and pairing and connecting the first terminal and the second terminal in a Bluetooth mode; displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested; responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction. According to the method, the Bluetooth function widely integrated in the terminal is used, after the first terminal is connected with the second terminal through Bluetooth, the first terminal sends the simulated Bluetooth instruction signal to the second terminal, and verification of relevant functions and performances of the second terminal is achieved.

Description

Bluetooth-based terminal software testing method and device
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a Bluetooth-based terminal software testing method and device.
Background
In the testing and verifying process of the related functions and performances of the mobile terminal, the testing and verifying of the related functions and performances of the APP are usually completed through a related control of the touch mobile terminal Application (APP); however, in some special scenarios, for example, a test in a weak network scenario, where the mobile terminal is located in a closed weak network enclosure, or a high-frequency click performance test, a frequent click button test is required, and a real mobile terminal needs to be controlled to perform a click action on an APP by initiating a simulated click from a computer terminal (PC), so as to realize test verification of related functions and performance, in the prior art, a manner that a USB device is directly connected to the PC is generally adopted, but in this manner, on one hand, the mobile terminal needs to be fixedly connected to the PC through the USB device, so that the mobile terminal cannot be flexibly moved, and an additional USB device is required for connecting the mobile terminal to the PC terminal; on the other hand, the mobile terminal needs to be set into a developer mode to realize data transmission, but part of mobile terminal rights do not support the mode due to security setting.
Disclosure of Invention
In view of the above problems, the present application proposes a method, an apparatus, a computing device, and a computer storage medium for testing terminal software based on bluetooth, which are used for solving the following problems: in the prior art, extra equipment is required to realize the connection between the mobile terminal and the computer terminal, and the test cannot be realized conveniently.
According to an aspect of the embodiments of the present application, there is provided a method for testing terminal software based on bluetooth, including:
responding to Bluetooth pairing operation executed by a user, and pairing and connecting the first terminal and the second terminal in a Bluetooth mode;
displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested;
responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
Further, responding to the test operation executed by the user for the object to be tested, generating a simulated bluetooth test instruction according to the operation data of the test operation, and sending the simulated bluetooth test instruction to the second terminal in a bluetooth mode further comprises:
responding to test operation executed by a user for an object to be tested, and generating a simulated Bluetooth test instruction through a Bluetooth keyboard simulator according to operation data of the test operation;
And transmitting the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode through a data transmission method in the Bluetooth keyboard simulator.
Further, before generating, by the bluetooth keyboard simulator, a simulated bluetooth test instruction according to operation data of the test operation in response to a test operation performed by a user for an object to be tested, the method further includes:
installing a Bluetooth keyboard simulator into the first terminal in response to a Bluetooth keyboard simulator installation operation performed by a user for the first terminal;
and responding to the Bluetooth keyboard simulator setting operation executed by the user, adding the pre-written mouse control data into the Bluetooth service discovery protocol file, and modifying the data transmission method in the Bluetooth keyboard simulator.
Further, the mouse manipulation data is written according to keyboard manipulation data in the bluetooth keyboard simulator.
Further, the method for modifying data transmission in the bluetooth keyboard simulator further comprises the steps of:
the data transmission method in the Bluetooth keyboard simulator is modified into a universal method.
Further, generating the simulated bluetooth test instruction according to the operation data of the test operation further includes:
acquiring action parameters and operation position coordinate data from operation data of test operation;
And generating a simulated Bluetooth test instruction according to the action parameters and the operation position coordinate data.
Further, generating the simulated bluetooth test instruction according to the action parameter and the operation position coordinate data further comprises:
and acquiring first resolution data of a preset display area, and generating a simulated Bluetooth test instruction containing action parameters, operation position coordinate data and the first resolution data.
Further, generating the simulated bluetooth test instruction according to the action parameter and the operation position coordinate data further comprises:
acquiring first resolution data of a preset display area and second resolution data of a second terminal;
calculating a screen display proportion relation between the first terminal and the second terminal according to the first resolution data and the second resolution data;
converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data;
and generating a simulated Bluetooth test instruction containing the action parameters and the converted operation position coordinate data.
According to another aspect of the embodiments of the present application, there is provided a method for testing terminal software based on bluetooth, including:
receiving an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal;
Determining action parameters and target operation position coordinate data according to the simulated Bluetooth test instruction;
and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
Further, determining the motion parameter and the target operation position coordinate data according to the simulated bluetooth test instruction further comprises:
extracting action parameters, operation position coordinate data and first resolution data from the simulated Bluetooth test instruction;
acquiring second resolution data of a second terminal, and calculating a screen display proportional relationship between the first terminal and the second terminal according to the first resolution data and the second resolution data;
and converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data serving as target operation position coordinate data.
Further, determining the motion parameter and the target operation position coordinate data according to the simulated bluetooth test instruction further comprises:
and extracting action parameters and converted operation position coordinate data from the simulated Bluetooth test instruction, and taking the converted operation position coordinate data as target operation position coordinate data.
According to still another aspect of the embodiments of the present application, there is provided a terminal software testing device based on bluetooth, including:
the pairing connection module is used for responding to Bluetooth pairing operation executed by a user and pairing and connecting the first terminal and the second terminal in a Bluetooth mode;
the display module is used for displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested;
the first test module is used for responding to the test operation executed by the user on the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
According to still another aspect of the embodiments of the present application, there is provided a terminal software testing device based on bluetooth, including:
the instruction receiving module is used for receiving an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal;
the second test module is used for determining action parameters and target operation position coordinate data according to the simulated Bluetooth test instruction; and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
According to another aspect of embodiments of the present application, there is provided a computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the Bluetooth-based terminal software testing method.
According to still another aspect of the embodiments of the present application, there is provided a computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to a bluetooth-based terminal software testing method as described above.
According to the Bluetooth-based terminal software testing method and device, the first terminal and the second terminal are paired and connected in a Bluetooth mode through responding to Bluetooth pairing operation executed by a user; displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested; responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction. According to the method, the mobile terminal is connected with the computer end through Bluetooth by using a Bluetooth function widely integrated in the terminal, and then an analog Bluetooth instruction signal is sent from the computer end, so that verification of relevant functions and performances of software to be tested in the mobile terminal is realized; the mobile terminal can be controlled after receiving the simulated Bluetooth test instruction through the built-in auxiliary touch function of the mobile terminal without modifying the permission of the developer of the mobile terminal.
The foregoing description is merely an overview of the technical solutions of the embodiments of the present application, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present application can be more clearly understood, and the following specific implementation of the embodiments of the present application will be more clearly understood.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the examples of the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for testing Bluetooth-based terminal software according to one embodiment of the present application;
fig. 2 is a schematic flow chart of a method for testing bluetooth-based terminal software according to another embodiment of the present application;
FIG. 3 shows a block diagram of a Bluetooth-based terminal software testing device, according to one embodiment of the present application;
FIG. 4 shows a block diagram of a Bluetooth-based terminal software testing device according to another embodiment of the present application;
FIG. 5 illustrates a structural schematic diagram of a computing device according to one embodiment of the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First, terms related to one or more embodiments of the present application will be explained.
Service discovery protocol (service discovery protocol, SDP): the system is a core protocol in a Bluetooth protocol system, is an important component of a Bluetooth system, and is the basis of all user modes. In bluetooth systems, clients can only obtain device information, service information and service features through a service discovery protocol, and can establish a connection with each other on the basis of the device information, the service information and the service features. Through this protocol, the application can discover which services are available and what the nature of the services is.
Universal serial bus (Universal Serial Bus, USB): is an external bus standard for standardizing the connection and communication between a computer and external equipment, and is applied to interface technology in the PC field; including various forms such as USB data lines, USB HUBs (USB HUB), etc.
General (generics): is to allow the use of type-shape parameters in defining classes, interfaces, methods; wherein, this type parameter will be dynamically specified when declaring variables, creating objects, calling methods, i.e. the actual type parameter is entered (also called the incoming type parameter); the type of the incoming type argument must be the reference type.
Suspension navigation: the multifunctional suspension button software is practical, is a mode of mobile phone navigation operation, is very useful when a large-screen mobile phone is used by a single hand, and integrates multiple functions including return, main screen, latest task, screen locking, one-key optimization, common APP and the like, and is convenient and fast.
Fig. 1 shows a flow chart of a method for testing bluetooth-based terminal software according to an embodiment of the present application, which is applicable to a first terminal, as shown in fig. 1, and the method includes the following steps:
step S101: and responding to Bluetooth pairing operation executed by the user, and pairing and connecting the first terminal and the second terminal in a Bluetooth mode.
In this embodiment, the first terminal may be a test verification initiator, for example, a computer end, an ipad end, etc.; the second terminal may be a terminal such as a mobile terminal that needs to perform function and performance test verification, for example, a mobile phone.
In this step, taking the first terminal as a computer terminal and the second terminal as a mobile terminal as an example, the user can turn on the bluetooth functions of the computer terminal and the mobile terminal, find the bluetooth name of the mobile terminal through the bluetooth search function of the computer terminal, initiate a bluetooth pairing request, and the computer terminal pair and connect the computer terminal and the mobile terminal in a bluetooth manner in response to the bluetooth pairing operation executed by the user.
Step S102: displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested.
In this step, the object to be detected may be an APP icon of the software to be detected, a touch button corresponding to each service function in the software to be detected, and the like. After the first terminal and the second terminal are connected in a pairing manner, a display interface of the second terminal is displayed in the first terminal, wherein an area for displaying the display interface of the second terminal in the first terminal is called a preset display area, the preset display area can be specifically an area on the right side of the first terminal, and the first resolution data of the preset display area and the second resolution data of the second terminal can be the same or different, and the preset display area is not limited herein.
In an alternative embodiment, the method further comprises: installing a Bluetooth keyboard simulator into the first terminal in response to a Bluetooth keyboard simulator installation operation performed by a user for the first terminal; and responding to the Bluetooth keyboard simulator setting operation executed by the user, adding the pre-written mouse control data into the Bluetooth service discovery protocol file, and modifying the data transmission method in the Bluetooth keyboard simulator.
It should be noted that, the user may execute the installation operation of the bluetooth keyboard simulator (Bluetooth Keyboard Emulator) through the first terminal, install the bluetooth keyboard simulator into the first terminal (i.e. on the computer end), and increase the support for the mouse pointer signal by modifying the SDP protocol of the bluetooth at the computer end; in response to a bluetooth keyboard simulator setting operation performed by a user, pre-written mouse manipulation data is added to a bluetooth service discovery protocol file "serial port dictionary" under a bluetooth keyboard simulator installation directory.
In an alternative embodiment, the mouse manipulation data is composed from keyboard manipulation data in a bluetooth keyboard simulator. Specifically, a file with a file name of "hidroportdescriptor. Txt" is found under the installation directory, in which keyboard manipulation data can be seen, and mouse manipulation data is written according to a format of the keyboard manipulation data, where the mouse manipulation data is as follows:
let bytes:[Int8]=
0b10100001,//0DATA INPUT(HIDP Bluetooth)
-0b01011111,
0x02,//0Report ID
Action,//0 moves the cursor only, 1 clicks the left button of the mouse, 2 clicks the middle button of the mouse, 3 clicks the right button of the mouse
Rel X,// X axis coordinates
Rel Y,// Y axis coordinates
0x00/scroll
Added to the SDP protocol file serialport dictionary.
In the above instruction, an Action refers to an Action parameter of the mouse, when an Action is 0, it means that only the cursor is moved, when an Action is 1, it means that a left button of the mouse is clicked, when an Action is 2, it means that a middle button of the mouse is clicked, when an Action is 3, it means that a right button of the mouse is clicked, and in the pressing process, all actions of the mouse operation are 1, and when a packet with an Action of 0 is sent, the Action is regarded as a releasing operation.
In an alternative embodiment, the method for modifying data transmission in a bluetooth keyboard simulator further includes: the data transmission method in the Bluetooth keyboard simulator is modified into a universal method.
In this embodiment, the data transmission only supports [ Uint8] parameters, where Uint8 is an unsigned 8-bit binary integer, specifically, in response to a bluetooth keyboard simulator setup operation performed by a user, a data transmission (sendBytes) method in the bluetooth keyboard simulator is modified, and the data transmission method in the bluetooth keyboard simulator is modified to a generic method, so as to implement that the bluetooth keyboard simulator can support a simulated mouse signal transmission instruction, that is, support transmission of a simulated bluetooth test instruction, specifically, the data transmission method can be modified by an instruction "sendBytes (channel: iobluetooth 2 c channel, _bytes: [ T ])".
Step S103: responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode.
In an alternative embodiment, step S103 further includes: responding to test operation executed by a user for an object to be tested, and generating a simulated Bluetooth test instruction through a Bluetooth keyboard simulator according to operation data of the test operation; and transmitting the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode by a data transmission method in the Bluetooth keyboard simulator so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
In an alternative embodiment, step S103 further includes: acquiring action parameters and operation position coordinate data from operation data of test operation; and generating a simulated Bluetooth test instruction according to the action parameters and the operation position coordinate data.
In an alternative embodiment, first resolution data of the preset display area may be obtained, and an analog bluetooth test instruction including the action parameter, the operation position coordinate data, and the first resolution data may be generated. After the second terminal receives the instruction, the operation position coordinate data can be converted according to the first resolution data and the second resolution data of the second terminal, so that the converted operation position coordinate data can be suitable for the second terminal, the position corresponding to the test action can be accurately determined, and verification of relevant functions and performances of software to be tested in the second terminal is realized.
Taking the mobile terminal with the second terminal as the android system as an example, unlike a USB connection mode, the auxiliary touch function built in the mobile terminal can be started first, specifically, through the android system: the system and update system navigation mode > suspension navigation is started, a black dot appears on the mobile terminal after the suspension navigation is started successfully, and when the suspension navigation button appears, the user can execute operations through the mobile terminal including: dragging suspension navigation to a handy position; clicking suspension navigation, and returning to the previous stage; double-click suspension navigation returns to two stages; after long-time pressing suspension navigation, loosening the fingers and returning to the desktop; press the hover navigation and slide left or right to view tasks in background operation, etc.
After the auxiliary touch function is started, a sendMouse method can be defined in the second terminal through the following instructions, and the sendMouse method is used for receiving an analog Bluetooth test instruction sent by the first terminal, so that operation control of the second terminal is achieved:
Func sendMouse(Action:Int8.RelX:Int8,Rel Y:Int8)
sendData(bytes:hidMouseReport(Action Action,Rel X:Rel X.Rel Y:Rel Y)。
in the step, a test operation executed by a user for an object to be tested in a first terminal is responded, and a simulated Bluetooth test instruction is generated through a Bluetooth keyboard simulator according to operation data of the test operation; and transmitting a simulated Bluetooth test instruction to the mobile terminal in a Bluetooth mode through a generalized data transmission method in the Bluetooth keyboard simulator, wherein operation data of test operation comprise Action parameters (actions) and operation position coordinate data, the Action and the operation position coordinate data are extracted, first resolution data of a preset display area are obtained, and the simulated Bluetooth test instruction comprising the Action parameters, the operation position coordinate data and the first resolution data is generated.
Further, determining a preset display area of the first terminal, for example, a full screen or a partial display area of the first terminal as a preset display area of the test operation; and acquiring first resolution data of a preset display area, and generating a simulated Bluetooth test instruction containing action parameters, operation position coordinate data and the first resolution data.
In another alternative embodiment, the first terminal may also generate an analog bluetooth test instruction containing the converted operation position coordinate data, and then send the analog bluetooth test instruction to the second terminal, without the second terminal converting the operation position coordinate data. Specifically, first resolution data of a preset display area and second resolution data of a second terminal are obtained; calculating a screen display proportion relation between the first terminal and the second terminal according to the first resolution data and the second resolution data; converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data; and generating a simulated Bluetooth test instruction containing the action parameters and the converted operation position coordinate data.
Specifically, according to the first resolution data of the preset display area of the first terminal (such as a computer end) and the second resolution data of the second terminal (such as a mobile terminal); calculating a screen display proportional relationship between the first terminal and the second terminal; converting the operation position coordinate data according to the screen display proportion relation, converting the operation position coordinate data into an absolute position of the mobile terminal, and determining the absolute position as converted operation position coordinate data; and generating an analog Bluetooth test instruction containing the action parameters and the converted operation position coordinate data, and sending the analog Bluetooth test instruction to the second terminal, wherein after the second terminal receives the analog Bluetooth test instruction, the second terminal does not need to convert the operation position coordinate data, because the operation position coordinate data in the analog Bluetooth test instruction is converted at the first terminal.
According to the Bluetooth-based terminal software testing method provided by the embodiment of the application, the first terminal and the second terminal are paired and connected in a Bluetooth mode by responding to Bluetooth pairing operation executed by a user; displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested; responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction. According to the method, the mobile terminal is connected with the computer end through Bluetooth by using a Bluetooth function widely integrated in the terminal, and then an analog Bluetooth instruction signal is sent from the computer end, so that verification of relevant functions and performances of software to be tested in the mobile terminal is realized; the support of the mouse pointer signal is increased by modifying the SDP protocol of the Bluetooth of the computer terminal; the mobile terminal can be controlled after receiving the simulated Bluetooth test instruction through the built-in auxiliary touch function of the mobile terminal without modifying the permission of the developer of the mobile terminal.
Fig. 2 is a flow chart of a method for testing bluetooth-based terminal software according to another embodiment of the present application, which is applicable to a second terminal, as shown in fig. 2, and the method includes the following steps:
step S201: and receiving an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal.
In this step, the bluetooth name of the first terminal may be found by the bluetooth search function of the second terminal and the bluetooth pairing request may be initiated, or the bluetooth name of the second terminal may be found by the bluetooth search function of the first terminal and the bluetooth pairing request may be initiated. And according to the Bluetooth pairing request, the first terminal and the second terminal are paired and connected in a Bluetooth mode.
Taking the mobile terminal with the second terminal as the android system as an example, in this step, the built-in auxiliary touch function of the mobile terminal may be started first, specifically, through the android system: the system and update system navigation mode > suspension navigation is started, a black dot appears on the mobile terminal after the suspension navigation is started successfully, and when the suspension navigation button appears, the user can execute operations through the mobile terminal including: dragging suspension navigation to a handy position; clicking suspension navigation, and returning to the previous stage; double-click suspension navigation returns to two stages; after long-time pressing suspension navigation, loosening the fingers and returning to the desktop; pressing the suspension navigation and sliding leftwards or rightwards to check tasks in background operation and the like; and calling a data receiving method (such as a sendMouse method) to receive an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal.
Step S202: and determining the action parameters and the coordinate data of the target operation position according to the simulated Bluetooth test instruction.
Specifically, when the Action parameter (Action) is 0, it means that only the cursor is moved, when the Action is 1, it means that the left button of the mouse is clicked, when the Action is 2, it means that the middle button of the mouse is clicked, when the Action is 3, it means that the right button of the mouse is clicked, and in the pressing process, all the actions of the mouse operation are 1, and when the package with the Action of 0 is sent, the operation is regarded as a loosening operation; in this step, the motion parameter and the target operation position coordinate data are determined.
In an alternative embodiment, step S202 further includes: extracting action parameters, operation position coordinate data and first resolution data from the simulated Bluetooth test instruction; acquiring second resolution data of a second terminal, and calculating a screen display proportional relationship between the first terminal and the second terminal according to the first resolution data and the second resolution data; and converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data serving as target operation position coordinate data.
In another alternative embodiment, step S202 further includes: and extracting action parameters and converted operation position coordinate data from the simulated Bluetooth test instruction, and taking the converted operation position coordinate data as target operation position coordinate data. Specifically, after the auxiliary touch function is started, the second terminal can acquire the simulated Bluetooth test instruction sent by the first terminal through the sendMouse method, and extract the action parameters and the operation position coordinate data or the converted operation position coordinate data from the simulated Bluetooth test instruction. If the operation position coordinate data is extracted, the second terminal needs to convert the operation position coordinate data to obtain converted operation position coordinate data serving as target operation position coordinate data, and then the to-be-tested object of the to-be-tested software is tested according to the simulated Bluetooth test instruction; if the converted operation position coordinate data is extracted, the second terminal can directly take the converted operation position coordinate data as target operation position coordinate data so as to test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
Step S203: and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
After determining the action parameters and the target operation position coordinate data, executing actions corresponding to the action parameters at positions corresponding to the target operation position coordinate data to realize the test of the object to be tested of the software to be tested
According to the Bluetooth-based terminal software testing method provided by the embodiment of the application, after the mobile terminal is connected with the computer terminal through Bluetooth by using a Bluetooth function widely integrated in the terminal, an auxiliary touch function in the mobile terminal is utilized to receive a simulated Bluetooth instruction signal sent by the computer terminal, and according to the simulated Bluetooth testing instruction, action parameters and target operation position coordinate data are determined, actions corresponding to the action parameters are executed at positions corresponding to the target operation position coordinate data, and verification of relevant functions and performances of software to be tested in the mobile terminal is realized. The mobile terminal can be controlled after receiving the simulated Bluetooth test instruction through the built-in auxiliary touch function of the mobile terminal without modifying the permission of the developer of the mobile terminal.
Fig. 3 shows a block diagram of a bluetooth-based terminal software testing device according to an embodiment of the present application, and as shown in fig. 3, the device includes: a mating connection module 301, a presentation module 302 and a first test module 303.
The pairing connection module 301 is configured to pair and connect the first terminal and the second terminal in a bluetooth manner in response to a bluetooth pairing operation performed by a user.
The display module 302 is configured to display a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested.
The first test module 303 is configured to respond to a test operation performed by a user on an object to be tested, generate a simulated bluetooth test instruction according to operation data of the test operation, and send the simulated bluetooth test instruction to the second terminal in a bluetooth manner, so that the second terminal tests the object to be tested of the software to be tested according to the simulated bluetooth test instruction.
In an alternative embodiment, the first test module 303 is further configured to: responding to test operation executed by a user for an object to be tested, and generating a simulated Bluetooth test instruction through a Bluetooth keyboard simulator according to operation data of the test operation; and transmitting the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode through a data transmission method in the Bluetooth keyboard simulator.
In an alternative embodiment, the apparatus further comprises a mounting module for mounting the bluetooth keyboard simulator into the first terminal in response to a bluetooth keyboard simulator mounting operation performed by the user for the first terminal; and responding to the Bluetooth keyboard simulator setting operation executed by the user, adding the pre-written mouse control data into the Bluetooth service discovery protocol file, and modifying the data transmission method in the Bluetooth keyboard simulator.
In an alternative embodiment, the mouse manipulation data is composed from keyboard manipulation data in a bluetooth keyboard simulator.
In an alternative embodiment, the mounting module is further configured to: the data transmission method in the Bluetooth keyboard simulator is modified into a universal method.
In an alternative embodiment, the first test module 303 is further configured to: acquiring action parameters and operation position coordinate data from operation data of test operation; and generating a simulated Bluetooth test instruction according to the action parameters and the operation position coordinate data.
In an alternative embodiment, the first test module 303 is further configured to: and acquiring first resolution data of a preset display area, and generating a simulated Bluetooth test instruction containing action parameters, operation position coordinate data and the first resolution data.
In an alternative embodiment, the first test module 303 is further configured to: acquiring first resolution data of a preset display area and second resolution data of a second terminal; calculating a screen display proportion relation between the first terminal and the second terminal according to the first resolution data and the second resolution data; converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data; and generating a simulated Bluetooth test instruction containing the action parameters and the converted operation position coordinate data.
The above descriptions of the modules refer to the corresponding descriptions in the method embodiments, and are not repeated herein.
According to the Bluetooth-based terminal software testing device provided by the embodiment of the application, the first terminal and the second terminal are paired and connected in a Bluetooth mode by responding to Bluetooth pairing operation executed by a user; displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested; responding to the test operation executed by the user for the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction. The device uses the Bluetooth function widely integrated in the terminal, after the mobile terminal is connected with the computer end through Bluetooth, an analog Bluetooth instruction signal is sent from the computer end, so that verification of relevant functions and performances of software to be tested in the mobile terminal is realized, and the device can connect the mobile terminal with the computer end through Bluetooth without other equipment; the support of the mouse pointer signal is increased by modifying the SDP protocol of the Bluetooth of the computer terminal; the mobile terminal can be controlled after receiving the simulated Bluetooth test instruction through the built-in auxiliary touch function of the mobile terminal without modifying the permission of the developer of the mobile terminal.
Fig. 4 shows a block diagram of a bluetooth-based terminal software testing device according to another embodiment of the present application, and as shown in fig. 4, the device includes: an instruction receiving module 401 and a second testing module 402.
The instruction receiving module 401 is configured to receive an analog bluetooth test instruction sent by the first terminal through a bluetooth manner by using an auxiliary touch function in the second terminal.
In an alternative embodiment, the instruction receiving module 401 is further configured to: and calling a data receiving method to receive a simulated Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal.
The second test module 402 is configured to determine, according to the simulated bluetooth test instruction, an action parameter and target operation position coordinate data; and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
In an alternative embodiment, the second test module 402 is further configured to: extracting action parameters, operation position coordinate data and first resolution data from the simulated Bluetooth test instruction; acquiring second resolution data of a second terminal, and calculating a screen display proportional relationship between the first terminal and the second terminal according to the first resolution data and the second resolution data; and converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data serving as target operation position coordinate data.
In an alternative embodiment, the second test module 402 is further configured to: and extracting action parameters and converted operation position coordinate data from the simulated Bluetooth test instruction, and taking the converted operation position coordinate data as target operation position coordinate data.
According to the Bluetooth-based terminal software testing device provided by the embodiment of the application, after the mobile terminal is connected with the computer terminal through Bluetooth by using a Bluetooth function widely integrated in the terminal, an auxiliary touch function in the mobile terminal is utilized to receive a simulated Bluetooth instruction signal sent by the computer terminal, and according to the simulated Bluetooth testing instruction, action parameters and target operation position coordinate data are determined, actions corresponding to the action parameters are executed at positions corresponding to the target operation position coordinate data, so that verification of relevant functions and performances of software to be tested in the mobile terminal is realized, and the mobile terminal can be connected with the computer terminal through Bluetooth without other equipment; the support of the mouse pointer signal is increased by modifying the SDP protocol of the Bluetooth of the computer terminal; the mobile terminal can be controlled after receiving the simulated Bluetooth test instruction through the built-in auxiliary touch function of the mobile terminal without modifying the permission of the developer of the mobile terminal.
The embodiment of the application also provides a nonvolatile computer storage medium, and the computer storage medium stores at least one executable instruction, wherein the executable instruction can execute the Bluetooth-based terminal software testing method in any of the method embodiments.
FIG. 5 illustrates a schematic diagram of a computing device, and embodiments of the present application are not limited to a particular implementation of a computing device.
As shown in fig. 5, the computing device may include: a processor 502, a communication interface (Communications Interface) 504, a memory 506, and a communication bus 508.
Wherein:
processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described embodiment of the testing method for bluetooth-based terminal software.
In particular, program 510 may include program code including computer-operating instructions.
The processor 502 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors included by the computing device may be the same type of processor, such as one or more CPUs; but may also be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. Memory 506 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may be specifically configured to cause the processor 502 to perform the bluetooth-based terminal software testing method in any of the method embodiments described above. The specific implementation of each step in the program 510 may refer to corresponding steps and corresponding descriptions in the units in the above embodiment of the bluetooth-based terminal software testing method, which are not repeated herein. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus and modules described above may refer to corresponding procedure descriptions in the foregoing method embodiments, which are not repeated herein.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the embodiments of the present application as described herein, and the above description of specific languages is provided for disclosure of enablement and best mode of the embodiments of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the above description of exemplary embodiments of the application, various features of embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed embodiments of the application claim more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application embodiment.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of embodiments of the present application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
The various component embodiments of the present embodiments may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of the functionality of some or all of the components according to embodiments of the present application may be implemented in practice using a microprocessor or Digital Signal Processor (DSP). Embodiments of the present application may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the embodiments of the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the embodiments of the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.

Claims (15)

1. A terminal software testing method based on Bluetooth comprises the following steps:
responding to Bluetooth pairing operation executed by a user, and pairing and connecting the first terminal and the second terminal in a Bluetooth mode;
displaying a display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested;
responding to the test operation executed by the user on the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
2. The method of claim 1, wherein the generating, in response to the test operation performed by the user on the object to be tested, the simulated bluetooth test instruction according to the operation data of the test operation, and sending the simulated bluetooth test instruction to the second terminal in a bluetooth manner further comprises:
responding to the test operation executed by the user for the object to be tested, and generating the simulated Bluetooth test instruction through a Bluetooth keyboard simulator according to the operation data of the test operation;
And transmitting the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode through a data transmission method in the Bluetooth keyboard simulator.
3. The method of claim 2, wherein prior to the generating, by a bluetooth keyboard simulator, the simulated bluetooth test instruction according to operation data of the test operation in response to the test operation performed by the user for the object under test, the method further comprises:
installing the Bluetooth keyboard simulator into the first terminal in response to Bluetooth keyboard simulator installation operation performed by the user for the first terminal;
and responding to the Bluetooth keyboard simulator setting operation executed by the user, adding the pre-written mouse control data into a Bluetooth service discovery protocol file, and modifying a data transmission method in the Bluetooth keyboard simulator.
4. The method of claim 3, wherein the mouse manipulation data is written in accordance with keyboard manipulation data in the bluetooth keyboard simulator.
5. The method of claim 3, wherein said modifying the data transmission method in the bluetooth keyboard simulator further comprises:
And modifying the data transmission method in the Bluetooth keyboard simulator into a generalized method.
6. The method of any of claims 1-5, wherein generating simulated bluetooth test instructions from the operational data of the test operation further comprises:
acquiring action parameters and operation position coordinate data from the operation data of the test operation;
and generating the simulated Bluetooth test instruction according to the action parameters and the operation position coordinate data.
7. The method of claim 6, wherein the generating the simulated bluetooth test instruction from the action parameter and the operational position coordinate data further comprises:
and acquiring first resolution data of the preset display area, and generating a simulated Bluetooth test instruction comprising the action parameter, the operation position coordinate data and the first resolution data.
8. The method of claim 6, wherein the generating the simulated bluetooth test instruction from the action parameter and the operational position coordinate data further comprises:
acquiring first resolution data of the preset display area and second resolution data of the second terminal;
Calculating a screen display proportional relationship between the first terminal and the second terminal according to the first resolution data and the second resolution data;
converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data;
and generating a simulated Bluetooth test instruction containing the action parameters and the converted operation position coordinate data.
9. A terminal software testing method based on Bluetooth comprises the following steps:
receiving an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal;
determining action parameters and target operation position coordinate data according to the simulated Bluetooth test instruction;
and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
10. The method of claim 9, wherein the determining action parameters and target operational position coordinate data according to the simulated bluetooth test instructions further comprises:
extracting action parameters, operation position coordinate data and first resolution data from the simulated Bluetooth test instruction;
Acquiring second resolution data of the second terminal, and calculating a screen display proportional relationship between a first terminal and the second terminal according to the first resolution data and the second resolution data;
and converting the operation position coordinate data according to the screen display proportion relation to obtain converted operation position coordinate data serving as the target operation position coordinate data.
11. The method of claim 9, wherein the determining action parameters and target operational position coordinate data according to the simulated bluetooth test instructions further comprises:
and extracting action parameters and converted operation position coordinate data from the simulated Bluetooth test instruction, and taking the converted operation position coordinate data as the target operation position coordinate data.
12. A bluetooth-based terminal software testing device, comprising:
the pairing connection module is used for responding to Bluetooth pairing operation executed by a user and pairing and connecting the first terminal and the second terminal in a Bluetooth mode;
the display module is used for displaying the display interface of the second terminal in a preset display area of the first terminal; the display interface of the second terminal comprises an object to be tested of the software to be tested;
The first test module is used for responding to the test operation executed by the user on the object to be tested, generating a simulated Bluetooth test instruction according to the operation data of the test operation, and sending the simulated Bluetooth test instruction to the second terminal in a Bluetooth mode so that the second terminal can test the object to be tested of the software to be tested according to the simulated Bluetooth test instruction.
13. A bluetooth-based terminal software testing device, comprising:
the instruction receiving module is used for receiving an analog Bluetooth test instruction sent by the first terminal in a Bluetooth mode by utilizing an auxiliary touch function in the second terminal;
the second test module is used for determining action parameters and target operation position coordinate data according to the simulated Bluetooth test instruction; and executing the action corresponding to the action parameter at the position corresponding to the target operation position coordinate data.
14. A computing device, comprising: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus;
the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform operations corresponding to a bluetooth-based terminal software testing method according to any one of claims 1-11.
15. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to a bluetooth based terminal software testing method according to any one of claims 1 to 11.
CN202211697441.2A 2022-12-28 2022-12-28 Bluetooth-based terminal software testing method and device Pending CN116028356A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211697441.2A CN116028356A (en) 2022-12-28 2022-12-28 Bluetooth-based terminal software testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211697441.2A CN116028356A (en) 2022-12-28 2022-12-28 Bluetooth-based terminal software testing method and device

Publications (1)

Publication Number Publication Date
CN116028356A true CN116028356A (en) 2023-04-28

Family

ID=86090795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211697441.2A Pending CN116028356A (en) 2022-12-28 2022-12-28 Bluetooth-based terminal software testing method and device

Country Status (1)

Country Link
CN (1) CN116028356A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117098106A (en) * 2023-10-18 2023-11-21 合肥联宝信息技术有限公司 Bluetooth testing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117098106A (en) * 2023-10-18 2023-11-21 合肥联宝信息技术有限公司 Bluetooth testing method and device, electronic equipment and storage medium
CN117098106B (en) * 2023-10-18 2023-12-29 合肥联宝信息技术有限公司 Bluetooth testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
TWI453603B (en) Platform independent information handling system, communication method, and computer program product thereof
CA2495024C (en) System and method for adaptable provisioning of generic application content
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN111400172B (en) Program debugging method and device
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
US10078609B1 (en) Virtualizing a non-USB device as a USB device
CN114564203A (en) Service operation method and device, electronic equipment and readable medium
CN111427569A (en) Installation-free program adapting method and device, electronic equipment and storage medium
US20190235881A1 (en) Automatic Import Of Third Party Analytics
CN116028356A (en) Bluetooth-based terminal software testing method and device
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
KR100704358B1 (en) Connecting system-level functionality of domestic OS of mobile phone to any application OS
CN106815150B (en) Server-side interface test system and method
CN108282542A (en) Remote operation method and device for test equipment
CN116306396A (en) Chip verification method and device, equipment and medium
WO2020221090A1 (en) Method for use in combined operation of guest applications, and device
CN113391860B (en) Service request processing method and device, electronic equipment and computer storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium
CN111078562A (en) Interface test method, terminal device and computer readable storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN112256252B (en) Interface generation method and device, storage medium and electronic equipment
US10747707B1 (en) Redirection of USB devices in nested hub environments
CN112612550A (en) File configuration method and device

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