CN116028367A - Automatic test system and method - Google Patents

Automatic test system and method Download PDF

Info

Publication number
CN116028367A
CN116028367A CN202310031259.1A CN202310031259A CN116028367A CN 116028367 A CN116028367 A CN 116028367A CN 202310031259 A CN202310031259 A CN 202310031259A CN 116028367 A CN116028367 A CN 116028367A
Authority
CN
China
Prior art keywords
bluetooth
data packet
target
server
information
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
CN202310031259.1A
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 Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network 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 Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202310031259.1A priority Critical patent/CN116028367A/en
Publication of CN116028367A publication Critical patent/CN116028367A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The system comprises a script execution end, a target Bluetooth device setting information sending end, a second data packet and a control end, wherein the script execution end is used for analyzing an executed automation script, and the execution process of the automation script is controlled according to the feedback information in the second data packet correspondingly returned by the server; the server side is used for pushing the target Bluetooth equipment setting information to the Bluetooth simulation side, receiving feedback information fed back by the Bluetooth simulation side aiming at the target Bluetooth equipment setting information, and sending the feedback information to the script execution side; and the Bluetooth simulation end is used for simulating the target equipment according to the received target Bluetooth equipment setting information and feeding back simulation result information to the server. According to the technical scheme, the related testing process related to the app with the interaction function of the Bluetooth equipment can be automatically realized, and the efficiency of testing work is improved.

Description

