CN112996020A - Bluetooth-based automatic testing method and device and Bluetooth testing terminal - Google Patents

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

Info

Publication number
CN112996020A
CN112996020A CN202110339660.2A CN202110339660A CN112996020A CN 112996020 A CN112996020 A CN 112996020A CN 202110339660 A CN202110339660 A CN 202110339660A CN 112996020 A CN112996020 A CN 112996020A
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.)
Granted
Application number
CN202110339660.2A
Other languages
Chinese (zh)
Other versions
CN112996020B (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)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application is suitable for 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 the Bluetooth device to be tested and the Bluetooth adapter; 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 second Bluetooth testing tool to execute corresponding testing operation and return a corresponding testing result until the preset testing process is detected to be completed; and closing the Bluetooth adapter and the Bluetooth equipment to be tested and generating a corresponding automatic test result. The automatic test based on the Bluetooth is realized by simulating human-computer interaction through the first Bluetooth test tool and the second Bluetooth test tool, and the efficiency of the automatic test based on the Bluetooth and the stability of a test result are improved.

Description

Bluetooth-based automatic testing method and device and Bluetooth testing 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 homes and equipment gradually go deep into the lives of people. Wherein, the bluetooth is as an important module in intelligent house, the equipment, and its test link is also indispensable.
In the related Bluetooth test technology, the test operation is complicated, the test efficiency is low, and the communication quality between the 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, and can solve the problems that the related Bluetooth testing method is complicated in testing operation, low in testing efficiency, incapable of guaranteeing communication quality among Bluetooth devices and the like.
In a first aspect, an embodiment of the present application provides an automatic testing method based on bluetooth, which is applied to a bluetooth testing terminal, and the automatic 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 so as to control the Bluetooth device to be tested to execute corresponding testing operation according to the testing instruction through the second Bluetooth testing tool and return a corresponding testing result until a preset testing process is detected to be completed;
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 automatic testing apparatus based on bluetooth, which is applied to a bluetooth testing terminal, and the automatic testing apparatus based on bluetooth includes:
the starting module is used for starting the Bluetooth equipment to be tested and starting the Bluetooth adapter at the same time;
the test module is used for controlling the first Bluetooth test tool to generate a test instruction and sending the test instruction to the second Bluetooth test tool so as to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction through the second Bluetooth test tool and return a corresponding test result until the preset test flow is detected to be completed;
and the generating 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, when executing the computer program, implements the bluetooth-based automatic test method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the bluetooth-based automatic testing method according to any one of the first aspect is implemented.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the bluetooth-based automatic test method according to any one of the above first aspects.
According to the embodiment of the application, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing process, 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 by simulating the man-machine interaction, and the efficiency of the Bluetooth-based automatic testing and the stability of the testing result are improved.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an automated testing method based on bluetooth according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a step S102 of the automatic testing method based on bluetooth according to an embodiment of the present application;
fig. 3 is a flowchart illustrating step S1022 of the bluetooth-based automatic testing method according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of an automated testing device based on Bluetooth according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of the test module 102 according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a test unit 1022 according to an embodiment of the present disclosure;
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 structures, 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 will 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 and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this 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 present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The automatic testing method based on the Bluetooth can be applied to terminal equipment such as mobile phones, tablet computers, wearable equipment, notebook computers and Bluetooth testing terminals, and the specific type of the terminal equipment is not limited at all.
Fig. 1 shows a schematic flow chart of the bluetooth-based automated testing method provided in the present application, which may be applied to a bluetooth test terminal by way of example and not limitation.
S101, starting the Bluetooth device to be tested and starting the Bluetooth adapter at the same time.
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 the bluetooth device to be tested, wherein the second bluetooth test tool is an expect test tool and is used for controlling the bluetooth device to be tested to execute corresponding test operation according to an appointed operation instruction and obtaining a corresponding test result; the first bluetooth test tool is a bluetooth test tool, and is used for determining a corresponding test operation to be executed according to a preset test flow and a test result to generate a corresponding test instruction and sending the test instruction to the second bluetooth test tool. The Bluetooth device to be tested can be Bluetooth devices needing to be tested, such as low-power Bluetooth, classic Bluetooth and the like.
In specific application, the Bluetooth device to be tested is controlled to start through the hcicconfig tool in the current Bluetooth test terminal, and the Bluetooth adapter is controlled to start through the shell script program based on the second Bluetooth test tool and the 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 bluetooth is a bluetooth plug-in, so the operating system of the current bluetooth test terminal is set to be the Ubuntu system, and the bluetooth plug-in and the second bluetooth test tool expect of the Ubuntu system 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 to-be-tested Bluetooth equipment to execute corresponding testing operation according to the testing instruction through the second Bluetooth testing tool, and returning a corresponding testing result until a preset testing process is detected to be completed.
In a specific application, when the completion of the starting of the Bluetooth adapter is detected, the first Bluetooth test tool is controlled to generate a test instruction based on a first test operation according to a preset test flow, and sends the test instruction to the second Bluetooth test tool to control the Bluetooth device to be tested to execute the corresponding test operation according to the test instruction and return the corresponding test result, then the test result is detected by the first Bluetooth test tool, the next test operation to be executed is determined according to the detection result and the preset test flow, and generating a corresponding test instruction and sending the test instruction to a second Bluetooth test tool, so that the second Bluetooth test tool controls the Bluetooth device to be tested to gradually execute the automatic test operation according to the test instruction generated by the first Bluetooth test tool until the preset test flow is detected to be completed. The preset test flow refers to a preset test flow containing all bluetooth test operations based on a specific sequence.
The first Bluetooth testing tool generates a testing instruction, and the second Bluetooth testing tool simulates man-machine interaction operation with 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 covering smoking testing, function testing and stability testing is realized, and the testing efficiency and the communication quality between the Bluetooth equipment are improved.
S103, the Bluetooth adapter is closed, the Bluetooth device to be tested is closed, and a corresponding automatic test result is generated according to the test result.
In specific application, when the preset test flow is detected to be completed, judging that one automatic test based on the Bluetooth is completed, controlling the Bluetooth adapter to be closed through a shell script program based on a second Bluetooth test tool and a first Bluetooth test tool, controlling the Bluetooth equipment to be tested to be closed through an hciconfig tool in the current Bluetooth test terminal, and generating an automatic test result according to a test result returned by the second Bluetooth test tool. The test result refers to a result returned after the second Bluetooth test tool controls the Bluetooth device to be tested to execute the corresponding test operation according to the test instruction each time; correspondingly, the automatic test result comprises a plurality of test results.
As shown in fig. 2, in an 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 corresponding testing instruction to the second Bluetooth testing tool;
and S1023, returning to execute, when the test instruction is detected, controlling the second Bluetooth test tool to control the to-be-tested Bluetooth equipment to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool and the subsequent steps until all test operations in the preset test flow are detected to be completed, and judging that the preset test flow is completed.
In specific application, when the Bluetooth adapter is detected to be started completely, a first Bluetooth test tool is controlled to generate a test instruction based on a first test operation according to a preset test flow and send the test instruction to a second Bluetooth test tool; when detecting that the second Bluetooth testing tool receives the testing instruction, controlling the second Bluetooth testing tool to control the Bluetooth device to be tested to execute corresponding testing operation according to the testing instruction, returning a corresponding testing result and sending the corresponding testing result to the first Bluetooth testing tool, controlling the first Bluetooth testing tool to determine the next corresponding testing operation to be executed according to the testing result and a preset testing flow, generating a corresponding testing instruction and sending the corresponding testing instruction to the second Bluetooth testing tool; and when the second Bluetooth testing tool receives the testing instruction, controlling the second Bluetooth testing tool to control the Bluetooth device 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 subsequent steps, so that the Bluetooth device to be tested is controlled to gradually complete the testing operation through the testing instruction generated by the second Bluetooth testing tool based on the first Bluetooth testing tool according to the testing result, and when the testing completion of all testing operations in the preset testing flow is detected, the preset testing flow is judged to be completed.
As shown in fig. 3, in an embodiment, the step S1022 includes:
s10221, when detecting that the test result meets a preset condition, controlling the first Bluetooth test tool to determine a next test operation according to the preset test flow, generating a corresponding first test instruction and sending the corresponding 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 returning the corresponding test result.
In specific application, when detecting that a test result returned by the second Bluetooth test tool meets a preset condition, judging that the test of the current test operation is successful, 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 test tool to execute the next test operation of the current test operation by the Bluetooth device to be tested according to the first test instruction, and returning a corresponding test result.
The preset condition is a detection condition for determining whether the test operation is successful, and can be specifically set according to different test operations. For example, when the test operation is a device scan test operation, the corresponding preset condition is: the equipment scanning test result indicates that the scanning is successful; when the test operation is the pairing connection test operation, the corresponding preset conditions are as follows: the pairing connection test result indicates that the pairing connection is successful; when the test operation is a data read-write test operation, the 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 pairing connection test operation, the corresponding preset conditions are as follows: and the result of the pairing connection disconnection test is that the pairing connection relation with the paired equipment is successfully disconnected.
As shown in fig. 3, in an embodiment, the step S1022 further includes:
s10222, when detecting that the test result does not satisfy 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 specific application, when detecting that a test result returned by the second Bluetooth test tool does not meet a preset condition, judging that the test result corresponding to the current test operation is a failure, 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 test tool to control the Bluetooth device to be tested to return to execute the current test operation according to a second test instruction corresponding to the current test operation, and returning a corresponding test result.
For example, when the current test operation is equipment scanning and it is detected that an equipment scanning test result returned by the second bluetooth test tool is a scanning failure, it is determined that the equipment scanning test result does not meet a preset condition, and the first bluetooth test tool is controlled to generate an equipment scanning test instruction and send the equipment scanning test instruction to the second bluetooth test tool; and controlling the second Bluetooth test tool to perform equipment scanning test operation again according to the equipment scanning test instruction, and obtaining a corresponding equipment scanning test result.
In one embodiment, after step S103, the method further includes:
and returning to execute the starting of the Bluetooth device to be tested, starting the Bluetooth adapter and the subsequent operation at the same time, and completing the preset test flow of preset times.
In specific application, when the preset test flow is detected to be completed, the Bluetooth device to be tested is returned to be started, and the Bluetooth adapter and the subsequent operation are started at the same time, so that the next circulating preset test flow is realized until the preset test flow with preset times is detected to be completed, and the automatic test result with the preset times is obtained. The preset number of times may be specifically set according to an actual situation, for example, a user sets the preset number of times to be 100 times, or sets the preset number of times to be the number of all the scanned adaptive bluetooth devices.
In one embodiment, the preset test process includes a device scan test operation, a pairing connection test operation, a data read/write test operation, and a disconnection pairing 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 operations in the preset test flow are executed step by step according to a preset sequence; the method comprises the steps of firstly carrying out equipment scanning test operation, executing pairing connection test operation after detecting that the equipment scanning test result is successful in scanning, executing data read-write test operation after detecting that the pairing connection test result is successful in pairing connection, executing disconnection pairing connection test operation after detecting that the data read-write test result is successful in data read-write, and judging that a preset test flow is completed when detecting that the disconnection pairing connection test result is successful in disconnection of the pairing connection relation with paired equipment.
For example, when the completion of the start of the bluetooth adapter is detected, the first bluetooth testing tool is controlled to generate a testing instruction (i.e. a device scanning testing instruction) based on a first testing operation (i.e. a device scanning testing operation) according to a preset testing process, the testing 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 return a corresponding device scanning testing result, when the device scanning testing result is detected to be successful, the next testing operation is determined to be a pairing connection testing operation according to the preset testing process, the corresponding testing instruction (i.e. a pairing connection testing instruction) is generated and sent to the second bluetooth testing tool so that the second bluetooth testing tool controls the bluetooth device to be tested and the scanned adaptive bluetooth device to establish a pairing connection relationship and returns a corresponding pairing connection testing result, when the pairing connection test result is detected to be successful, determining the next test operation as a data read-write test operation according to a preset test flow, generating a data read-write test instruction and sending the data read-write test instruction to a second Bluetooth test tool so that the second Bluetooth test tool controls the Bluetooth device to be tested to read and write the data of the paired Bluetooth device, and returning the corresponding data read-write test result, when the data read-write test result is detected to be complete, determining the next test operation as a disconnection pairing connection test operation according to the preset test flow, generating a disconnection pairing connection test instruction and sending the disconnection pairing connection test instruction to the second Bluetooth test tool so that the second Bluetooth test tool controls the Bluetooth device to be tested to be disconnected from the pairing connection relation with the paired Bluetooth device, and returning the corresponding disconnection pairing connection test result, when the disconnection pairing connection test result is detected to be successful, and judging that the preset test flow is finished.
In the embodiment, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing process, the second Bluetooth testing tool is controlled to gradually control the Bluetooth device to be tested to execute the corresponding testing operation, the Bluetooth-based automatic testing is realized by simulating human-computer 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 numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the above-described automatic testing method based on bluetooth, fig. 4 shows a block diagram of an automatic testing apparatus based on bluetooth according to an embodiment of the present application, where the automatic testing apparatus based on bluetooth is applied to a bluetooth testing terminal; for convenience of explanation, only portions related to the embodiments of the present application are shown.
Referring to fig. 4, the bluetooth-based automated test apparatus 100 includes:
the starting module 101 is used for starting the Bluetooth equipment to be tested and starting the Bluetooth adapter at the same time;
the test module 102 is configured to control a first bluetooth test tool to generate a test instruction and send the test instruction to a second bluetooth test tool, so that the second bluetooth test tool controls the to-be-tested bluetooth device to execute a corresponding test operation according to the test instruction, and returns a corresponding test result until a preset test flow is detected to be completed;
and the generating module 103 is used for turning off the Bluetooth adapter, turning off the Bluetooth device to be tested, and generating a corresponding automatic test result according to the test result.
As shown in fig. 5, in one embodiment, the test module 102 includes:
the control unit 1021 is used for controlling the second bluetooth test tool to control the to-be-tested bluetooth device to execute corresponding test operation according to the test instruction and sending a corresponding test result to the first bluetooth test tool when the test instruction is detected;
the testing unit 1022 is configured to control the first bluetooth testing tool to generate a corresponding testing instruction according to the testing result, and send the corresponding testing instruction to the second bluetooth testing tool;
and the detection unit 1023 is used for returning and executing the test instruction, controlling the second Bluetooth test tool to control the to-be-tested Bluetooth equipment to execute the corresponding test operation according to the test instruction, and sending the corresponding test result to the first Bluetooth test tool and the subsequent steps until all test operations in the preset test flow are detected to be completed, and judging that the preset test flow 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 detecting that 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 device to be tested to execute the corresponding testing operation according to the first testing instruction, and returning the corresponding testing result.
As shown in fig. 6, in an 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 send the second testing instruction to the second Bluetooth testing tool when detecting that the testing result does not meet the preset condition, so that the second Bluetooth testing tool controls the to-be-tested Bluetooth equipment to return to execute the current testing operation according to the second testing instruction and return to the corresponding testing result.
In one embodiment, the bluetooth-based automated testing apparatus further comprises:
and the circulating test module is used for returning to execute the starting of the Bluetooth equipment to be tested, starting the Bluetooth adapter and the subsequent operation at the same time, and completing the preset test flow of preset times.
In one embodiment, the preset test process includes a device scan test operation, a pairing connection test operation, a data read/write test operation, and a disconnection pairing connection test operation.
In the embodiment, the first Bluetooth testing tool generates the corresponding testing instruction based on the preset testing process, the second Bluetooth testing tool is controlled to gradually control the Bluetooth device to be tested to execute the corresponding testing operation, the Bluetooth-based automatic testing is realized by simulating human-computer interaction, and the efficiency of the Bluetooth-based automatic testing and the stability of the testing result are improved.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not 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 implementing the steps in any of the various bluetooth-based automated testing method embodiments described above when executing the computer program 72.
The bluetooth test terminal 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The bluetooth test terminal may include, but is not limited to, a processor 70, a memory 71. It will be understood by those skilled in the art that fig. 7 is merely an example of the bluetooth test terminal 7, and does not constitute a limitation of the bluetooth test terminal 7, and may include more or less components than those shown, or combine some components, or different components, such as input-output devices, network access devices, etc.
The Processor 70 may be a Central Processing Unit (CPU), and the Processor 70 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. 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. In other embodiments, the memory 71 may also be an external storage device of the bluetooth test terminal 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), and the like, which are equipped on the bluetooth test terminal 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the bluetooth test terminal 7. The memory 71 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 71 may also be used to temporarily store 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-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of 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 processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an 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 apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. The automatic test method based on the Bluetooth is characterized by being applied to a Bluetooth test terminal and comprising 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 so as to control the Bluetooth device to be tested to execute corresponding testing operation according to the testing instruction through the second Bluetooth testing tool and return a corresponding testing result until a preset testing process is detected to be completed;
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 automated testing method based on bluetooth as claimed in 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 through the second bluetooth testing tool, and return a corresponding testing result until the completion of a preset testing process is detected, comprises:
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 to-be-tested Bluetooth equipment to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool and the subsequent steps until all test operations in the preset test flow are detected to be completed, and judging that the preset test flow is completed.
3. The automated testing method based on bluetooth as claimed in claim 2, wherein the controlling the first bluetooth testing tool to generate a corresponding testing command according to the testing result and sending the testing command to the second bluetooth testing tool comprises:
and when detecting that the test result meets a 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 corresponding 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 returning the corresponding test result.
4. The automated testing method based on bluetooth as claimed in claim 2, wherein the controlling the first bluetooth testing tool to generate a corresponding testing command according to the testing result and sending the testing command to the second bluetooth testing tool further comprises:
and when the test result is detected not to 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 return to the corresponding test result.
5. The automated testing method based on bluetooth 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 after generating the corresponding automated testing result according to the testing result, further comprises:
and returning to execute the starting of the Bluetooth device to be tested, starting the Bluetooth adapter and the subsequent operation at the same time, and completing the preset test flow of preset times.
6. The automated Bluetooth-based testing method of any one of claims 1 to 4, wherein the predetermined testing process comprises a device scan testing operation, a pairing connection testing operation, a data read-write testing operation, and a disconnection pairing connection testing operation.
7. The utility model provides an automatic testing arrangement based on bluetooth which characterized in that is applied to bluetooth test terminal, automatic testing arrangement based on bluetooth includes:
the starting module is used for starting the Bluetooth equipment to be tested and starting the Bluetooth adapter at the same time;
the test module is used for controlling the first Bluetooth test tool to generate a test instruction and sending the test instruction to the second Bluetooth test tool so as to control the Bluetooth device to be tested to execute corresponding test operation according to the test instruction through the second Bluetooth test tool and return a corresponding test result until the preset test flow is detected to be completed;
and the generating 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 automated bluetooth-based testing apparatus according to claim 7, wherein the testing module comprises:
the control unit is used for controlling the second Bluetooth test tool to control the to-be-tested Bluetooth equipment to execute corresponding test operation according to the test instruction and sending a corresponding test result to the first Bluetooth test tool when the test instruction is detected;
the test unit is used for controlling the first Bluetooth test tool to generate a corresponding test instruction according to the test result and sending the test instruction to the second Bluetooth test tool;
and the detection unit is used for returning and executing the test instruction, controlling the second Bluetooth test tool to control the to-be-tested Bluetooth equipment to execute corresponding test operation according to the test instruction, and sending a corresponding test result to the first Bluetooth test tool and the subsequent steps until the test completion of all 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, in which a computer program is stored which, when being executed by a processor, carries out 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 true CN112996020A (en) 2021-06-18
CN112996020B 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)

