CN115576829A - Application program testing method and device, storage medium and computer equipment - Google Patents

Application program testing method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN115576829A
CN115576829A CN202211321512.9A CN202211321512A CN115576829A CN 115576829 A CN115576829 A CN 115576829A CN 202211321512 A CN202211321512 A CN 202211321512A CN 115576829 A CN115576829 A CN 115576829A
Authority
CN
China
Prior art keywords
information
bluetooth
equipment
test
target
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
CN202211321512.9A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211321512.9A priority Critical patent/CN115576829A/en
Publication of CN115576829A publication Critical patent/CN115576829A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses an application program testing method, an application program testing device, a storage medium and computer equipment, wherein the method comprises the following steps: the method comprises the steps of obtaining equipment operation information of input equipment, transmitting the equipment operation information to a target Bluetooth keyboard simulator, determining a Bluetooth operation instruction sent to terminal equipment based on the equipment operation information, sending the Bluetooth operation instruction to mobile equipment through Bluetooth connection of the target Bluetooth keyboard simulator and the mobile equipment, and triggering the mobile equipment to test according to the Bluetooth operation instruction. According to the application, the target Bluetooth keyboard simulator is installed on the auxiliary testing device, the device operation information of the input device is converted into the Bluetooth operation instruction, the Bluetooth operation instruction is transmitted to the mobile device, the test of the application program on the mobile device is completed, and the more flexible and convenient effect is achieved.

Description