Automatic test system and method
Technical Field
The application belongs to the technical field of software testing, and particularly relates to an automatic testing system and method.
Background
Currently, with the development of mobile internet and electronic information technology, mobile intelligent terminals have been widely used in various industries based on specific functions realized by the carried app.
In the test link of app development, interaction with some external bluetooth devices is required in many test scenarios, for example, some information needs to be acquired or output through the bluetooth devices. In the related art, when the test scene is met, related personnel are required to manually set the Bluetooth equipment to realize normal test, so that the automatic test cannot be realized in the test link of the app as a whole, and the test work efficiency is low.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
In order to overcome the problems in the related art to at least a certain extent, the application provides an automatic test system and an automatic test method, and in the technical scheme, the technical problem that an app related to an interaction function with Bluetooth equipment cannot realize automatic test in test implementation is solved based on specific system composition and configuration.
In order to achieve the above purpose, the present application adopts the following technical scheme:
first aspect
The application provides an automated test system, the system comprising:
the script execution end is used for analyzing the executed automation script, sending a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controlling the execution process of the automation script according to the feedback information in a second data packet correspondingly returned by the server;
the server side is used for pushing the target Bluetooth equipment setting information contained in the first data packet to the Bluetooth simulation side, receiving feedback information fed back by the Bluetooth simulation side aiming at the target Bluetooth equipment setting information, generating a second data packet comprising the feedback information, and sending the second data packet to the script execution side;
and the Bluetooth simulation end is used for simulating the target equipment according to the received target Bluetooth equipment setting information and feeding back simulation result information as feedback information to the server.
Optionally, the script execution end is specifically configured to:
when the feedback information in the second data packet is ready for the target equipment, controlling the automation script to perform the next execution operation;
and when the feedback information in the second data packet fails to prepare for the target equipment, controlling the automation script to stop executing, and outputting error reporting information.
Optionally, the script execution end is arranged on a first computing device configured with a bluetooth module;
the Bluetooth simulation end is arranged on a second computing device provided with a Bluetooth module.
Optionally, the first computing device is a smartphone.
Optionally, the server is also disposed on the second computing device.
Optionally, the plurality of bluetooth modules of the second computing device are provided, and the first data packet further includes identification information of the bluetooth modules in the second computing device;
the server is specifically configured to: and pushing the target Bluetooth equipment setting information and the identification information of the Bluetooth module contained in the first data packet to a second computing device so that the second computing device adopts the corresponding Bluetooth module to simulate the target Bluetooth equipment.
Optionally, the types of the target bluetooth device include: bluetooth printer, bluetooth title.
In a second aspect, the present application further provides an automated testing method, the testing method being applied to the automated testing system described in any one of the above, the testing method comprising:
the script execution end analyzes the executed automation script, sends a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controls the execution process of the automation script according to feedback information in a second data packet correspondingly returned by the server;
the server side pushes the target Bluetooth equipment setting information contained in the first data packet to a Bluetooth simulation end, receives feedback information fed back by the Bluetooth simulation end aiming at the target Bluetooth equipment setting information, generates a second data packet comprising the feedback information, and sends the second data packet to a script execution end;
and the Bluetooth simulation end simulates the target equipment according to the received target Bluetooth equipment setting information, and feeds back simulation result information as feedback information to the server.
The application adopts the technical scheme, possesses following beneficial effect at least:
an automated testing system provided herein includes: the script execution end is used for analyzing the executed automation script, sending a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controlling the execution process of the automation script according to the feedback information in a second data packet correspondingly returned by the server; the server side is used for pushing the target Bluetooth equipment setting information contained in the first data packet to the Bluetooth simulation side, receiving feedback information fed back by the Bluetooth simulation side aiming at the target Bluetooth equipment setting information, generating a second data packet comprising the feedback information, and sending the second data packet to the script execution side; and the Bluetooth simulation end is used for simulating the target equipment according to the received target Bluetooth equipment setting information and feeding back simulation result information as feedback information to the server. In the technical scheme of the application, the system is composed of the script execution end, the service end and the Bluetooth simulation end, and based on specific configuration, all parts of the system interact in the test, so that the related test flow of the app related to the interaction function with the Bluetooth equipment can be automatically realized, and the efficiency of the test work is improved.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the technical aspects or prior art of the present application and constitute a part of this specification. The drawings, which are used to illustrate the technical solution of the present application, together with the embodiments of the present application, but do not limit the technical solution of the present application.
FIG. 1 is a schematic block diagram of an automated test system according to one embodiment of the present application;
FIG. 2 is a schematic illustration of the interaction process of an automated test system provided in one embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, based on the examples herein, which are within the scope of the protection sought by those of ordinary skill in the art without undue effort, are intended to be encompassed by the present application.
As described in the background art, currently, mobile intelligent terminals have been widely used in various industries along with the development of mobile internet and electronic information technology based on specific functions implemented by the carried app.
In the test link of app development, interaction with some external bluetooth devices is required in many test scenarios, for example, some information needs to be acquired or output through the bluetooth devices. In the related art, when the test scene is met, related personnel are required to manually set the Bluetooth equipment to realize normal test, so that the automatic test cannot be realized in the test link of the app as a whole, and the test work efficiency is low.
Aiming at the problem, the application provides an automatic test system which is based on specific system composition and configuration to solve the technical problem that an app related to the interaction function with Bluetooth equipment cannot realize automatic test in test implementation.
As shown in fig. 1, in an embodiment, an automated test system proposed in the present application includes:
the script execution end 100 is configured to parse the executed automation script, send a first data packet containing the setting information of the target bluetooth device in the configuration to the server end 200 according to the parsed test configuration, and control the execution process of the automation script according to the feedback information in the second data packet correspondingly returned by the server end 200;
the script execution end is arranged on a first computing device configured with a Bluetooth module, and in the embodiment, the first computing device is a smart phone, and the Bluetooth module of the mobile phone is correspondingly a Bluetooth module;
the server 200 is configured to push the target bluetooth device setting information included in the first data packet to the bluetooth analog end 300, receive feedback information fed back by the bluetooth analog end 300 for the target bluetooth device setting information, generate a second data packet including the feedback information, and send the second data packet to the script execution end 100;
the bluetooth simulation end 300 is configured to perform target device simulation according to the received target bluetooth device setting information, and feedback simulation result information (refer to a result state information) as feedback information to the server 200;
the bluetooth analog terminal 300 is disposed on a second computing device having a bluetooth module, such as a computer configured with a bluetooth module in this embodiment.
Specifically, in the above process, based on different test requirements, the types of the target bluetooth devices to be simulated include: bluetooth printer, bluetooth scale, etc.
Specifically, the script execution terminal 100 is specifically configured to:
when the feedback information in the second data packet is ready for the target equipment, controlling the automation script to perform the next execution operation, such as initiating a Bluetooth pairing flow between Bluetooth modules of the first computing device and the second computing device according to script configuration;
and when the feedback information in the second data packet fails to prepare for the target equipment, controlling the automation script to stop executing, and outputting error reporting information.
It is easy to understand that in the automatic testing phase of some apps, some information needs to be obtained or output through bluetooth related devices (for example, package weighing information is obtained from a bluetooth scale, for example, waybill information to be printed is sent to a bluetooth printer, etc.), which all involve related target bluetooth devices (bluetooth peripherals), and these target bluetooth devices are different according to different apps or scenes, so dynamic setting is required;
with the automated test system described in the above embodiment, the second computing device in the system is placed near the smart phone (the first computing device) in the automated test (the specific distance is based on the communication range of the bluetooth module), so as to achieve bluetooth pairing and bluetooth communication interaction in the test. The second computing device configured with the bluetooth module may provide an interface to facilitate test script invocation based on the configuration described above.
When the script execution end executes the automatic test script, an instruction containing the setting information of the target Bluetooth equipment to be simulated is sent to the server end (the analysis and sending process is described above), and the server end pushes the information to the Bluetooth simulation end and then returns the relevant feedback to the script execution end. The script execution end receives a ready (successful simulation) instruction of the target equipment and can continue the next execution of the automatic script, such as Bluetooth pairing and Bluetooth communication, so as to acquire the content required by the automatic test;
therefore, based on the specific configuration of the system, the relevant test flow of the app related to the interaction function with the Bluetooth device can be automatically realized through interaction of all parts of the system in the test, which is beneficial to improving the efficiency of the test work.
In another embodiment, shown in FIG. 2, an interactive process schematic illustration of an automated test system is provided.
Based on the foregoing embodiment, in this embodiment, the bluetooth analog end and the service end are both disposed on the second computing device having bluetooth modules, and the bluetooth modules of the second computing device are plural;
correspondingly, based on the foregoing embodiment, in this embodiment, the first data packet further includes identification information of the bluetooth module in the second computing device;
the server 200 is specifically configured to: the target bluetooth device setting information and the identification information of the bluetooth module included in the first data packet are pushed to the second computing device (corresponding to the legend of "accept bluetooth analog device number and target device model" and "push information" in fig. 2), so that the second computing device adopts the corresponding bluetooth module to perform target bluetooth device simulation.
In the embodiment, the Bluetooth simulation end and the service end are integrated on the same computing device, so that the integration of the system is improved; and a plurality of bluetooth modules are arranged, so that the requirements of specific test scenes (such as in the corresponding steps of a certain test scene, interaction with different bluetooth devices is required simultaneously) can be met.
In an embodiment, the application further provides an automated testing method, which is applied to the automated testing system, and the automated testing method includes:
the script execution end analyzes the executed automation script, sends a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controls the execution process of the automation script according to feedback information in a second data packet correspondingly returned by the server;
the server side pushes the target Bluetooth equipment setting information in the configuration contained in the first data packet to the Bluetooth simulation end, receives feedback information fed back by the Bluetooth simulation end aiming at the target Bluetooth equipment setting information, generates a second data packet comprising the feedback information, and sends the second data packet to the script execution end;
and the Bluetooth simulation end simulates the target equipment according to the received target Bluetooth equipment setting information, and feeds back the simulation result to the server as feedback information.
While from a purely method execution point of view, as shown in connection with fig. 2, the method comprises the following steps:
step 1: the automated test scripts need to be configured with the bluetooth device to be linked (e.g., bluetooth device number 1), the type of bluetooth device to be emulated (e.g., bluetooth name);
step 2: the automatic script sends the equipment model (such as Bluetooth name) and equipment number (such as Bluetooth equipment No. 1) to be simulated to the server, and the server pushes information to the Bluetooth simulation end;
step 3: the Bluetooth simulation end switches to a device (Bluetooth) mode needing simulation according to the received information;
step 4: after equipment preparation of the Bluetooth simulation end is completed, successful information is returned to the server;
step 5: the server returns the ready state of the equipment to the automation script;
step 6: the automation script may perform bluetooth pairing or automation script tasks;
the present invention is not limited to the above-mentioned embodiments, and any changes or substitutions that can be easily understood by those skilled in the art within the scope of the present invention are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (8)

