CN112996020B - Bluetooth-based automatic test method and device and Bluetooth test terminal - Google Patents

Bluetooth-based automatic test method and device and Bluetooth test terminal Download PDF

Info

Publication number
CN112996020B
CN112996020B CN202110339660.2A CN202110339660A CN112996020B CN 112996020 B CN112996020 B CN 112996020B CN 202110339660 A CN202110339660 A CN 202110339660A CN 112996020 B CN112996020 B CN 112996020B
Authority
CN
China
Prior art keywords
bluetooth
test
testing
tool
instruction
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.)
Active
Application number
CN202110339660.2A
Other languages
Chinese (zh)
Other versions
CN112996020A (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.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
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 Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202110339660.2A priority Critical patent/CN112996020B/en
Publication of CN112996020A publication Critical patent/CN112996020A/en
Application granted granted Critical
Publication of CN112996020B publication Critical patent/CN112996020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application is applicable to the technical field of automatic testing, and provides an automatic testing method and device based on Bluetooth and a Bluetooth testing terminal, which are applied to the Bluetooth testing terminal, wherein the method comprises the following steps: starting Bluetooth equipment to be tested and a Bluetooth adapter; controlling the first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to the second Bluetooth testing tool so as to control the second Bluetooth testing tool to execute corresponding testing operation and return corresponding testing results until the completion of a preset testing flow is detected; and closing the Bluetooth adapter and the Bluetooth equipment to be tested, and generating a corresponding automatic test result. The automatic test based on Bluetooth is realized by simulating man-machine interaction through the first Bluetooth test tool and the second Bluetooth test tool, and the efficiency of the automatic test based on Bluetooth and the stability of the test result are improved.

Description

Bluetooth-based automatic test method and device and Bluetooth test terminal
Technical Field
The application belongs to the technical field of automatic testing, and particularly relates to an automatic testing method and device based on Bluetooth, a Bluetooth testing terminal and a readable storage medium.
Background
In recent years, smart home and equipment gradually go deep into the lives of people. The Bluetooth is an important module in intelligent home and equipment, and a testing link of the Bluetooth is also indispensable.
In the related Bluetooth test technology, the test operation is complicated, the test efficiency is low, and the communication quality between Bluetooth devices cannot be guaranteed.
Disclosure of Invention
The embodiment of the application provides an automatic testing method and device based on Bluetooth, a Bluetooth testing terminal and a readable storage medium, which can solve the problems that the testing operation of the related Bluetooth testing method is complicated, the testing efficiency is low, the communication quality among Bluetooth devices cannot be guaranteed, and the like.
In a first aspect, an embodiment of the present application provides an automated testing method based on bluetooth, which is applied to a bluetooth testing terminal, where the automated testing method based on bluetooth includes:
starting a Bluetooth device to be tested and simultaneously starting a Bluetooth adapter;
controlling a first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to a second Bluetooth testing tool, controlling the Bluetooth equipment to be tested to execute corresponding testing operation through the second Bluetooth testing tool according to the testing instruction, and returning a corresponding testing result until the completion of a preset testing flow is detected;
and closing the Bluetooth adapter, closing the Bluetooth equipment to be tested, and generating a corresponding automatic test result according to the test result.
In a second aspect, an embodiment of the present application provides an automated testing device based on bluetooth, which is applied to a bluetooth testing terminal, and the automated testing device based on bluetooth includes:
the starting module is used for starting the Bluetooth equipment to be tested and simultaneously starting the Bluetooth adapter;
the testing module is used for controlling the first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to the second Bluetooth testing tool so as to control the Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction through the second Bluetooth testing tool and returning a corresponding testing result until the completion of a preset testing flow is detected;
and the generation module is used for closing the Bluetooth adapter, closing the Bluetooth equipment to be tested and generating a corresponding automatic test result according to the test result.
In a third aspect, an embodiment of the present application provides a bluetooth test terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the bluetooth-based automated test method according to any one of the first aspects when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a bluetooth-based automated test method according to any one of the first aspects above.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a terminal device, causes the terminal device to perform the bluetooth-based automated test method according to any one of the first aspects above.
According to the embodiment of the application, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing flow, the second Bluetooth testing tool is controlled to gradually control the Bluetooth equipment to be tested to execute the corresponding testing operation, the automatic testing based on Bluetooth is realized through simulation man-machine interaction, and the efficiency of the automatic testing based on Bluetooth and the stability of the testing result are improved.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an automated Bluetooth-based testing method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a bluetooth-based automated testing method step S102 according to an embodiment of the present application;
fig. 3 is a flowchart of step S1022 of the bluetooth-based automated testing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an automated bluetooth-based testing device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a test module 102 according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a test unit 1022 according to one embodiment of the present application;
fig. 7 is a schematic structural diagram of a bluetooth test terminal according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The Bluetooth-based automatic test method provided by the embodiment of the application can be applied to terminal equipment such as mobile phones, tablet computers, wearable equipment, notebook computers, bluetooth test terminals and the like, and the specific type of the terminal equipment is not limited.
Fig. 1 shows a schematic flow chart of the bluetooth-based automated test method provided in the present application, which can be applied to a bluetooth test terminal by way of example and not limitation.
S101, starting the Bluetooth device to be tested, and simultaneously starting the Bluetooth adapter.
In a specific application, the current bluetooth test terminal is a terminal device which comprises a first bluetooth test tool and a second bluetooth test tool and establishes communication connection with a bluetooth device to be tested, wherein the second bluetooth test tool is an expect test tool which is used for controlling the bluetooth device to be tested to execute corresponding test operation according to a specified operation instruction and obtaining a corresponding test result; the first bluetooth testing tool is a bluetooth testing tool, and is used for determining corresponding testing operations to be executed according to a preset testing flow and a testing result so as to generate corresponding testing instructions, and sending the corresponding testing instructions to the second bluetooth testing tool. The Bluetooth device to be tested can be a Bluetooth device to be tested such as low-power Bluetooth, classical Bluetooth and the like.
In a specific application, the Bluetooth equipment to be tested is controlled to be started through an hcilconfig tool in the current Bluetooth test terminal, and the Bluetooth adapter is controlled to be started through a shell script program based on a second Bluetooth test tool and a first Bluetooth test tool.
It can be understood that the second bluetooth test tool expect belongs to an independent tool, and the first bluetooth test tool blue belongs to a bluetooth plug-in, so that the operating system of the current bluetooth test terminal is set as a Ubuntu system, and the bluetooth plug-in of the Ubuntu system and the second bluetooth test tool expect are installed.
S102, controlling a first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to a second Bluetooth testing tool, controlling the Bluetooth equipment to be tested to execute corresponding testing operation through the second Bluetooth testing tool according to the testing instruction, and returning a corresponding testing result until a preset testing flow is detected to be completed.
In a specific application, when the starting completion of the Bluetooth adapter is detected, a first Bluetooth testing tool is controlled to generate a testing instruction based on a first testing operation according to a preset testing procedure, the testing instruction is sent to a second Bluetooth testing tool, the second Bluetooth testing tool is controlled to control Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction, a corresponding testing result is returned, then the testing result is detected through the first Bluetooth testing tool, the next testing operation to be executed is determined according to the detecting result and the preset testing procedure, the corresponding testing instruction is generated and sent to the second Bluetooth testing tool, and the second Bluetooth testing tool is controlled to gradually execute automatic testing operation until the completion of the preset testing procedure is detected according to the testing instruction generated by the first Bluetooth testing tool. The preset test flow is a preset test flow based on a specific sequence and comprising all Bluetooth test operations.
The first Bluetooth testing tool is used for generating a testing instruction, and the second Bluetooth testing tool is used for simulating man-machine interaction operation between the Bluetooth equipment to be tested and the Bluetooth equipment to be tested based on the testing instruction so as to control the Bluetooth equipment to be tested to execute corresponding testing operation, so that the Bluetooth-based automatic testing method for covering the smoke test, the functional test and the stability test is realized, and the testing efficiency and the communication quality between the Bluetooth equipment are improved.
S103, closing the Bluetooth adapter, closing the Bluetooth equipment to be tested, and generating a corresponding automatic test result according to the test result.
In a specific application, when the completion of a preset test flow is detected, the completion of one-time Bluetooth-based automatic test is judged, the Bluetooth adapter is controlled to be closed through a shell script program based on a second Bluetooth test tool and a first Bluetooth test tool, the Bluetooth equipment to be tested is controlled to be closed through an hcicon tool in the current Bluetooth test terminal, and an automatic test result is generated according to a test result returned by the second Bluetooth test tool. The test result is a result returned after the second Bluetooth test tool controls the Bluetooth equipment to be tested to execute the corresponding test operation according to the test instruction every time; correspondingly, the automated test results comprise a plurality of test results.
As shown in fig. 2, in one embodiment, the step S102 includes:
s1021, when a test instruction is detected, controlling the second Bluetooth test tool to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool;
s1022, controlling the first Bluetooth testing tool to generate a corresponding testing instruction according to the testing result, and sending the testing instruction to the second Bluetooth testing tool;
s1023, when the test instruction is detected, controlling the second Bluetooth test tool to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool and the following steps until all the test operations in the preset test flow are detected to be tested, and judging that the preset test flow is completed.
In a specific application, when the completion of the starting of the Bluetooth adapter is detected, a first Bluetooth testing tool is controlled to generate a testing instruction based on a first testing operation according to a preset testing flow, and the testing instruction is sent to a second Bluetooth testing tool; when the second Bluetooth testing tool is detected to receive the testing instruction, the second Bluetooth testing tool is controlled to control the Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction, a corresponding testing result is returned and sent to the first Bluetooth testing tool, the first Bluetooth testing tool is controlled to determine the next corresponding testing operation to be executed according to the testing result and a preset testing flow, and a corresponding testing instruction is generated and sent to the second Bluetooth testing tool; and returning to execute the steps when the second Bluetooth testing tool is detected to receive the testing instruction, controlling the second Bluetooth testing tool to control the Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction, and sending the corresponding testing result to the first Bluetooth testing tool and the following steps, so as to control the Bluetooth equipment to be tested to gradually complete the testing operation through the second Bluetooth testing tool based on the testing instruction generated by the first Bluetooth testing tool according to the testing result until the completion of all the testing operations in the preset testing process is detected, and judging that the preset testing process is completed.
As shown in fig. 3, in one embodiment, the step S1022 includes:
s10221, when the test result is detected to meet the preset condition, controlling the first Bluetooth test tool to determine the next test operation according to the preset test flow, generating a corresponding first test instruction and sending the first test instruction to the second Bluetooth test tool, so that the second Bluetooth test tool controls the Bluetooth device to be tested to execute the corresponding test operation according to the first test instruction and returns the corresponding test result.
In a specific application, when a test result returned by the second Bluetooth test tool is detected to meet a preset condition, judging that the current test operation is successful in test, controlling the first Bluetooth test tool to determine the next test operation of the current test operation according to a preset test flow, generating a first test instruction corresponding to the next test operation, and sending the first test instruction to the second Bluetooth test tool; and controlling the second Bluetooth testing tool to control the Bluetooth equipment to be tested to execute the next testing operation of the current testing operation according to the first testing instruction, and returning a corresponding testing result.
The preset conditions refer to detection conditions for judging whether the test operation is successful or not, and the preset conditions can be specifically set according to different test operations. For example, when the test operation is a device scan test operation, the corresponding preset conditions are: the equipment scanning test result is that the scanning is successful; when the test operation is a mating connection test operation, corresponding preset conditions are as follows: the pairing connection test result is that the pairing connection is successful; when the test operation is a data read-write test operation, corresponding preset conditions are as follows: the data read-write test result is that the data read-write is completed; when the test operation is a disconnection mating connection test operation, corresponding preset conditions are as follows: the disconnection-pairing-connection test results in successful disconnection of the pairing connection relationship with the paired device.
As shown in fig. 3, in one embodiment, the step S1022 further includes:
s10222, when the test result does not meet the preset condition, controlling the first Bluetooth test tool to generate a second test instruction and sending the second test instruction to the second Bluetooth test tool, so that the second Bluetooth test tool controls the Bluetooth device to be tested to return to execute the current test operation according to the second test instruction, and returns the corresponding test result.
In a specific application, when the test result returned by the second Bluetooth test tool is detected to not meet the preset condition, judging that the test result corresponding to the current test operation is failed, controlling the first Bluetooth test tool to generate a second test instruction corresponding to the current test operation, and sending the second test instruction to the second Bluetooth test tool; and controlling the second Bluetooth testing tool to control the Bluetooth equipment to be tested to return to execute the current testing operation according to the second testing instruction corresponding to the current testing operation, and returning a corresponding testing result.
For example, when the current test operation is equipment scanning and the equipment scanning test result returned by the second Bluetooth test tool is detected as scanning failure, judging that the equipment scanning test result does not meet the preset condition, controlling the first Bluetooth test tool to generate an equipment scanning test instruction, and sending the equipment scanning test instruction to the second Bluetooth test tool; and controlling the second Bluetooth testing tool to carry out equipment scanning test operation again according to the equipment scanning test instruction, and obtaining a corresponding equipment scanning test result.
In one embodiment, after the step S103, the method further includes:
and returning to execute the Bluetooth equipment to be tested, and simultaneously starting the Bluetooth adapter and the subsequent operation to finish the preset test flow of preset times.
In a specific application, when the completion of the preset test flow is detected, the execution is returned to start the Bluetooth equipment to be tested, and meanwhile, the Bluetooth adapter and subsequent operations are started to realize the preset test flow of the next cycle until the completion of the preset test flow of the preset times is detected, so that an automatic test result of the preset times is obtained. The preset times can be specifically set according to actual situations, for example, the preset times are set to 100 times by a user, or the preset times are set to the number of all scanned adaptive Bluetooth devices.
In one embodiment, the preset test procedure includes a device scan test operation, a mating connection test operation, a data read-write test operation, and a disconnection mating connection test operation.
In a specific application, the preset test flow includes a device scan test operation, a pairing connection test operation, a data read-write test operation, and a disconnection pairing connection test operation.
It can be understood that, in the automatic detection process based on bluetooth, the test operation in the preset test flow is gradually executed according to a preset sequence; firstly, performing equipment scanning test operation, after detecting that equipment scanning test results are successful in scanning, performing pairing connection test operation, after detecting that pairing connection test results are successful in pairing connection, performing data read-write test operation, after detecting that data read-write test results are successful in data read-write, performing disconnection pairing connection test operation, and when detecting that disconnection pairing connection test results are successful in disconnecting the pairing connection relation with paired equipment, judging that a preset test flow is completed.
For example, when the start of the Bluetooth adapter is detected to be completed, the first Bluetooth testing tool is controlled to generate a test instruction (i.e. a device scanning test instruction) based on a first test operation (i.e. a device scanning test operation) according to a preset test flow, the test instruction is sent to the second Bluetooth testing tool, so that the second Bluetooth testing tool controls the Bluetooth device to be tested to perform the device scanning operation and returns a corresponding device scanning test result, when the device scanning test result is detected to be successful in scanning, the next test operation is determined to be a pairing connection test operation according to the preset test flow, the corresponding test instruction (i.e. the pairing connection test instruction) is generated, the test instruction is sent to the second Bluetooth testing tool, so that the second Bluetooth testing tool controls the Bluetooth device to be tested to establish a pairing connection relation between the Bluetooth device to be tested and the scanned adaptive Bluetooth device, and returns a corresponding pairing connection test result, when the pairing connection test result is detected to be successful, the second Bluetooth testing tool is determined to be data read-write test operation according to the preset test flow, the next test operation is determined to be data read-write test operation, and the data read-write test operation is performed to the second Bluetooth device to be the data read-write test tool, and the data is disconnected when the pairing connection is detected to be the matched, and returning a corresponding disconnection-pairing connection test result, and judging that the preset test flow is finished when the disconnection-pairing connection test result is detected to be the successful disconnection of the pairing connection relation with the paired equipment.
According to the embodiment, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing flow, the second Bluetooth testing tool is controlled to gradually control the Bluetooth equipment to be tested to execute the corresponding testing operation, the Bluetooth-based automatic testing is realized through the simulation of man-machine interaction, and the efficiency of the Bluetooth-based automatic testing and the stability of the testing result are improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the bluetooth-based automatic test method described in the above embodiments, fig. 4 shows a block diagram of a bluetooth-based automatic test device provided in the embodiment of the present application, where the bluetooth-based automatic test device is applied to a bluetooth test terminal; for convenience of explanation, only portions relevant to the embodiments of the present application are shown.
Referring to fig. 4, the bluetooth-based automated test apparatus 100 includes:
a starting module 101, configured to start a bluetooth device to be tested, and start a bluetooth adapter at the same time;
the testing module 102 is configured to control the first bluetooth testing tool to generate a testing instruction and send the testing instruction to the second bluetooth testing tool, so as to control the bluetooth device to be tested to execute a corresponding testing operation according to the testing instruction by using the second bluetooth testing tool, and return a corresponding testing result until a preset testing flow is detected to be completed;
and the generating module 103 is configured to close the bluetooth adapter, close the bluetooth device to be tested, and generate a corresponding automated test result according to the test result.
As shown in fig. 5, in one embodiment, the test module 102 includes:
a control unit 1021, configured to control, when a test instruction is detected, the second bluetooth test tool to control the bluetooth device to be tested to perform a corresponding test operation according to the test instruction, and send a corresponding test result to the first bluetooth test tool;
a test unit 1022, configured to control the first bluetooth test tool to generate a corresponding test instruction according to the test result, and send the test instruction to the second bluetooth test tool;
and the detection unit 1023 is used for returning to execute the steps of controlling the second Bluetooth testing tool to control the Bluetooth equipment to be tested to execute the corresponding testing operation according to the testing instruction when the testing instruction is detected, and sending the corresponding testing result to the first Bluetooth testing tool and the following steps until the completion of all the testing operations in the preset testing process is detected, and judging that the preset testing process is completed.
As shown in fig. 6, in one embodiment, the test unit 1022 includes:
and the first testing subunit is used for controlling the first Bluetooth testing tool to determine the next testing operation according to the preset testing flow when the testing result meets the preset condition, generating a corresponding first testing instruction and sending the corresponding first testing instruction to the second Bluetooth testing tool so that the second Bluetooth testing tool controls the Bluetooth equipment to be tested to execute the corresponding testing operation according to the first testing instruction and returns the corresponding testing result.
As shown in fig. 6, in one embodiment, the test unit 1022 further includes:
and the second testing subunit is used for controlling the first Bluetooth testing tool to generate a second testing instruction and sending the second testing instruction to the second Bluetooth testing tool when the testing result does not meet the preset condition, so that the second Bluetooth testing tool controls the Bluetooth equipment to be tested to return to execute the current testing operation according to the second testing instruction and returns the corresponding testing result.
In one embodiment, the bluetooth-based automated test apparatus further comprises:
and the circulation test module is used for executing the Bluetooth equipment to be tested in a return mode, starting the Bluetooth adapter and the subsequent operation at the same time, and completing a preset test flow of preset times.
In one embodiment, the preset test procedure includes a device scan test operation, a mating connection test operation, a data read-write test operation, and a disconnection mating connection test operation.
According to the embodiment, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing flow, the second Bluetooth testing tool is controlled to gradually control the Bluetooth equipment to be tested to execute the corresponding testing operation, the Bluetooth-based automatic testing is realized through the simulation of man-machine interaction, and the efficiency of the Bluetooth-based automatic testing and the stability of the testing result are improved.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
Fig. 7 is a schematic structural diagram of a bluetooth test terminal according to an embodiment of the present application. As shown in fig. 7, the bluetooth test terminal 7 of this embodiment includes: at least one processor 70 (only one shown in fig. 7), a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, the processor 70, when executing the computer program 72, performing the steps of any of the various bluetooth-based automated test method embodiments described above.
The bluetooth test terminal 7 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The bluetooth test terminal may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of the bluetooth test terminal 7 and is not meant to be limiting as the bluetooth test terminal 7 may include more or less components than illustrated, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 70 may be a central processing unit (Central Processing Unit, CPU) and the processor 70 may be other general purpose processors, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may in some embodiments be an internal storage unit of the bluetooth test terminal 7, such as a hard disk or a memory of the bluetooth test terminal 7. The memory 71 may also be an external storage device of the bluetooth test terminal 7 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card) or the like, which are provided on the bluetooth test terminal 7. Further, the memory 71 may also include both an internal memory unit and an external memory device of the bluetooth test terminal 7. The memory 71 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 71 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The automatic testing method based on Bluetooth is characterized by being applied to a Bluetooth testing terminal, and comprises the following steps:
starting a Bluetooth device to be tested and simultaneously starting a Bluetooth adapter;
controlling a first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to a second Bluetooth testing tool, controlling the Bluetooth equipment to be tested to execute corresponding testing operation through the second Bluetooth testing tool according to the testing instruction, and returning a corresponding testing result until the completion of a preset testing flow is detected; the Bluetooth test terminal comprises a first Bluetooth test tool and a second Bluetooth test tool, wherein the first Bluetooth test tool is a blue test tool; the second Bluetooth testing tool is an expect testing tool;
and closing the Bluetooth adapter, closing the Bluetooth equipment to be tested, and generating a corresponding automatic test result according to the test result.
2. The bluetooth-based automated testing method according to claim 1, wherein the controlling the first bluetooth testing tool to generate a testing instruction and send the testing instruction to the second bluetooth testing tool, so as to control the bluetooth device to be tested to execute a corresponding testing operation according to the testing instruction by the second bluetooth testing tool, and return a corresponding testing result until a preset testing procedure is detected to be completed, includes:
when a test instruction is detected, controlling the second Bluetooth test tool to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool;
controlling the first Bluetooth testing tool to generate a corresponding testing instruction according to the testing result, and sending the corresponding testing instruction to the second Bluetooth testing tool;
and when the test instruction is detected, controlling the second Bluetooth test tool to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool and the following steps until all the test operations in the preset test flow are detected to be finished, and judging that the preset test flow is finished.
3. The bluetooth-based automated test method according to claim 2, wherein the controlling the first bluetooth test tool to generate a corresponding test instruction according to the test result and send the test instruction to the second bluetooth test tool comprises:
when the test result is detected to meet the preset condition, the first Bluetooth test tool is controlled to determine the next test operation according to the preset test flow, a corresponding first test instruction is generated and sent to the second Bluetooth test tool, so that the second Bluetooth test tool controls the Bluetooth equipment to be tested to execute the corresponding test operation according to the first test instruction, and the corresponding test result is returned.
4. The automated bluetooth-based testing method according to claim 2, wherein the controlling the first bluetooth testing tool to generate a corresponding test instruction according to the test result and send the test instruction to the second bluetooth testing tool further comprises:
when the test result does not meet the preset condition, the first Bluetooth test tool is controlled to generate a second test instruction and send the second test instruction to the second Bluetooth test tool, so that the second Bluetooth test tool controls the Bluetooth equipment to be tested to return to execute the current test operation according to the second test instruction and returns the corresponding test result.
5. The bluetooth-based automated testing method according to any one of claims 1 to 4, wherein the turning off the bluetooth adapter, turning off the bluetooth device to be tested, and generating a corresponding automated test result according to the test result, further comprises:
and returning to execute the Bluetooth equipment to be tested, and simultaneously starting the Bluetooth adapter and the subsequent operation to finish the preset test flow of preset times.
6. The automated bluetooth based testing method according to any one of claims 1 to 4, wherein the predetermined testing procedure comprises a device scan test operation, a pairing connection test operation, a data read-write test operation, and a disconnection pairing connection test operation.
7. An automated testing device based on bluetooth, which is characterized in that is applied to bluetooth test terminal, the automated testing device based on bluetooth includes:
the starting module is used for starting the Bluetooth equipment to be tested and simultaneously starting the Bluetooth adapter;
the testing module is used for controlling the first Bluetooth testing tool to generate a testing instruction and sending the testing instruction to the second Bluetooth testing tool so as to control the Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction through the second Bluetooth testing tool and returning a corresponding testing result until the completion of a preset testing flow is detected; the Bluetooth test terminal comprises a first Bluetooth test tool and a second Bluetooth test tool, wherein the first Bluetooth test tool is a blue test tool; the second Bluetooth testing tool is an expect testing tool;
and the generation module is used for closing the Bluetooth adapter, closing the Bluetooth equipment to be tested and generating a corresponding automatic test result according to the test result.
8. The bluetooth-based automated test apparatus of claim 7, wherein the test module comprises:
the control unit is used for controlling the second Bluetooth testing tool to control the Bluetooth equipment to be tested to execute corresponding testing operation according to the testing instruction when the testing instruction is detected, and sending a corresponding testing result to the first Bluetooth testing tool;
the testing unit is used for controlling the first Bluetooth testing tool to generate a corresponding testing instruction according to the testing result and sending the testing instruction to the second Bluetooth testing tool;
and the detection unit is used for returning to execute the steps of controlling the second Bluetooth test tool to control the Bluetooth equipment to be tested to execute corresponding test operation according to the test instruction when the test instruction is detected, and sending the corresponding test result to the first Bluetooth test tool and the following steps until the completion of all the test operations in the preset test flow is detected, and judging that the preset test flow is completed.
9. A bluetooth test terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 6.
CN202110339660.2A 2021-03-30 2021-03-30 Bluetooth-based automatic test method and device and Bluetooth test terminal Active CN112996020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110339660.2A CN112996020B (en) 2021-03-30 2021-03-30 Bluetooth-based automatic test method and device and Bluetooth test terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110339660.2A CN112996020B (en) 2021-03-30 2021-03-30 Bluetooth-based automatic test method and device and Bluetooth test terminal