Application program testing method and device, storage medium and computer equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application program testing method, apparatus, storage medium, and computer device.
Background
At present, due to the rapid development of living standards, people's demands for mobile phones are continuously improved, and the demands of users are not as simple as the demands of calls in the past any more, but various applications on the screen of the mobile device are used to meet various demands of the users, so that higher demands are put on the mobile device and the applications on the screen of the mobile device, and especially under some special scenes, the mobile device needs to be tested in advance in order to better meet the demands of the users.
In the prior art, a solution is provided for performing a function test on an application program of a mobile device through a computer, in which the mobile device is usually connected directly to the computer through a USB data line, but this approach may cause a disadvantage of being inflexible.
Disclosure of Invention
The embodiment of the invention provides an application program testing method, an application program testing device, a storage medium and computer equipment, and aims to realize flexible testing of an application program of mobile equipment.
In order to solve the above technical problem, an embodiment of the present invention provides an application program testing method, applied to an auxiliary testing apparatus, where the auxiliary testing apparatus is connected to a mobile device through bluetooth, and a target bluetooth keyboard simulator is installed in the auxiliary testing apparatus, where the method includes:
acquiring equipment operation information of input equipment, wherein the equipment operation information comprises an operation position and operation action information of the input equipment on a screen of the auxiliary testing device;
transmitting the device operation information to the target Bluetooth keyboard simulator, wherein the target Bluetooth keyboard simulator is provided with device report structure information, and the device report structure information is matched with the keyboard report structure information format of the target Bluetooth keyboard simulator and is used for realizing the support of the device operation information in the target Bluetooth keyboard simulator;
determining a Bluetooth operation instruction sent to the terminal device based on the device operation information, wherein the Bluetooth operation instruction comprises test operation position indication information and test operation action indication information of the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
and the Bluetooth operation instruction is sent to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and the mobile equipment is triggered to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operation instruction.
In order to solve the above technical problem, an embodiment of the present invention further provides an application program testing apparatus, which is applied to an auxiliary testing apparatus, the auxiliary testing apparatus is connected to the mobile device through bluetooth, and a target bluetooth keyboard simulator is installed in the auxiliary testing apparatus, and the apparatus includes:
the device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring device operation information of an input device, and the device operation information comprises an operation position and operation action information of the input device on a screen of the auxiliary test device;
the transmission unit is used for transmitting the equipment operation information to the target Bluetooth keyboard simulator, device report structure information is arranged in the target Bluetooth keyboard simulator, the device report structure information is matched with a keyboard report structure information format of the target Bluetooth keyboard simulator, and the transmission unit is used for realizing the support of the equipment operation information in the target Bluetooth keyboard simulator;
a determining unit, configured to determine, based on the device operation information, a bluetooth operation instruction sent to the terminal device, where the bluetooth operation instruction includes test operation position indication information and test operation action indication information of the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
and the sending unit is used for sending the Bluetooth operating instruction to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and triggering the mobile equipment to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operating instruction.
There may also be provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the computer program.
In some embodiments of the invention, a computer-readable storage medium may also be provided, having stored thereon a computer program which, when run on a computer, causes the computer to perform the steps of the method as described above.
In the application, because the target Bluetooth keyboard simulator is installed on the auxiliary test equipment, the target Bluetooth keyboard simulator can convert the device operation information of the input device into the Bluetooth operation instruction which can be received and sent by the target Bluetooth keyboard simulator, and because the auxiliary test device is connected with the mobile device through Bluetooth, the Bluetooth keyboard simulator can send the Bluetooth operation instruction to the mobile device through the Bluetooth connection of the auxiliary test device and the mobile device, so that the mobile device completes the operation required by the test.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a testing principle of an application program according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an application testing method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an application testing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an application program testing method and device, computer equipment and a storage medium.
The following are detailed descriptions. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
An application program testing method provided in an embodiment of the present invention is applied to an auxiliary testing apparatus, the auxiliary testing apparatus is connected to the mobile device through bluetooth, a target bluetooth keyboard simulator 101 shown in fig. 1 is installed in the auxiliary testing apparatus, as shown in fig. 2, a process of the application program testing method may be as follows:
201. acquiring equipment operation information of input equipment, wherein the equipment operation information comprises an operation position and operation action information of the input equipment on a screen of the auxiliary test device;
in this embodiment, the auxiliary testing device may be a computer, or may be other testing devices such as ipad, etc., and the present application is not limited thereto, and the mobile device may be a mobile phone, or may be other testing devices, and the present application is also not limited thereto.
In this embodiment, the auxiliary test device is installed with a target bluetooth keyboard simulator, and the target bluetooth keyboard simulator of this embodiment can be improved based on a common bluetooth keyboard simulator.
In this embodiment, the type and specific structure of the input device are not shown, the connection between the input device and the auxiliary testing apparatus may be wireless or wired, and the embodiment is also not limited, for example, the input device may be a mouse, a tablet, or the like.
In this embodiment, a specific method for acquiring device operation information is provided, and optionally, the step "acquiring device operation information of an input device" may include: displaying an operation window of the target Bluetooth keyboard simulator, receiving an operation of the input device on the operation window, determining an operation position and operation action information of the input device on the operation window of the target Bluetooth keyboard simulator based on the operation to obtain device operation information, and determining a Bluetooth operation instruction sent to the terminal device based on the device operation information, wherein the method comprises the following steps: and based on the mapping relation between the window size of the operation window and the screen size of the mobile equipment, converting the operation position in the equipment operation information into the operation position on the screen of the mobile equipment to obtain test operation position indication information, and taking the operation action information in the equipment operation information as the test operation action indication information to obtain a Bluetooth operation instruction sent to the terminal equipment.
When the target Bluetooth keyboard simulator runs, an operation window can be displayed on a screen of the device for operation. The device operation of the input device can be done in the operation window so that the tester can find the position of the cursor of the device on the screen accurately.
In one example, before or after the target bluetooth keyboard emulator displays the operation window, a screen size (e.g., an aspect ratio) of the mobile device connected to the auxiliary test apparatus may be acquired, and the window size (e.g., a window aspect ratio) of the operation window may be adjusted based on the screen size. Optionally, the aspect ratio of the operation window is consistent with the aspect ratio of the screen size. Facilitating the simplification of subsequent coordinate mapping steps.
The operation window can be kept consistent with the screen state (such as a horizontal screen and a vertical screen) of the mobile device, the target bluetooth keyboard simulator can acquire the screen state of the mobile device through a bluetooth module of the terminal, and when the screen state is switched, the length-width ratio of the operation window, the screen coordinate mapping relation between the operation window and the mobile device and the like are correspondingly switched.
Optionally, after obtaining the screen size of the mobile device, two sets of mapping schemes may be set, one set corresponding to the horizontal screen and one set corresponding to the vertical screen, where each set of mapping scheme includes a window size of an operation window of the auxiliary testing apparatus and a screen coordinate mapping relationship (used for mapping coordinates of the operation window to coordinates on the screen of the mobile device). When the mobile equipment switches horizontal and vertical screens, the target Bluetooth keyboard simulator can adopt a corresponding mapping scheme to switch the mapping relation between the coordinates of the window and the screen.
For example, for the example where the input device is a mouse, the device operation information refers to operation information of the mouse. In one example, the operation information of the mouse may be operation information of a mouse pointer in an operation window of the target bluetooth keyboard simulator, and specifically, the operation information of the mouse may include an operation position and an operation action of the mouse pointer on the operation window of the target bluetooth keyboard simulator.
On the other hand, the operation information of the mouse may also be operation information of a mouse pointer on a screen of the auxiliary test device, and specifically, the operation information of the mouse includes an operation position and an operation action of the mouse pointer on the screen of the auxiliary test device.
202. Transmitting the device operation information to the target Bluetooth keyboard simulator, wherein the target Bluetooth keyboard simulator is provided with device report structure information, and the device report structure information is matched with the keyboard report structure information format of the target Bluetooth keyboard simulator and is used for realizing the support of the device operation information in the target Bluetooth keyboard simulator;
in this embodiment, the report structure is present in a file of the high priority descriptor.txt in the installation directory of the target bluetooth keyboard emulator, and is dedicated to storing and transmitting data.
In this embodiment, the SDP protocol is an application layer control protocol used to describe a multimedia session, and provides a description of the multimedia session for the purposes of session announcement, session invitation, and other forms of multimedia session initialization; it is a text-based protocol, which ensures that the protocol is scalable and thus has a wide range of applications, and the SDP protocol is a completely session description format, which does not belong to the transport protocol, and which uses only different appropriate transport protocols, including the Session Announcement Protocol (SAP), the Session Initiation Protocol (SIP), the real-time streaming protocol (RTSP), the MIME extension protocol e-mail, and the hypertext transfer protocol (HTTP). SDP does not support negotiation of session content or media coding, so only media information is described in streaming media, and media negotiation is implemented using RTSP.
In this embodiment, device report structure information corresponding to an external access device is obtained, the device report structure information is matched with a keyboard report structure information format of the target bluetooth keyboard simulator, an installation directory of the target bluetooth keyboard simulator is obtained, and the device report structure information corresponding to the external access device is written into an sdp protocol file of the target bluetooth keyboard simulator based on the keyboard report structure information format of the target bluetooth keyboard simulator.
In view of realizing the signal support of the target Bluetooth keyboard simulator to the mouse pointer, the application provides a specific realization method.
For example, a file of the hidreportdescriptor.txt is found in an installation directory of the target bluetooth keyboard simulator, a report structure of the target bluetooth keyboard simulator under the file is obtained, and a report structure format of the mouse is compiled according to the report structure format of the target bluetooth keyboard simulator, wherein the structure body is as follows:
Figure BDA0003910736900000061
plist is added to the sdp protocol file serialportdictionary.
Because the sdp protocol of the target Bluetooth keyboard simulator is modified, the signal support of the target Bluetooth keyboard simulator to the mouse pointer is realized.
203. Determining a Bluetooth operation instruction sent to the terminal device based on the device operation information, wherein the Bluetooth operation instruction comprises test operation position indication information and test operation action indication information of the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
in this embodiment, invoking a preset method for sending an analog signal of an input device to obtain simulated device operation information, and transmitting the device operation information to the target bluetooth keyboard simulator includes: and sending the simulated equipment operation information to the target Bluetooth keyboard simulator through the preset input equipment simulation signal sending method.
The step of determining the Bluetooth operation instruction sent to the terminal device based on the device operation information refers to calling a preset input device simulation signal sending method on the basis of obtaining operation information of a mouse pointer on a screen of the auxiliary test device, and converting the operation information into the Bluetooth operation instruction which can be identified by a target Bluetooth keyboard simulator.
The step of determining the Bluetooth operation instruction sent to the terminal equipment based on the equipment operation information refers to calling a preset input equipment simulation signal sending method on the basis of obtaining operation information of a mouse pointer on a screen of a target Bluetooth keyboard simulator, and converting the operation information into the Bluetooth operation instruction which can be recognized by the target Bluetooth keyboard simulator.
In one example, the operation position of the mouse pointer on the screen of the auxiliary test device is constituted by a combination of an abscissa and an ordinate of the mouse pointer on the screen of the auxiliary test device.
In one example, the operation action of the mouse pointer on the screen of the auxiliary test device includes clicking of the mouse pointer, releasing of the mouse pointer, and dragging of the mouse pointer, wherein the dragging of the mouse pointer can be represented by the clicking of the mouse pointer and the releasing of the mouse pointer.
In one example, the operation position of the mouse pointer on the screen of the target bluetooth keyboard simulator is constituted by a combination of an abscissa and an ordinate of the mouse pointer corresponding on the screen of the target bluetooth keyboard simulator.
In one example, the operation action of the mouse pointer on the screen of the target bluetooth keyboard simulator includes clicking of the mouse pointer, releasing of the mouse pointer, and dragging of the mouse pointer, wherein the dragging of the mouse pointer can be represented by the clicking of the mouse pointer and the releasing of the mouse pointer.
In the present embodiment, the conversion of the positional relationship is obtained by the size ratio mapping between the screens, and the conversion of the Action relationship is obtained by converting the Action of the input device into the Action value.
The simulation method of the device operation position information is to map the operation position of a mouse pointer on a screen of the auxiliary test device into an abscissa and an ordinate which can be recognized by a target Bluetooth keyboard simulator, wherein the abscissa is represented by a value of X, and the ordinate is represented by a value of Y.
The method for simulating the equipment operation Action information comprises the steps of mapping operation actions of a mouse pointer on a screen of an auxiliary testing device into Action instructions which can be recognized by a target Bluetooth keyboard simulator, wherein the Action instructions are represented by Action values, when the Action values are 0, a mouse pointer is moved, the working state of a default mouse pointer is released, when the Action values are 1, the mouse pointer is clicked, the working state of the default mouse pointer is clicked, and correspondingly, the mouse pointer can represent the dragging Action of the mouse pointer by the combination of the values of a plurality of actions.
The method for simulating the device operation position information comprises the step of mapping the operation position of a mouse pointer on a screen of the target Bluetooth keyboard simulator into an abscissa and an ordinate which can be recognized by the target Bluetooth keyboard simulator, wherein the abscissa is represented by a value X, and the ordinate is represented by a value Y.
The method for simulating the equipment operation Action information comprises the steps of mapping operation actions of a mouse pointer on a screen of a target Bluetooth keyboard simulator into Action instructions which can be recognized by the target Bluetooth keyboard simulator, wherein the Action instructions are represented by Action values, when the Action values are 0, a mouse pointer is moved, the working state of a default mouse pointer is released at the moment, when the Action values are 1, the mouse pointer is clicked, the working state of the default mouse pointer is clicked, and correspondingly, the mouse pointer can represent the dragging Action of the mouse pointer by the combination of the values of a plurality of actions.
204. And the Bluetooth operation instruction is sent to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and the mobile equipment is triggered to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operation instruction.
In this embodiment, the target bluetooth keyboard simulator sends the bluetooth operation instruction to the bluetooth module of the auxiliary test device based on the target data sending method, and the target data sending method in the target bluetooth keyboard simulator is changed from the sendBytes method to the generic method, which is set because the generic method after modification can support the sending of the simulated mouse signal, that is, the target bluetooth keyboard simulator can send the bluetooth operation instruction to the mobile device.
In view of the data transfer via a bluetooth connection, a specific implementation is provided.
In this embodiment, the bluetooth of the auxiliary test device and the bluetooth of the mobile device are turned on, the bluetooth signal of the mobile device is found through bluetooth search, after bluetooth pairing is set, bluetooth connection between the auxiliary test device and the mobile device is realized, the bluetooth module includes a first bluetooth module and a second bluetooth module, the first bluetooth module is located at the bluetooth end of the auxiliary test device, and the second bluetooth module is located at the bluetooth end of the mobile device, so that the target bluetooth keyboard simulator transmits a bluetooth operation instruction to the second bluetooth module in the mobile device through the first bluetooth module.
In this embodiment, the mobile device has turned on a preset auxiliary function 102 as shown in fig. 3, where the preset auxiliary function is used for performing touch operation on a screen of the terminal device in response to a bluetooth operation instruction of the input device.
In consideration of different starting modes of touch functions of different mobile devices, the application provides a specific solution.
The auxiliary touch control function is realized by the auxiliary touch control part arranged in the mobile equipment, and the mobile equipment is divided into apple equipment and android equipment.
In an example, the auxiliary touch function of the apple device needs to be set up first, a preset auxiliary function in the set up is found, after clicking, a touch character pattern appears, after clicking again, the preset auxiliary function character pattern appears, and after clicking is completed, the apple device is clicked to be opened, and a black dot appears on the apple device.
In an example, the system and the updating are needed to be firstly started to realize the auxiliary touch function of the android device, a system navigation mode is found, the suspension navigation is clicked, and the starting is carried out, and a black dot appears on the android device after the starting is successful.
In view of converting device operation information into test operation indication information that can be recognized by the mobile device, the present application provides two solutions.
In an example, since the mobile device starts the auxiliary touch function, the operation position and the operation action information in the device operation information are respectively used as the test operation position indication information and the test operation action indication information, and the bluetooth operation instruction sent to the terminal device is obtained.
The target Bluetooth keyboard simulator directly sends operation position information and operation action information in the equipment operation information to the mobile equipment, and the mobile equipment can identify the equipment operation information which is not converted and test according to the identified equipment operation information.
In an example, based on a mapping relation between a screen size of the auxiliary testing device and a screen size of the mobile device, an operation position in the device operation information is converted into an operation position on a screen of the mobile device to obtain test operation position indication information, and a bluetooth operation instruction sent to the terminal device is obtained by taking operation action information in the device operation information as the test operation action indication information.
The target Bluetooth keyboard simulator converts operation positions and operation action information in equipment operation information into test operation indication information which can be identified by mobile equipment, wherein the test operation indication information comprises the test operation position indication information and the test operation action indication information, and the mobile equipment carries out testing according to the identified test operation indication information.
The mobile device realizes the operation of the application program on the screen of the mobile device according to the Bluetooth operation instruction sent by the auxiliary test device, and the solution is provided in order to realize that the operation result of the mobile device can be fed back to the auxiliary test device after the operation.
In an example, the mobile device sends screenshot information of the mobile device to the auxiliary test device through the second bluetooth module, then the auxiliary test device displays the received screenshot information of the mobile device on a screen of the auxiliary test, and judges whether a test result of the mobile device meets expectations or not according to the screenshot information, so as to judge whether related services are normal or not.
In an example, an operation window is set on a target bluetooth simulation installed on the auxiliary test device, and the operation window can display a real-time page state of the mobile device, and according to the real-time page state of the mobile device displayed by the operation window, whether a test result of the mobile device meets an expectation is judged, so as to judge whether a related service is normal.
In this embodiment, because the target bluetooth keyboard simulator is installed on the auxiliary test equipment, the target bluetooth keyboard simulator can convert the device operation information of the input device into a bluetooth operation instruction which can be received and sent by the target bluetooth keyboard simulator, and because the auxiliary test device is connected with the mobile device through bluetooth, the bluetooth keyboard simulator can send the bluetooth operation instruction to the mobile device through the bluetooth connection between the auxiliary test device and the mobile device, so that the mobile device completes the operation required by the test.
In order to better implement the above method, correspondingly, an embodiment of the present invention further provides a transfer device application testing apparatus, which is applied to an auxiliary testing apparatus, the auxiliary testing apparatus is connected to the mobile device through bluetooth, and a target bluetooth keyboard simulator is installed in the auxiliary testing apparatus, and referring to fig. 3, the apparatus includes:
an acquisition unit 301 configured to acquire device operation information of an input device, the device operation information including an operation position and operation action information of the input device on a screen of an auxiliary test apparatus;
a transmission unit 302, configured to transmit the device operation information to the target bluetooth keyboard simulator;
a determining unit 303, configured to send the bluetooth operation instruction to the mobile device through the bluetooth connection between the target bluetooth keyboard simulator and the mobile device;
and a sending unit 304, configured to trigger the mobile device to perform a test according to the test operation position indication information and the test operation action indication information of the bluetooth operation instruction.
In some embodiments of the present invention, the obtaining unit 301 is configured to obtain an operation position and operation action information of an input device on a screen of an auxiliary apparatus, including the operation position and operation action information of the input device on an operation window of a target bluetooth keyboard simulator; acquiring device operation information of an input device, specifically comprising: displaying an operation window of the target Bluetooth keyboard simulator, receiving the operation of the input equipment on the operation window, determining the operation position and the operation action information of the input equipment on the operation window of the target Bluetooth keyboard simulator based on the operation, and obtaining equipment operation information; determining a bluetooth operation instruction to be sent to the terminal device based on the device operation information, comprising: and converting the operation position in the equipment operation information into an operation position on the screen of the mobile equipment based on the mapping relation between the window size of the operation window and the screen size of the mobile equipment to obtain test operation position indication information, and taking the operation action information in the equipment operation information as the test operation action indication information to obtain a Bluetooth operation instruction sent to the terminal equipment.
In an embodiment of the present invention, the transmission unit 302 is configured to implement support of a target bluetooth keyboard emulator on a signal of an external access device by changing report structure information of the external access device, and specifically includes: acquiring device report structure information corresponding to an external access device, wherein the device report structure information is matched with a keyboard report structure information format of the target Bluetooth keyboard simulator;
and acquiring an installation directory of the target Bluetooth keyboard simulator, and writing device report structure information corresponding to the external access device into an sdp protocol file of the target Bluetooth keyboard simulator based on a keyboard report structure information format of the target Bluetooth keyboard simulator.
In some embodiments of the present invention, the determining unit 303 obtains the simulated device operation information by invoking a preset input device simulation signal sending method, and the sending the device operation information to the target bluetooth keyboard simulator includes: and sending the simulated equipment operation information to the target Bluetooth keyboard simulator through the preset input equipment simulation signal sending method.
In some embodiments of the present invention, the sending unit 304 is configured to trigger the mobile device to perform a test according to the test operation position indication information and the test operation action indication information of the bluetooth operation instruction. The specific method is that the target Bluetooth keyboard simulator sends the Bluetooth operation instruction to a Bluetooth module of the auxiliary test device based on the target data sending method, and the Bluetooth module sends the Bluetooth operation instruction to the mobile equipment.
The method comprises the steps that test operation position indication information of Bluetooth operation instructions is used for determining an operation position when the terminal determines test touch operation, and the test operation action indication information is used for determining an operation action at the operation position when the terminal determines the test touch operation, wherein the operation position and the operation action information in the equipment operation information are respectively used as the test operation position indication information and the test operation action indication information to obtain the Bluetooth operation instructions sent to the terminal equipment, or the operation position in the equipment operation information is converted into an operation position on a mobile equipment screen based on the mapping relation between the screen size of an auxiliary test device and the screen size of the mobile equipment to obtain the test operation position indication information, and the operation action information in the equipment operation information is used as the test operation action indication information to obtain the Bluetooth operation instructions sent to the terminal equipment.
In this embodiment, the target bluetooth keyboard simulator is installed on the auxiliary test equipment by setting the obtaining unit, the transmission unit, the determining unit and the sending unit, and the target bluetooth keyboard simulator can convert the device operation information of the input device into a bluetooth operation instruction which can be received and sent by the target bluetooth keyboard simulator, and because the auxiliary test device is connected with the mobile device through bluetooth, the bluetooth keyboard simulator can send the bluetooth operation instruction to the mobile device through bluetooth connection between the auxiliary test device and the mobile device, so that the mobile device completes the operation required by the test.
In addition, an embodiment of the present invention further provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 4, which shows a schematic structural diagram of the computer device according to the embodiment of the present invention, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads an executable file corresponding to a process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, so as to implement various functions, as follows:
acquiring equipment operation information of input equipment, wherein the equipment operation information comprises an operation position and operation action information of the input equipment on a screen of the auxiliary testing device;
transmitting the device operation information to the target Bluetooth keyboard simulator, wherein the target Bluetooth keyboard simulator is provided with device report structure information, and the device report structure information is matched with the keyboard report structure information format of the target Bluetooth keyboard simulator and is used for realizing the support of the device operation information in the target Bluetooth keyboard simulator;
determining a Bluetooth operation instruction sent to the terminal device based on the device operation information, wherein the Bluetooth operation instruction comprises test operation position indication information and test operation action indication information of the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
and the Bluetooth operation instruction is sent to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and the mobile equipment is triggered to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operation instruction.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the method provided in various alternative implementations in the embodiment of the present invention.
According to an aspect of the application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations in the embodiments described above.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in the method provided by the embodiment of the present invention, the beneficial effects that can be achieved by the method provided by the embodiment of the present invention can be achieved, for details, see the foregoing embodiments, and are not described herein again.
The application program testing method, the application program testing device, the computer device and the storage medium provided by the embodiment of the invention are described in detail, a specific example is applied in the description to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for those skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as limiting the present invention.