1. An automated test system comprising:
the script execution end is used for analyzing the executed automation script, sending a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controlling the execution process of the automation script according to the feedback information in a second data packet correspondingly returned by the server;
the server side is used for pushing the target Bluetooth equipment setting information contained in the first data packet to the Bluetooth simulation side, receiving feedback information fed back by the Bluetooth simulation side aiming at the target Bluetooth equipment setting information, generating a second data packet comprising the feedback information, and sending the second data packet to the script execution side;
and the Bluetooth simulation end is used for simulating the target equipment according to the received target Bluetooth equipment setting information and feeding back simulation result information as feedback information to the server.
2. The automated test system of claim 1, wherein the script execution side is specifically configured to:
when the feedback information in the second data packet is ready for the target equipment, controlling the automation script to perform the next execution operation;
and when the feedback information in the second data packet fails to prepare for the target equipment, controlling the automation script to stop executing, and outputting error reporting information.
3. The automated test system of claim 1, wherein,
the script execution end is arranged on a first computing device configured with a Bluetooth module;
the Bluetooth simulation end is arranged on a second computing device provided with a Bluetooth module.
4. The automated testing system of claim 3, wherein the first computing device is a smart phone.
5. The automated test system of claim 3, wherein the server is also disposed on the second computing device.
6. The automated test system of claim 3, wherein the plurality of bluetooth modules of the second computing device, the first data packet further comprising identification information for the bluetooth modules of the second computing device;
the server is specifically configured to: and pushing the target Bluetooth equipment setting information and the identification information of the Bluetooth module contained in the first data packet to a second computing device so that the second computing device adopts the corresponding Bluetooth module to simulate the target Bluetooth equipment.
7. The automated testing system of any of claims 1 to 6, wherein the type of target bluetooth device comprises: bluetooth printer, bluetooth title.
8. An automated test method for use in an automated test system according to any one of claims 1 to 7, comprising:
the script execution end analyzes the executed automation script, sends a first data packet containing the setting information of the target Bluetooth equipment in the configuration to the server according to the analyzed test configuration, and controls the execution process of the automation script according to feedback information in a second data packet correspondingly returned by the server;
the server side pushes the target Bluetooth equipment setting information contained in the first data packet to a Bluetooth simulation end, receives feedback information fed back by the Bluetooth simulation end aiming at the target Bluetooth equipment setting information, generates a second data packet comprising the feedback information, and sends the second data packet to a script execution end;
and the Bluetooth simulation end simulates the target equipment according to the received target Bluetooth equipment setting information, and feeds back simulation result information as feedback information to the server.
CN202310031259.1A 2023-01-10 2023-01-10 Automatic test system and method Pending CN116028367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310031259.1A CN116028367A (en) 2023-01-10 2023-01-10 Automatic test system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310031259.1A CN116028367A (en) 2023-01-10 2023-01-10 Automatic test system and method

