Automated testing systems and methods

By using data packet interaction between the script execution end, server end, and Bluetooth simulation end in the automated testing system, the problem of the inability to automate the testing of Bluetooth device interaction functions in apps was solved, thus improving testing efficiency.

CN116028367BActive Publication Date: 2025-12-02SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310031259.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-10
Publication Date
2025-12-02
Estimated Expiration
2043-01-10

AI Technical Summary

Technical Problem

In existing technologies, app testing scenarios involving interaction with Bluetooth devices cannot be automated, resulting in low testing efficiency.

Method used

An automated testing system is provided, comprising a script execution terminal, a server terminal, and a Bluetooth simulation terminal. It achieves automated simulation and feedback control of Bluetooth devices and automates the execution process of scripts through data packet interaction.

Benefits of technology

The app testing process for Bluetooth device interaction functions has been automated, improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116028367B_ABST
    Figure CN116028367B_ABST
Patent Text Reader

Abstract

This application relates to an automated testing system and method, belonging to the field of software testing technology. The system includes: a script execution terminal, used to parse the executed automated script, send target Bluetooth device setting information to a server based on the parsed test configuration, and control the execution process of the automated script based on feedback information in the corresponding second data packet returned by the server; a server, used to push the target Bluetooth device setting information to a Bluetooth simulation terminal, and receive feedback information from the Bluetooth simulation terminal regarding the target Bluetooth device setting information, and send it to the script execution terminal; and a Bluetooth simulation terminal, used to simulate the target device based on the received target Bluetooth device setting information and feed back the simulation results to the server. This technical solution can automatically implement the relevant testing processes for apps involving interaction with Bluetooth devices, which is beneficial to improving the efficiency of testing work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of software testing technology, specifically relating to an automated testing system and method. Background Technology

[0002] Currently, with the development of mobile internet and electronic information technology, mobile smart terminals have been widely used in various industries based on the specific functions realized by apps.

[0003] In the testing phase of app development, many testing scenarios require interaction with external Bluetooth devices, such as acquiring or outputting information via Bluetooth. Currently, in such scenarios, manual configuration of the Bluetooth devices is required for the tests to proceed correctly. This prevents automation of the app testing process and leads to low testing efficiency.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] To at least partially overcome the problems existing in related technologies, this application provides an automated testing system and method. The technical solution, based on specific system composition and configuration, addresses the technical problem that automated testing cannot be achieved in the testing implementation of apps that involve interaction with Bluetooth devices.

[0006] To achieve the above objectives, this application adopts the following technical solution:

[0007] First aspect

[0008] This application provides an automated testing system, which includes:

[0009] The script execution end is used to parse the automated script being executed, send a first data packet containing the target Bluetooth device settings information in the configuration to the server based on the parsed test configuration, and control the execution process of the automated script based on the feedback information in the corresponding second data packet returned by the server.

[0010] The server is used to push the target Bluetooth device setting information contained in the first data packet to the Bluetooth emulator, and to receive the feedback information from the Bluetooth emulator regarding the target Bluetooth device setting information, generate a second data packet including the feedback information, and send it to the script execution terminal.

[0011] The Bluetooth emulator is used to simulate the target device based on the received target Bluetooth device settings information, and then send the simulation results back to the server as feedback.

[0012] Optionally, the script execution terminal is specifically configured as follows:

[0013] When the feedback information in the second data packet indicates that the target device is ready, the control automation script proceeds to the next execution operation;

[0014] When the feedback information in the second data packet indicates that the target device has failed to prepare, the control automation script stops executing and outputs an error message.

[0015] Optionally, the script execution terminal is located on a first computing device configured with a Bluetooth module;

[0016] The Bluetooth emulation terminal is installed on a second computing device equipped with a Bluetooth module.

[0017] Optionally, the first computing device is a smartphone.

[0018] Optionally, the server is also located on the second computing device.

[0019] Optionally, the second computing device has multiple Bluetooth modules, and the first data packet also includes identification information of the Bluetooth modules in the second computing device;

