CN112054822A - Bluetooth test method and device, electronic equipment and storage medium - Google Patents

Bluetooth test method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112054822A
CN112054822A CN202010763152.2A CN202010763152A CN112054822A CN 112054822 A CN112054822 A CN 112054822A CN 202010763152 A CN202010763152 A CN 202010763152A CN 112054822 A CN112054822 A CN 112054822A
Authority
CN
China
Prior art keywords
test
bluetooth
bluetooth module
module
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.)
Granted
Application number
CN202010763152.2A
Other languages
Chinese (zh)
Other versions
CN112054822B (en
Inventor
王鑫锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Wentai Information Technology Co Ltd
Original Assignee
Shanghai Wentai Information 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 Wentai Information Technology Co Ltd filed Critical Shanghai Wentai Information Technology Co Ltd
Priority to CN202010763152.2A priority Critical patent/CN112054822B/en
Publication of CN112054822A publication Critical patent/CN112054822A/en
Application granted granted Critical
Publication of CN112054822B publication Critical patent/CN112054822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a Bluetooth test method and device, electronic equipment and a storage medium, wherein the method comprises the following steps: starting a Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table; turning off the Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table; recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test; when the test times are equal to the preset test times, generating a corresponding test report according to the test record table; the embodiment of the application can realize the opening and closing functions of the detection Bluetooth module, and when the test times are equal to the preset test times, the test report is generated, so that the accuracy and the test efficiency of the test result can be effectively improved.

Description

Bluetooth test method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a bluetooth testing method and apparatus, an electronic device, and a storage medium.
Background
During the development process, terminal devices (e.g., notebook computers, smart phones, vehicle-mounted central controllers, etc.) with bluetooth functions need to perform software stress tests on the bluetooth functions, so as to prevent the phenomenon that bluetooth cannot be connected or programs crash after the terminal devices are put into use.
In the prior art, a bluetooth test method for a terminal device is generally implemented through manual testing and recording, that is, a worker is required to manually open a bluetooth module of the terminal device, observe a bluetooth connection condition to confirm whether the starting function of the bluetooth module is normal, and manually record a test result; then, the Bluetooth module of the terminal equipment is manually closed, the Bluetooth connection condition is observed to confirm whether the closing function of the Bluetooth module is normal or not, and the test result is manually recorded, so that the test mode has the problem of low efficiency. Moreover, each terminal device needs to repeat the test for many times, and the worker repeatedly executes a single action, which easily causes the test result to be wrong and missed, and affects the accuracy of the test result.
Disclosure of Invention
In view of the above problems, embodiments of the present application are proposed to provide a bluetooth testing method and apparatus, an electronic device, and a storage medium, which overcome the above problems or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present application discloses a method applied to a terminal device having a bluetooth module, where the method includes:
starting the Bluetooth module;
detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table;
turning off the Bluetooth module;
detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table;
recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test;
and when the test times are equal to the preset test times, generating a corresponding test report according to the test record table.
Optionally, the step of turning on the bluetooth module includes:
receiving starting operation aiming at the test script, and displaying a test dialog box;
acquiring preset test times input aiming at the test dialog box, and generating a Bluetooth test instruction according to the preset test times;
and under the condition that the Bluetooth test instruction is generated, starting the Bluetooth module.
Optionally, the step of detecting whether there is a target bluetooth device connected to the bluetooth module includes:
acquiring an equipment management list; the device management list is used for storing a target identifier of a target Bluetooth device connected with the Bluetooth module;
and detecting whether the target identification exists in the equipment management list.
Optionally, the step of detecting whether there is a target bluetooth device connected to the bluetooth module includes:
sending test information to the target Bluetooth equipment which is stored in advance and successfully paired,
and detecting whether feedback information returned by the target Bluetooth equipment aiming at the test information is received.
Optionally, the method further comprises:
receiving a test interrupt instruction;
and generating a corresponding test report according to the test record table.
Optionally, the step of generating a corresponding test report according to the test record table further includes:
acquiring a test report template;
and classifying and counting the first detection result and the second detection result in the test record table, importing the statistical result into the test report template, and generating a corresponding test report.
Optionally, the method further comprises:
before the step of detecting whether a target bluetooth device connected to the bluetooth module exists and adding the first detection result to the test record table, the method further includes:
and displaying a test record table on a display of the terminal equipment.
The embodiment of the application also discloses bluetooth testing arrangement, its characterized in that is applied to the terminal equipment who possesses bluetooth module, the device includes:
the Bluetooth starting module is used for starting the Bluetooth module;
the first detection module is used for detecting whether target Bluetooth equipment connected with the Bluetooth module exists or not and adding a corresponding first detection result in a test record table;
the Bluetooth closing module is used for closing the Bluetooth module;
the second detection module is used for detecting whether target Bluetooth equipment connected with the Bluetooth module exists or not and adding a corresponding second detection result in the test record table;
the number recording module is used for recording the number of times of one test and returning to the step of starting the Bluetooth module;
and the report output module is used for generating a test report corresponding to the test record table when the test times are equal to the preset test times and outputting the test report.
Optionally, the bluetooth activation module includes:
the dialog box display module is used for receiving the starting operation aiming at the test script and displaying the test dialog box;
the test frequency acquisition module is used for acquiring preset test frequency input aiming at the test dialog box and generating a Bluetooth test instruction according to the preset test frequency;
and the Bluetooth module starting module is used for starting the Bluetooth module under the condition that the Bluetooth test instruction is generated.
Optionally, the first detection module and the second detection module include:
the device management list obtaining submodule is used for obtaining a device management list; the device management list is used for storing a target identifier of a target Bluetooth device connected with the Bluetooth module;
and the target identification detection submodule is used for detecting whether the target identification exists in the equipment management list or not.
Optionally, the first detection module and the second detection module include:
the test information sending submodule is used for sending test information to the target Bluetooth equipment which is stored in advance and successfully paired,
and the feedback information detection submodule is used for detecting whether feedback information returned by the target Bluetooth device aiming at the test information is received.
Optionally, the apparatus further comprises:
the test interrupt instruction receiving module is used for receiving a test interrupt instruction;
and the interrupt test report generating module is used for generating a corresponding test report according to the test record table.
Optionally, the report generation module further includes:
the template acquisition submodule is used for acquiring a test report template;
and the result import submodule is used for carrying out classification statistics on the first detection result and the second detection result in the test record table, importing the statistical result into the test report template and generating a corresponding test report.
Optionally, the apparatus further comprises:
and the test record table display module is used for displaying the test record table on the display of the terminal equipment.
The embodiment of the application also discloses an electronic device, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the bluetooth test method are realized.
An embodiment of the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the bluetooth testing method are implemented.
The application includes the following advantages:
in the embodiment of the application, the Bluetooth module is started; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table; turning off the Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table; recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test; when the test times are equal to preset test times, generating a corresponding test report according to the test record table; whether the opening and closing functions of the Bluetooth module of the automatic detection terminal device are normal within the repeated preset times can be achieved, the test record table is automatically generated to record the detection result at each time, and when the test times are equal to the preset test times, the test report corresponding to the test record table is generated, so that the accuracy and the test efficiency of the test result can be effectively improved.
Drawings
Fig. 1 is a flowchart illustrating a first step of a bluetooth testing method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating steps of a second embodiment of a bluetooth testing method according to the present application;
fig. 3 is a block diagram of a bluetooth testing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description. It is to be understood that the embodiments described are only a few embodiments of the present application and not all 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 application.
Referring to fig. 1, fig. 1 shows a flowchart of a first step of an embodiment of a bluetooth testing method provided by the present application, where the method is applied to a terminal device having a bluetooth module to test a connection/disconnection function of the bluetooth module of the terminal device, where the terminal device may include an electronic device such as a smart phone, a notebook computer, a tablet computer, an in-vehicle central control, and a smart television. The method specifically comprises the following steps:
step 101, starting the Bluetooth module.
In an embodiment of the present application, a test script for testing a bluetooth module is pre-configured in a terminal device of the bluetooth module to be tested (for convenience of description, hereinafter referred to as a bluetooth module), and when the test is started, the test script is run, and the test script may instruct the terminal device to automatically start the bluetooth module.
In a specific implementation, before the bluetooth module is started, at least one target bluetooth device for auxiliary testing needs to be arranged around the terminal device, and the target bluetooth device and the bluetooth module are paired in advance and successfully paired. For example, when the terminal device is a notebook computer, the target bluetooth device may be a bluetooth mouse or a bluetooth speaker. Specifically, the target bluetooth device and the bluetooth module can be automatically paired by configuring a related pairing program in the target bluetooth device or the terminal device and running the pairing program; alternatively, the target bluetooth device and the bluetooth module may be paired by manual intervention. After the pairing is successful, the terminal device is bound with the target Bluetooth device, namely, the terminal device can store the corresponding target identifier and the pairing connection information of the target Bluetooth device, so that when the terminal device searches the target Bluetooth device again, the pairing process can be omitted, and the terminal device is automatically connected with the target Bluetooth device. The target identifier may be a name of the target bluetooth device, a factory code, and the like, which can uniquely identify the target bluetooth device.
In the test process, the distance between the target Bluetooth device and the terminal device is controlled within the effective distance range of Bluetooth connection, and the target Bluetooth device can initiate broadcasting to the surrounding in real time so as to ensure that the broadcasting information of the target Bluetooth device can be searched by the Bluetooth module under the condition that the function of the Bluetooth module is normal.
And 102, detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table.
When the starting function of the Bluetooth module is effective, the target Bluetooth equipment can be searched after the Bluetooth module is started, and the connection with the target Bluetooth equipment is automatically established; therefore, the terminal equipment can judge whether the starting function of the Bluetooth module is effective or not by detecting whether the target Bluetooth equipment connected with the Bluetooth module exists or not.
In an embodiment of the application, when the bluetooth module is started for a first preset time, the test script may further instruct the terminal device to detect whether a target bluetooth device connected to the bluetooth module exists, and if so, it is determined that a starting function of the bluetooth module is valid; a first detection result corresponding to the presence of the target bluetooth device is added to the test record table. The test record table can comprise test times, and the Bluetooth module starts a corresponding detection result; and if the Bluetooth module does not exist, determining that the starting function of the Bluetooth module fails, and adding a first detection result corresponding to the target Bluetooth device does not exist in the test record table.
In an embodiment of the present application, when the bluetooth module activation function is valid, after the bluetooth module is activated, a target bluetooth device may be searched, and a connection with the target bluetooth device may be automatically established, and after the connection is successful, a target identifier of the target bluetooth device may be added to a device management list, where the device management list may be used to record, in real time, a name, a connection duration, and the like of the bluetooth device connected to the bluetooth module. Therefore, the step of detecting whether there is a target bluetooth device connected to the bluetooth module may include the sub-steps of:
acquiring an equipment management list; the device management list is used for storing a target identifier of a target Bluetooth device connected with the Bluetooth module;
detecting whether the target identification exists in the equipment management list or not;
if the target identification exists in the equipment management list, determining that target Bluetooth equipment connected with a Bluetooth module exists;
and if the target identification does not exist in the equipment management list, determining that target Bluetooth equipment connected with the Bluetooth module does not exist.
In an embodiment of the application, when the bluetooth module is enabled, the bluetooth module can be automatically connected with the successfully paired target bluetooth device after being enabled, and data can be interacted with the target bluetooth device after the bluetooth module is successfully connected; therefore, the step of detecting whether there is a target bluetooth device connected to the bluetooth module may include the sub-steps of:
sending test information to the target Bluetooth equipment which is stored in advance and successfully paired,
detecting whether feedback information returned by the target Bluetooth equipment aiming at the test information is received;
if the feedback information is received within the set time, determining that target Bluetooth equipment connected with the Bluetooth module exists;
and if the feedback information is not received within the specified time, determining that the target Bluetooth equipment connected with the Bluetooth module does not exist.
And step 103, turning off the Bluetooth module.
In an embodiment of the application, after the first detection result is recorded in the test record table, the test script may further instruct the terminal device to automatically turn off the bluetooth module.
And 104, detecting whether target Bluetooth equipment connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table.
When the Bluetooth module closing function is effective, the Bluetooth module can be disconnected with the target Bluetooth equipment after being closed; therefore, the terminal device can judge whether the closing function of the Bluetooth module is effective or not by detecting whether the target Bluetooth device connected with the Bluetooth module exists or not.
In an embodiment of the application, when the bluetooth module is turned off for a second preset time, the test script may further instruct the terminal device to detect whether a target bluetooth device connected to the bluetooth module exists, and if the target bluetooth device exists, determining that a bluetooth module turning-off function is invalid, adding a second detection result corresponding to the target bluetooth device in the test record table; if the Bluetooth module does not exist, determining that the closing function of the Bluetooth module is effective, and adding a second detection result corresponding to the target Bluetooth device does not exist in the test record table.
The step of detecting whether the target bluetooth device connected to the bluetooth module exists in this step may refer to the related description in step 102, and is not described herein again.
And 105, recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test.
In an embodiment of the present application, the initial test frequency may be 0, and after the step 101-104 is completed once, the test frequency is recorded once, that is, 1 is accumulated on the basis of the original test frequency; then judging whether the current test times are less than the preset test times or not; the preset number of tests may be preset by the tester before starting the test. And if the current test frequency is less than the preset test frequency, returning to execute the step 101. If the current test time is equal to the preset test time, step 106 is executed.
And 106, when the test times are equal to preset test times, generating a corresponding test report according to the test record table.
In an embodiment of the application, when the current test times are equal to the preset test times, the current test record table is obtained, a corresponding test report is generated according to the current test record table, the test report is output, and the test report can be displayed on a display of the terminal device in combination with actual requirements.
In an embodiment of the present application, the step of generating a corresponding test report according to the test record table may include:
acquiring a test report template;
and classifying and counting the first detection result and the second detection result in the test record table, importing the statistical result into the test report template, and generating a corresponding test report.
In this embodiment, the test report template may include a test result label, or may also include a test record table label and a test result label. The corresponding position of the test record table label in the test report template is used for recording the original content of the test record table; and the position corresponding to the test judgment result label is used for recording the test judgment result. Specifically, the number of times that the first detection result corresponds to the test that the bluetooth module has an effective function for opening the bluetooth module and the number of times that the first detection result corresponds to the test that the bluetooth module has an ineffective function for opening the bluetooth module may be calculated according to the test record table, and the number of times that the second detection result corresponds to the test that the bluetooth module has an effective function for closing the bluetooth module and the number of times that the second detection result corresponds to the test that the bluetooth module has an ineffective function for closing the bluetooth module. And calculating a first proportion of the effective test times of the Bluetooth module opening function to the total test times and a second proportion of the effective test times of the Bluetooth module closing function to the total test times. Then, judging whether the first ratio is larger than a preset first ratio or not, and if so, considering that the starting function of the Bluetooth module is effective; if not, the starting function of the Bluetooth module is considered to be invalid. Judging whether the second ratio is larger than a preset second ratio or not, and if so, considering that the closing function of the Bluetooth module is effective; if not, the shutdown function of the Bluetooth module is considered to be invalid. Wherein, predetermine first ratio and predetermine the second ratio and can set for according to actual need, for example, can set for and predetermine first ratio and predetermine the second ratio and be 98%, promptly, when the ratio of valid test number of times and total test number of times is greater than 98%, can regard as this bluetooth module's opening and close function to be effectual, bluetooth module's opening and close the function stable promptly. And finally, recording the judgment result as a test judgment result to the corresponding position of the test report template, and generating a test report for a tester to refer to so that the tester can perform corresponding operation processing according to the judgment result in the test report.
The embodiment of the application starts the Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table; turning off the Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table; recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test; when the test times are equal to the preset test times, generating a corresponding test report according to a test record table; whether the opening and closing functions of the Bluetooth module of the automatic detection terminal device are normal in the preset test times or not can be achieved, the test recording table is automatically generated to record the detection result at each time, and when the test times are equal to the preset test times, the test report corresponding to the recording table is generated, so that the accuracy and the test efficiency of the test result can be effectively improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of a second embodiment of a data processing method provided in the present application; the method is applied to the terminal equipment with the Bluetooth module to realize the function of testing the connection and disconnection of the Bluetooth module of the terminal equipment, and specifically comprises the following steps:
step 201, receiving a start operation for the test script, and displaying a test dialog box.
In an embodiment of the present application, a test script for testing a bluetooth module is preconfigured in a terminal device, and a start control for starting running the test script may be displayed on a display of the terminal device. And when the terminal equipment receives the starting operation aiming at the test script triggered by the tester, starting and running the test script. The test script, when executed, may be used to instruct the terminal device to display a test dialog on the display. In particular, the test dialog may include the number of tests to be filled in.
In an embodiment of the present application, to ensure the security of bluetooth communication, before step 201, the method further includes:
storing the target identification of the target Bluetooth device successfully paired with the Bluetooth module
In this embodiment, before performing a pressure test on an opening function and a closing function of a bluetooth module, the bluetooth module and a target bluetooth device need to be paired, and under the condition that the bluetooth module and the target bluetooth device are successfully paired, the target bluetooth device is bound to generate a target identifier and corresponding pairing connection information. Specifically, the tester can turn on the bluetooth function of the target bluetooth device and place the target bluetooth device in a range which can be searched by the bluetooth module; manually operating the terminal equipment to ensure that the Bluetooth module is successfully started, and automatically searching peripheral Bluetooth equipment by the started Bluetooth module and generating a Bluetooth equipment list; the test personnel determines a target Bluetooth device from the Bluetooth device list, the Bluetooth module sends pairing connection information to the target Bluetooth device, and the target Bluetooth device returns corresponding response information to the Bluetooth module after receiving the pairing connection information; the Bluetooth module successfully pairs with the target Bluetooth equipment and establishes connection after receiving the response information; at this moment, the terminal device can automatically store the target identifier of the target bluetooth device, so that after the bluetooth module is disconnected from the target bluetooth device, when the bluetooth module searches the target bluetooth device again, the corresponding pairing connection information can be obtained according to the target identifier, and the connection with the target bluetooth device can be automatically established.
Step 202, acquiring preset test times input aiming at the test dialog box, and generating a Bluetooth test instruction according to the preset test times.
In an embodiment of the present application, the terminal device may obtain a preset test frequency input by a tester for the test frequency to be filled in the test dialog, and generate a bluetooth test instruction by using the preset test frequency as a cycle frequency of the bluetooth test.
Step 203, under the condition that the bluetooth test instruction is generated, starting the bluetooth module.
In an embodiment of the present application, under the condition that the bluetooth test instruction is generated, the test script may obtain the bluetooth test cycle number, that is, the preset test number, from the bluetooth test instruction. The detailed description of step 101 can be referred to for the related description of turning on the bluetooth module, and is not repeated herein.
And step 204, displaying the test record table on a display of the terminal equipment.
In this embodiment, when the test is started, the test record table may be displayed on the display, and the test record table is used for recording the detection result. The test record table may include a test time label, a test frequency label, a start test result label, and a close test result label.
Step 205, detecting whether a target bluetooth device connected to the bluetooth module exists, and adding a corresponding first detection result in the test record table.
The implementation of this step can refer to the implementation of step 102 described above.
Furthermore, the current test time and the current test times can be obtained, the current test time is led into the position corresponding to the test time label in the test record table, and the current test times are led into the position corresponding to the test time label in the test record table; and importing the first detection result into a position corresponding to the opening test result label in the test record table.
Step 206, the bluetooth module is turned off.
In an embodiment of the application, after the first detection result is recorded in the test record table, the test script may further instruct the terminal device to automatically turn off the bluetooth module.
And step 207, detecting whether a target Bluetooth device connected with the Bluetooth module exists, and adding a corresponding second detection result in the test record table.
The implementation of this step can refer to the implementation of step 104 described above.
Furthermore, the current test time and the current test times can be obtained, the current test time is led into the position corresponding to the test time label in the test record table, and the current test times are led into the position corresponding to the test time label in the test record table; and importing the second detection result into a position corresponding to the test result closing label in the test record table.
And 208, recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test.
The implementation of this step can refer to the implementation of step 105 described above.
And 209, when the test times are equal to preset test times, generating a corresponding test report according to the test record table.
The implementation of this step can refer to the implementation of step 106 described above.
Further, in an embodiment of the present application, the method further includes:
receiving a test interrupt instruction;
and generating a corresponding test report according to the test record table.
In this embodiment, a control corresponding to the test interruption may also be displayed on the display of the terminal device, and the terminal device may receive a test interruption instruction generated by a tester triggering the test interruption control, and after receiving the test interruption instruction, obtain the current test record table, and generate a corresponding test report according to the current test record table. The specific implementation manner of generating the corresponding test report according to the current test record table may refer to the implementation manner of generating the corresponding test report according to the test record table in the above embodiments. The embodiment can realize that the test is stopped at any time, the test data before the test is stopped is reserved, and the test report before the test is stopped is generated.
The embodiment of the application displays the test dialog box by receiving the starting operation aiming at the test script; acquiring preset test times input aiming at the test dialog box, and generating a Bluetooth test instruction according to the preset test times; under the condition that a Bluetooth test instruction is generated, a Bluetooth module is started; displaying a test record table on a display of the terminal equipment; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table; turning off the Bluetooth module; detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table; recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test; when the test times are equal to the preset test times, generating a corresponding test report according to the test record table; whether the opening and closing functions of the Bluetooth module of the terminal equipment are normal in the preset test times can be automatically detected according to the test times input by a user, the test recording table is displayed to display the test result of each test, and when the test times are equal to the preset test times, the test report corresponding to the recording table is generated, so that the accuracy and the test efficiency of the test result can be effectively improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 3, a block diagram of a bluetooth testing apparatus according to an embodiment of the present application is shown, where the apparatus is applied to a terminal device having a bluetooth module, and the apparatus may specifically include:
a bluetooth starting module 301, configured to start the bluetooth module;
a first detection module 302, configured to detect whether a target bluetooth device connected to the bluetooth module exists, and add a corresponding first detection result to a test record table;
a bluetooth shutdown module 303, configured to shutdown the bluetooth module;
a second detection module 304, configured to detect whether there is a target bluetooth device connected to the bluetooth module, and add a corresponding second detection result to the test record table;
a time recording module 305, configured to record a test time, and when the test time is less than a preset test time, return to the step of starting the bluetooth module;
and a report generating module 306, configured to generate a corresponding test report according to the test record table when the test times are equal to preset test times.
In an optional embodiment of the present application, the bluetooth activation module 301 may include:
the dialog box display module is used for receiving the starting operation aiming at the test script and displaying the test dialog box;
the test frequency acquisition module is used for acquiring preset test frequency input aiming at the test dialog box and generating a Bluetooth test instruction according to the preset test frequency;
and the Bluetooth module starting module is used for starting the Bluetooth module under the condition that the Bluetooth test instruction is generated.
In an alternative embodiment of the present application, the first detection module 302 and the second detection module 304 may include:
the device management list obtaining submodule is used for obtaining a device management list; the device management list is used for storing a target identifier of a target Bluetooth device connected with the Bluetooth module;
and the target identification detection submodule is used for detecting whether the target identification exists in the equipment management list or not.
In an alternative embodiment of the present application, the first detection module 302 and the second detection module 304 may include:
the test information sending submodule is used for sending test information to the target Bluetooth equipment which is stored in advance and successfully paired,
and the feedback information detection submodule is used for detecting whether feedback information returned by the target Bluetooth device aiming at the test information is received.
In an optional embodiment of the present application, the apparatus may further include:
the test interrupt instruction receiving module is used for receiving a test interrupt instruction;
and the interrupt test report generating module is used for generating a corresponding test report according to the test record table.
In an optional embodiment of the present application, the report generating module 306 may further include:
the template acquisition submodule is used for acquiring a test report template;
and the result import submodule is used for carrying out classification statistics on the first detection result and the second detection result in the test record table, importing the statistical result into the test report template and generating a corresponding test report.
In an optional embodiment of the present application, the apparatus may further include:
and the test record table display module is used for displaying the test record table on the display of the terminal equipment.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present application also provides an electronic device, which may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the above bluetooth testing method.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above bluetooth testing method.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is given to a bluetooth testing method and apparatus, an electronic device, and a storage medium, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A Bluetooth test method is applied to a terminal device with a Bluetooth module, and the method comprises the following steps:
starting the Bluetooth module;
detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding first detection result in a test record table;
turning off the Bluetooth module;
detecting whether a target Bluetooth device connected with the Bluetooth module exists or not, and adding a corresponding second detection result in the test record table;
recording the number of times of one test, and returning to the step of starting the Bluetooth module when the number of times of the test is less than the preset number of times of the test;
and when the test times are equal to the preset test times, generating a corresponding test report according to the test record table.
2. The bluetooth testing method according to claim 1, wherein the step of turning on the bluetooth module comprises:
receiving starting operation aiming at the test script, and displaying a test dialog box;
acquiring preset test times input aiming at the test dialog box, and generating a Bluetooth test instruction according to the preset test times;
and under the condition that the Bluetooth test instruction is generated, starting the Bluetooth module.
3. The bluetooth testing method according to claim 1, wherein the step of detecting whether there is a target bluetooth device connected to the bluetooth module comprises:
acquiring an equipment management list; the device management list is used for storing a target identifier of a target Bluetooth device connected with the Bluetooth module;
and detecting whether the target identification exists in the equipment management list.
4. The bluetooth testing method according to claim 1, wherein the step of detecting whether there is a target bluetooth device connected to the bluetooth module comprises:
sending test information to the target Bluetooth equipment which is stored in advance and successfully paired,
and detecting whether feedback information returned by the target Bluetooth equipment aiming at the test information is received.
5. The bluetooth testing method according to claim 1, characterized in that the method further comprises:
receiving a test interrupt instruction;
and generating a corresponding test report according to the test record table.
6. The bluetooth testing method according to claim 1 or 5, wherein the step of generating the corresponding test report according to the test record table further comprises:
acquiring a test report template;
and classifying and counting the first detection result and the second detection result in the test record table, importing the statistical result into the test report template, and generating a corresponding test report.
7. The bluetooth testing method according to claim 1, characterized in that the method further comprises:
before the step of detecting whether a target bluetooth device connected to the bluetooth module exists and adding the first detection result to the test record table, the method further includes:
and displaying a test record table on a display of the terminal equipment.
8. The utility model provides a bluetooth testing arrangement which characterized in that is applied to the terminal equipment who possesses bluetooth module, the device includes:
the Bluetooth starting module is used for starting the Bluetooth module;
the first detection module is used for detecting whether target Bluetooth equipment connected with the Bluetooth module exists or not and adding a corresponding first detection result in a test record table;
the Bluetooth closing module is used for closing the Bluetooth module;
the second detection module is used for detecting whether target Bluetooth equipment connected with the Bluetooth module exists or not and adding a corresponding second detection result in the test record table;
the number recording module is used for recording the number of times of one test and returning to the step of starting the Bluetooth module;
and the report output module is used for generating a test report corresponding to the test record table when the test times are equal to the preset test times and outputting the test report.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the bluetooth testing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the bluetooth testing method according to one of claims 1 to 7.
CN202010763152.2A 2020-08-01 2020-08-01 Bluetooth test method and device, electronic equipment and storage medium Active CN112054822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010763152.2A CN112054822B (en) 2020-08-01 2020-08-01 Bluetooth test method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010763152.2A CN112054822B (en) 2020-08-01 2020-08-01 Bluetooth test method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112054822A true CN112054822A (en) 2020-12-08
CN112054822B CN112054822B (en) 2023-02-03

Family

ID=73602293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010763152.2A Active CN112054822B (en) 2020-08-01 2020-08-01 Bluetooth test method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112054822B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112735601A (en) * 2020-12-31 2021-04-30 医渡云(北京)技术有限公司 Test method, device and equipment for determining infectious disease close-contact population by using Bluetooth
CN113194448A (en) * 2021-04-20 2021-07-30 歌尔股份有限公司 Bluetooth device testing method, testing terminal and readable storage medium
CN113271157A (en) * 2021-05-20 2021-08-17 深圳市通标科技有限公司 Bluetooth receiving sensitivity testing method, electronic equipment and storage medium
CN113873482A (en) * 2021-08-27 2021-12-31 青岛中科英泰商用系统股份有限公司 Method, system, equipment and medium for testing compatibility of Android system to Bluetooth module

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120184217A1 (en) * 2009-07-21 2012-07-19 St-Ericsson Sa Apparatus and Process for Detection of a Bluetooth Device
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN105589808A (en) * 2016-02-23 2016-05-18 惠州Tcl移动通信有限公司 Test method and test system for mobile phone and vehicle-mounted Bluetooth
CN110830971A (en) * 2019-11-25 2020-02-21 航天科技控股集团股份有限公司 Bluetooth function detection method of vehicle-mounted entertainment terminal
CN111341090A (en) * 2020-03-04 2020-06-26 深圳创维-Rgb电子有限公司 Bluetooth remote controller pressure measurement method, control device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120184217A1 (en) * 2009-07-21 2012-07-19 St-Ericsson Sa Apparatus and Process for Detection of a Bluetooth Device
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN105589808A (en) * 2016-02-23 2016-05-18 惠州Tcl移动通信有限公司 Test method and test system for mobile phone and vehicle-mounted Bluetooth
CN110830971A (en) * 2019-11-25 2020-02-21 航天科技控股集团股份有限公司 Bluetooth function detection method of vehicle-mounted entertainment terminal
CN111341090A (en) * 2020-03-04 2020-06-26 深圳创维-Rgb电子有限公司 Bluetooth remote controller pressure measurement method, control device and computer readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112735601A (en) * 2020-12-31 2021-04-30 医渡云(北京)技术有限公司 Test method, device and equipment for determining infectious disease close-contact population by using Bluetooth
CN112735601B (en) * 2020-12-31 2022-02-22 医渡云(北京)技术有限公司 Test method, device and equipment for determining infectious disease close-contact population by using Bluetooth
CN113194448A (en) * 2021-04-20 2021-07-30 歌尔股份有限公司 Bluetooth device testing method, testing terminal and readable storage medium
CN113194448B (en) * 2021-04-20 2023-04-25 歌尔股份有限公司 Bluetooth device testing method, testing terminal and readable storage medium
CN113271157A (en) * 2021-05-20 2021-08-17 深圳市通标科技有限公司 Bluetooth receiving sensitivity testing method, electronic equipment and storage medium
CN113873482A (en) * 2021-08-27 2021-12-31 青岛中科英泰商用系统股份有限公司 Method, system, equipment and medium for testing compatibility of Android system to Bluetooth module

Also Published As

Publication number Publication date
CN112054822B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN112054822B (en) Bluetooth test method and device, electronic equipment and storage medium
CN101738550B (en) Electronic device test device and test method
CN104424089A (en) Terminal testing method and device
CN102419727A (en) Automatic test method and device
CN111104315A (en) Test script generation method and device and computer readable storage medium
CN104536891A (en) Method and device for testing system
CN110134574A (en) A kind of software performance testing method, system, medium and electronic equipment
CN111708584A (en) Vehicle diagnosis method and device, diagnosis equipment and storage medium
CN105117110A (en) Method and device for displaying user equipment state on preset interface of application program
CN115827111B (en) Method and device for adjusting server startup item, storage medium and electronic device
CN110750460A (en) Browser compatibility detection method, device, equipment and readable storage medium
CN109616106A (en) Vehicle-mounted control screen voice recognition process testing method, electronic equipment and system
CN110806965A (en) Automatic test method, device, equipment and medium
CN112148606A (en) Embedded point testing method, device, equipment and computer readable medium
KR20150025106A (en) Verification apparatus, terminal device, system, method and computer-readable medium for monitoring of application verification result
CN111179907A (en) Voice recognition test method, device, equipment and computer readable storage medium
CN110889116B (en) Advertisement interception method and device and electronic equipment
CN108009096B (en) Test method and terminal
CN111128139B (en) Non-invasive voice test method and device
CN106708722A (en) Application testing method and device and electronic equipment
CN112631891A (en) Performance analysis method and device, electronic equipment and storage medium
CN106708705B (en) Terminal background process monitoring method and system
CN109002694B (en) Method and device for positioning problem point after application code confusion
CN110275785B (en) Data processing method and device, client and server
CN111400173B (en) VTS test method, device and equipment

Legal Events

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