Claims (10)

1. An application program testing method is applied to an auxiliary testing device, the auxiliary testing device is connected with a mobile device through Bluetooth, a target Bluetooth keyboard simulator is installed in the auxiliary testing device, and the method comprises the following steps:
acquiring equipment operation information of input equipment, wherein the equipment operation information comprises operation positions and operation action information of the input equipment on a screen of an auxiliary testing device;
transmitting the device operation information to the target Bluetooth keyboard simulator, wherein device report structure information is arranged in the target Bluetooth keyboard simulator, and the device report structure information is matched with a keyboard report structure information format of the target Bluetooth keyboard simulator and is used for realizing the support of the device operation information in the target Bluetooth keyboard simulator;
determining a Bluetooth operation instruction sent to the terminal device based on the device operation information, wherein the Bluetooth operation instruction comprises test operation position indication information and test operation action indication information on the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
and sending the Bluetooth operation instruction to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and triggering the mobile equipment to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operation instruction.
2. The application testing method of claim 1, further comprising:
acquiring device report structure information corresponding to an external access device, wherein the device report structure information is matched with a keyboard report structure information format of the target Bluetooth keyboard simulator;
and acquiring the target Bluetooth keyboard simulator installation directory, and writing device report structure information corresponding to the external access device into an sdp protocol file of the target Bluetooth keyboard simulator based on a keyboard report structure information format of the target Bluetooth keyboard simulator.
3. The application test method of claim 1, wherein a target data transmission method is provided in the bluetooth keyboard emulator, the target data transmission method supporting transmission of a bluetooth operation instruction converted from device operation information, the transmission of the bluetooth operation instruction to the mobile device through a bluetooth connection of the target bluetooth keyboard emulator with the mobile device, comprising:
sending, by the target bluetooth keyboard simulator, the bluetooth operation instruction to a bluetooth module of the auxiliary test device based on the target data sending method;
and sending the Bluetooth operation instruction to the mobile equipment through the Bluetooth module.
4. The application testing method of claim 1, wherein a preset auxiliary function is started in the mobile device, and the preset auxiliary function is used for performing touch operation on a screen of a terminal device in response to a bluetooth operation instruction of the input device;
the test operation position indication information of the Bluetooth operation instruction is used for the terminal to determine the operation position during test touch operation, and the test operation action indication information is used for the terminal to determine the operation action at the operation position during test touch operation.
5. The application testing method according to any one of claims 1 to 4, wherein the operation position and operation action information of the input device on the screen of the auxiliary device comprises the operation position and operation action information of the input device on the operation window of the target Bluetooth keyboard simulator;
the acquiring device operation information of the input device includes:
displaying an operation window of the target Bluetooth keyboard simulator;
receiving the operation of the input equipment on an operation window, and determining the operation position and the operation action information of the input equipment on the operation window of the target Bluetooth keyboard simulator based on the operation to obtain equipment operation information;
the determining the bluetooth operation instruction sent to the terminal device based on the device operation information includes:
and converting the operation position in the equipment operation information into an operation position on a screen of the mobile equipment based on the mapping relation between the window size of the operation window and the screen size of the mobile equipment to obtain test operation position indication information, and taking the operation action information in the equipment operation information as the test operation action indication information to obtain a Bluetooth operation instruction sent to the terminal equipment.
6. The application program testing method according to any one of claims 1 to 4, wherein the acquiring device operation information of the input device includes:
calling a preset input equipment analog signal sending method to obtain the simulated equipment operation information;
the transmitting the device operation information to the target bluetooth keyboard simulator includes:
and sending the simulated equipment operation information to the target Bluetooth keyboard simulator through the preset input equipment simulation signal sending method.
7. The application program testing method according to any one of claims 1 to 4, wherein the determining the Bluetooth operation instruction sent to the terminal device based on the device operation information comprises:
respectively taking the operation position and the operation action information in the equipment operation information as test operation position indication information and test operation action indication information to obtain a Bluetooth operation instruction sent to the terminal equipment;
or based on the mapping relation between the screen size of the auxiliary testing device and the screen size of the mobile equipment, converting the operation position in the equipment operation information into the operation position on the screen of the mobile equipment to obtain test operation position indication information, and taking the operation action information in the equipment operation information as the test operation action indication information to obtain a Bluetooth operation instruction sent to the terminal equipment.
8. An application testing apparatus, comprising:
the device comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring device operation information of an input device, and the device operation information comprises an operation position and operation action information of the input device on a screen of the auxiliary test device;
the transmission unit is used for transmitting the equipment operation information to the target Bluetooth keyboard simulator, device report structure information is arranged in the target Bluetooth keyboard simulator, and the device report structure information is matched with a keyboard report structure information format of the target Bluetooth keyboard simulator and used for realizing the support of the equipment operation information in the target Bluetooth keyboard simulator;
a determining unit, configured to determine, based on the device operation information, a bluetooth operation instruction sent to the terminal device, where the bluetooth operation instruction includes test operation position indication information and test operation action indication information of the mobile device, the test operation position indication information is determined based on the operation position, and the test operation action indication information is based on the operation action information;
and the sending unit is used for sending the Bluetooth operation instruction to the mobile equipment through the Bluetooth connection between the target Bluetooth keyboard simulator and the mobile equipment, and triggering the mobile equipment to test according to the test operation position indication information and the test operation action indication information of the Bluetooth operation instruction.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when the computer program is run on a computer, causes the computer to carry out the steps of the method according to any one of claims 1 to 7.
CN202211321512.9A 2022-10-26 2022-10-26 Application program testing method and device, storage medium and computer equipment Pending CN115576829A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211321512.9A CN115576829A (en) 2022-10-26 2022-10-26 Application program testing method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211321512.9A CN115576829A (en) 2022-10-26 2022-10-26 Application program testing method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN115576829A true CN115576829A (en) 2023-01-06