Publications (2)

Publication Number Publication Date
CN112996020A CN112996020A (en) 2021-06-18
CN112996020B true CN112996020B (en) 2023-06-02

Family

ID=76338209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110339660.2A Active CN112996020B (en) 2021-03-30 2021-03-30 Bluetooth-based automatic test method and device and Bluetooth test terminal

Country Status (1)

Country Link
CN (1) CN112996020B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448317A (en) * 2021-06-29 2021-09-28 上海移远通信技术股份有限公司 Module testing system and module testing method
CN114040196B (en) * 2021-12-10 2023-11-07 国科海芯(上海)微电子有限公司 Bluetooth equipment testing method, testing control host and Bluetooth testing system
CN114222320A (en) * 2021-12-16 2022-03-22 展讯通信(上海)有限公司 Method, device, apparatus, storage medium, and program for testing communication device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523052B (en) * 2011-12-01 2014-07-09 无锡中星微电子有限公司 Testing method and testing device
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
CN107689900A (en) * 2017-09-04 2018-02-13 福建新大陆支付技术有限公司 Automatic testing mobile phone and the method and system of mPOS machines compatibility
CN111277303A (en) * 2020-02-18 2020-06-12 杭州涂鸦信息技术有限公司 Production testing method and system based on universal asynchronous receiving and transmitting transmitter to Bluetooth

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test