Cited By (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
CN114040196A (en) * 2021-12-10 2022-02-11 国科海芯(上海)微电子有限公司 Bluetooth device testing method, test 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
CN102523052A (en) * 2011-12-01 2012-06-27 无锡中星微电子有限公司 Testing method and testing device
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test
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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523052A (en) * 2011-12-01 2012-06-27 无锡中星微电子有限公司 Testing method and testing device
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test
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

Cited By (4)

* 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
CN114040196A (en) * 2021-12-10 2022-02-11 国科海芯(上海)微电子有限公司 Bluetooth device testing method, test control host and Bluetooth testing system
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

Also Published As

Publication number Publication date
CN112996020B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN112996020A (en) Bluetooth-based automatic testing method and device and Bluetooth testing terminal
CN107256707B (en) Voice recognition method, system and terminal equipment
CN108984389B (en) Application program testing method and terminal equipment
CN112000351B (en) Updating method, updating device, updating equipment and storage medium of BMC (baseboard management controller) firmware
CN109408355B (en) Test case obtaining method and device
US20230214243A1 (en) One-machine multi-control method, apparatus, system and electronic device
CN110297764B (en) Vulnerability test model training method and device
CN111693294A (en) Vehicle detection method and device, terminal equipment and storage medium
CN111291443A (en) Automatic generation method, device, equipment and storage medium for I/O module model of vehicle control unit software
CN115656788B (en) Chip testing system, method, equipment and storage medium
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN116340265A (en) Log extraction method and device, electronic equipment and vehicle
CN107885674B (en) Bluetooth device simulator, working method thereof and Bluetooth device operating system
CN107451067B (en) Processing method for downloading test and related product
CN115985382A (en) Flash memory test method, device, equipment and storage medium
CN115577363A (en) Detection method and device for deserialization utilization chain of malicious code
CN115587026A (en) Chip testing method and device, storage medium and chip
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium
CN113472611A (en) Method and device for acquiring WiFi signal strength and readable storage medium
CN113805854A (en) Method, system and device for realizing Hook of application layer based on Linux system and storage medium
CN113434423A (en) Interface test method and device
CN113742156A (en) Joint debugging method and device, electronic equipment and storage medium
CN112084099A (en) Method, device and equipment for obtaining alarm state value based on host and storage medium
CN111027196A (en) Simulation analysis task processing method and device for power 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