Family

ID=84587926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211321512.9A Pending CN115576829A (en) 2022-10-26 2022-10-26 Application program testing method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN115576829A (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
CN108984064B (en) Split screen display method and device, storage medium and electronic equipment
CN108039963B (en) Container configuration method and device and storage medium
CN109062468B (en) Split screen display method and device, storage medium and electronic equipment
CN110166439B (en) Equipment sharing method, terminal, router and server
CN109756767B (en) Preview data playing method, device and storage medium
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN104657211A (en) Method and equipment used for operating target application on corresponding equipment
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN108958629B (en) Split screen quitting method and device, storage medium and electronic equipment
CN106776301B (en) Subelement testing method and device
CN108984142B (en) Split screen display method and device, storage medium and electronic equipment
CN110908627A (en) Screen projection method and first electronic device
CN114281288A (en) Screen projection processing method and device and electronic equipment
CN115576829A (en) Application program testing method and device, storage medium and computer equipment
CN114489350B (en) Input method calling method and related equipment
CN106330672B (en) Instant messaging method and system
CN109062469B (en) Split screen display method and device, storage medium and electronic equipment
CN114327087A (en) Input event processing method and device, electronic equipment and storage medium
CN105631059B (en) Data processing method, data processing device and data processing system
WO2016019695A1 (en) Voice interaction method and terminal
CN113407169A (en) Software development method and device
CN107038024B (en) Operation configuration method and equipment thereof
CN111447598A (en) Interaction method and display device
WO2015117550A1 (en) Method and apparatus for acquiring reverberated wet sound
CN110874143B (en) Sensor data acquisition method, intelligent terminal, storage medium and electronic 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