Also Published As

Publication number Publication date
CN112996020A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN110875850B (en) Firmware upgrading method and system, readable storage medium and terminal equipment
CN113490192B (en) Bluetooth connection method, device, terminal equipment and readable storage medium
CN109375937A (en) Method for upgrading system, device, terminal device and storage medium
CN108733403B (en) BIOS setting method and device
CN110297764B (en) Vulnerability test model training method and device
CN113541741A (en) Analog card switching method and device, electronic equipment and storage medium
CN112817883A (en) Method, device and system for adapting interface platform and computer readable storage medium
CN111949470A (en) Chip verification method and device, electronic equipment and storage medium
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
US10740218B2 (en) Method and device for determining usage log
CN107885674B (en) Bluetooth device simulator, working method thereof and Bluetooth device operating system
CN107451067B (en) Processing method for downloading test and related product
CN109522174A (en) Control adb enabled method, apparatus, terminal and storage medium
CN113472611A (en) Method and device for acquiring WiFi signal strength and readable storage medium
CN115202949A (en) Chip signal monitoring device and method, computer equipment and storage medium
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN113760631A (en) Page loading duration determination method, device, equipment and storage medium
CN112667498A (en) Server building method and device, computer equipment and readable storage medium
CN110874252A (en) Focus control method, device and equipment
CN115576821B (en) Verification method and device, electronic equipment and storage medium
CN114070659B (en) Equipment locking method and device and terminal equipment
CN114826907B (en) PCIe RC and EP mode switching method, device, equipment and medium
CN111506477B (en) Log capture method and device of touch screen and mobile terminal
CN114327602B (en) Information processing method, device, electronic equipment and storage medium

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