[0020] The server is specifically configured to push the target Bluetooth device setting information and Bluetooth module identification information contained in the first data packet to the second computing device, so that the second computing device can use the corresponding Bluetooth module to simulate the target Bluetooth device.

[0021] Optionally, the target Bluetooth device may include: a Bluetooth printer, a Bluetooth scale.

[0022] Secondly, this application also provides an automated testing method, which is applied to the automated testing system described in any of the above claims, and the testing method includes:

[0023] The script execution end parses the executed automated script, sends a first data packet containing the target Bluetooth device settings information in the configuration to the server according to the parsed test configuration, and controls the execution process of the automated script according to the feedback information in the corresponding second data packet returned by the server.

[0024] The server pushes the target Bluetooth device setting information contained in the first data packet to the Bluetooth emulator, and receives the feedback information from the Bluetooth emulator regarding the target Bluetooth device setting information, generates a second data packet including the feedback information, and sends it to the script execution terminal.

[0025] The Bluetooth simulator simulates the target device based on the received target Bluetooth device settings information and sends the simulation results back to the server as feedback.

[0026] The application employs the above technical solution and has at least the following beneficial effects:

[0027] The automated testing system provided in this application includes: a script execution terminal, used to parse the executed automated script, send a first data packet containing the target Bluetooth device setting information in the configuration to the server according to the parsed test configuration, and control the execution process of the automated script according to the feedback information in the corresponding second data packet returned by the server; a server, used to push the target Bluetooth device setting information contained in the first data packet to the Bluetooth simulation terminal, and receive the feedback information from the Bluetooth simulation terminal regarding the target Bluetooth device setting information, generate a second data packet including the feedback information, and send it to the script execution terminal; and a Bluetooth simulation terminal, used to simulate the target device according to the received target Bluetooth device setting information, and feed back the simulation result information to the server as feedback information. In the technical solution of this application, the system consists of a script execution terminal, a server, and a Bluetooth simulation terminal. Based on specific configurations, the various parts of the system interact during testing, which can automatically realize the relevant testing process of apps involving interaction with Bluetooth devices, thereby improving the efficiency of testing work.

[0028] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained by means of the structures particularly pointed out in the following description, claims, and drawings. Attached Figure Description

[0029] The accompanying drawings are used to provide a further understanding of the technical solutions of this application or the prior art, and constitute a part of the specification. The drawings illustrating embodiments of this application, together with the embodiments of this application, are used to explain the technical solutions of this application, but do not constitute a limitation on the technical solutions of this application.

[0030] Figure 1 This is a schematic diagram of a system block diagram of an automated testing system provided in one embodiment of this application;

[0031] Figure 2 This is a schematic diagram illustrating the interaction process of an automated testing system provided in one embodiment of this application. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] As described in the background section, with the development of mobile internet and electronic information technology, mobile smart terminals have been widely used in various industries based on the specific functions implemented by apps.

[0034] In the testing phase of app development, many testing scenarios require interaction with external Bluetooth devices, such as acquiring or outputting information via Bluetooth. Currently, in such scenarios, manual configuration of the Bluetooth devices is required for the tests to proceed correctly. This prevents automation of the app testing process and leads to low testing efficiency.

[0035] In response to this, this application proposes an automated testing system, based on specific system components and configurations, to solve the technical problem that automated testing cannot be achieved in the testing implementation of apps that involve interaction with Bluetooth devices.

[0036] like Figure 1 As shown, in one embodiment, the automated testing system proposed in this application includes:

[0037] The script execution terminal 100 is used to parse the executed automated script, send a first data packet containing the target Bluetooth device setting information in the configuration to the server 200 according to the parsed test configuration, and control the execution process of the automated script according to the feedback information in the corresponding second data packet returned by the server 200.

[0038] The script execution terminal here is set on the first computing device configured with a Bluetooth module. In this embodiment, the first computing device is a smartphone, and the Bluetooth module of the smartphone corresponds to the Bluetooth module.