Publications (1)

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

Family

ID=86080913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310031259.1A Pending CN116028367A (en) 2023-01-10 2023-01-10 Automatic test system and method

Country Status (1)

Country Link
CN (1) CN116028367A (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
CN111159049B (en) Automatic interface testing method and system
CN111083225A (en) Data processing method and device in Internet of things platform and Internet of things platform
CN109740222B (en) Testing device and system for automobile networking scene
CN102118230B (en) Tree and tabular combined notation (TTCN)-based network protocol performance testing method
CN107239398B (en) Postman-based automatic interface test case generation system and method
CN103019939A (en) Method and system for testing driver
CN111858373A (en) Internet of things application testing method based on dynamic simulation control panel serial port protocol
CN116028367A (en) Automatic test system and method
CN114707236A (en) Model-based virtual-real combined simulation test method
CN112084802A (en) RFID tag chip verification system
CN110689238B (en) Method and system for realizing MMS (multimedia message service) information simulation and point-to-point of intelligent substation
CN112256557B (en) Program regression testing method, device, system, computer equipment and storage medium
CN111050333A (en) Base station automatic test method and system
CN112988588B (en) Client software debugging method and device, storage medium and electronic equipment
CN110334014A (en) For user interface automated testing method, system, server and storage medium
CN103383711B (en) A kind of Universal electrical simulation platform
CN115833964A (en) Performance test method and performance test system of dual-mode communication module
CN109144850A (en) The test method interactively communicated and system of mobile terminal
CN112099453B (en) Function verification system of nuclear power plant safety level instrument control system
CN112838938B (en) Test system of Internet of things platform
CN105243015A (en) Automated software test method and system
CN113434405A (en) Method and device for determining test file, storage medium and electronic device
CN1312587C (en) An embedded real time operating system fault analysis positioning system and method
CN114721286A (en) Distributed compiled parallel real-time simulation system and simulation method
CN111835590A (en) Automatic interface test architecture and test method for cloud host product

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