[0039] Server 200 is used to push the target Bluetooth device setting information contained in the first data packet to Bluetooth emulator 300, and to receive feedback information from Bluetooth emulator 300 regarding the target Bluetooth device setting information, generate a second data packet including the feedback information, and send it to script execution terminal 100.

[0040] Bluetooth emulator 300 is used to emulate the target device based on the received target Bluetooth device setting information, and to send the simulation result information (referring to a result status information) back to server 200 as feedback information.

[0041] The Bluetooth analog terminal 300 is located on a second computing device with a Bluetooth module, such as in this embodiment, where the second computing device is a computer equipped with a Bluetooth module.

[0042] Specifically, in the above process, based on different testing requirements, the types of target Bluetooth devices to be simulated include: Bluetooth printers, Bluetooth scales, etc.

[0043] Specifically, script execution terminal 100 is configured as follows:

[0044] When the feedback information in the second data packet indicates that the target device is ready, the control automation script will proceed to the next execution operation, such as initiating the Bluetooth pairing process between the Bluetooth modules of the first and second computing devices according to the script configuration.

[0045] When the feedback information in the second data packet indicates that the target device has failed to prepare, the control automation script stops executing and outputs an error message.

[0046] It's easy to understand that during the automated testing phase of some apps, it's necessary to acquire or output some information through Bluetooth-related devices (such as acquiring package weighing information from a Bluetooth scale, or sending waybill information to be printed to a Bluetooth printer). This involves relevant target Bluetooth devices (Bluetooth peripherals), and these target Bluetooth devices vary depending on the app or scenario, so they need to be dynamically configured.

[0047] In the automated testing system described in the above embodiments, the second computing device in the system is placed near the smartphone (first computing device) during automated testing (the specific distance depends on the communication range of the Bluetooth module) to facilitate Bluetooth pairing and Bluetooth communication interaction during testing. The second computing device, equipped with a Bluetooth module, can provide an interface based on the above configuration to facilitate test script invocation.

[0048] When the automated test script is executed on the script execution end, a command containing the relevant setting information of the target Bluetooth device to be simulated is sent to the server (as described in the parsing and sending process above). The server pushes the information to the Bluetooth simulation end and then returns relevant feedback to the script execution end. Once the script execution end receives the target device ready (simulation successful) command, it will continue to the next step of the automated script execution, such as performing Bluetooth pairing and Bluetooth communication to obtain the content required for automated testing.

[0049] In this way, based on the specific system configuration, the relevant testing process of apps involving interaction with Bluetooth devices can be automatically implemented through the interaction of various parts of the system during testing, which helps to improve the efficiency of testing work.

[0050] like Figure 2 The diagram shown is a schematic illustration of the interaction process of an automated testing system in another embodiment.

[0051] Based on the previous embodiments, in this embodiment, both the Bluetooth analog terminal and the server terminal are set on the second computing device with Bluetooth modules, and the second computing device has multiple Bluetooth modules.

[0052] Accordingly, based on the embodiments described above, in this embodiment, the first data packet also includes the identification information of the Bluetooth module in the second computing device;

[0053] The server 200 is specifically configured to: push the target Bluetooth device settings information and Bluetooth module identification information contained in the first data packet to the second computing device (corresponding to...). Figure 2 (See the illustrations for "Accept Bluetooth emulator number and target device model" and "Push information"), so that the second computing device can use the corresponding Bluetooth module to emulate the target Bluetooth device.

[0054] In this embodiment, the Bluetooth simulation terminal and the server are integrated on the same computing device, which is beneficial to improving the system integration; and setting up multiple Bluetooth modules is beneficial to meet the needs of specific test scenarios (such as needing to interact with different Bluetooth devices simultaneously in a certain test scenario).

[0055] In one embodiment, this application also proposes an automated testing method applied to the aforementioned automated testing system, the automated testing method comprising:

[0056] The script execution end parses the executed automated script, sends a first data packet containing the target Bluetooth device settings information in the configuration to the server according to the parsed test configuration, and controls the execution process of the automated script according to the feedback information in the corresponding second data packet returned by the server.

[0057] The server pushes the target Bluetooth device settings information contained in the first data packet to the Bluetooth emulator, and receives the feedback information from the Bluetooth emulator regarding the target Bluetooth device settings information, generates a second data packet including the feedback information, and sends it to the script execution client.

[0058] The Bluetooth simulator simulates the target device based on the received target Bluetooth device settings information and sends the simulation results back to the server as feedback.

[0059] From the perspective of pure method execution, combined with Figure 2 As shown, the method includes the following steps:

[0060] Step 1: The automated test script needs to be configured with the Bluetooth device to be connected (e.g., Bluetooth device 1) and the type of Bluetooth device to be simulated (e.g., Bluetooth device name);

[0061] Step 2: The automated script sends the device model (e.g., Bluetooth device) and device number (e.g., Bluetooth device 1) to the server, and the server pushes the information to the Bluetooth emulator.

[0062] Step 3: The Bluetooth emulator switches to the mode of the device (Bluetooth device) to be emulated based on the received information;

[0063] Step 4: Once the Bluetooth emulator is ready, it returns a success message to the server.

[0064] Step 5: The server returns the device readiness status to the automation script;

[0065] Step 6: The automation script can perform Bluetooth pairing or automated script tasks;

[0066] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An automated testing system, characterized in that, include: The script execution end is used to parse the automated script being executed, send a first data packet containing the target Bluetooth device settings information in the configuration to the server based on the parsed test configuration, and control the execution process of the automated script based on the feedback information in the corresponding second data packet returned by the server. The server is used to push the target Bluetooth device setting information contained in the first data packet to the Bluetooth emulator, and to receive the feedback information from the Bluetooth emulator regarding the target Bluetooth device setting information, generate a second data packet including the feedback information, and send it to the script execution terminal. The Bluetooth emulation terminal is used to simulate the target device based on the received target Bluetooth device settings information, and to send the simulation results back to the server as feedback information. The script execution terminal is set on the first computing device equipped with a Bluetooth module; The Bluetooth emulation terminal is installed on a second computing device equipped with a Bluetooth module.

2. The automated testing system according to claim 1, characterized in that, The script execution terminal is specifically configured as follows: When the feedback information in the second data packet indicates that the target device is ready, the control automation script proceeds to the next execution operation; When the feedback information in the second data packet indicates that the target device has failed to prepare, the control automation script stops executing and outputs an error message.

3. The automated testing system according to claim 1, characterized in that, The first computing device is a smartphone.

4. The automated testing system according to claim 1, characterized in that, The server is also located on the second computing device.

5. The automated testing system according to claim 1, characterized in that, The second computing device has multiple Bluetooth modules, and the first data packet also contains identification information of the Bluetooth modules in the second computing device; The server is specifically configured to push the target Bluetooth device setting information and Bluetooth module identification information contained in the first data packet to the second computing device, so that the second computing device can use the corresponding Bluetooth module to simulate the target Bluetooth device.

6. The automated testing system according to any one of claims 1 to 5, characterized in that, The types of target Bluetooth devices include: Bluetooth printers and Bluetooth scales.

7. An automated testing method, applied to the automated testing system according to any one of claims 1 to 6, characterized in that, include: The script execution end parses the executed automated script, sends a first data packet containing the target Bluetooth device settings information in the configuration to the server according to the parsed test configuration, and controls the execution process of the automated script according to the feedback information in the corresponding second data packet returned by the server. The server pushes the target Bluetooth device setting information contained in the first data packet to the Bluetooth emulator, and receives the feedback information from the Bluetooth emulator regarding the target Bluetooth device setting information, generates a second data packet including the feedback information, and sends it to the script execution terminal. The Bluetooth simulator simulates the target device based on the received target Bluetooth device settings information and sends the simulation results back to the server as feedback.

Citation Information

Patent Citations

  • Automatic test method and device based on Bluetooth and Bluetooth test terminal

    CN112996020A