Bluetooth key connection simulation detection method, device, electronic device and storage medium
By installing the Bluetooth key APP on the smart terminal device and communicating with the Bluetooth module, combined with the PC -side test tool preparation and running test script, the problem of unstable communication between the vehicle and the Bluetooth key has been solved, and the efficient Bluetooth key connection stability test test is achieved. And automated testing reduces labor and resource costs.
Patent Information
- Application Number
- CN202211033950.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-08-26
AI Technical Summary
In the prior art, the communication between the vehicle and the Bluetooth key has problems such as unstable connection and long connection time, which makes it difficult for car owners to connect to the vehicle when using the Bluetooth key, and the existing detection methods are complex and cumbersome, consuming manpower and resource costs.
Provide a Bluetooth key connection simulation detection method. By installing the Bluetooth key APP on the smart terminal device, the Bluetooth communication status is obtained. Special testing and automation test connecting stability.
The efficiency of the Bluetooth key connection stability test has been improved, the cost of labor and resource costs is reduced, and the automatic generation of completing batch testing and testing reports is achieved at unmanned conditions.
Smart Images

Figure CN115396944B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile intelligent technology, and in particular to a Bluetooth key connection simulation detection method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of the Internet of Things, the physical keys used in traditional cars have gradually evolved into Bluetooth keys. Replacing physical car keys with mobile phone Bluetooth keys has become a trend in the development of car keys. The Bluetooth key application is based on the Bluetooth connection channel between the mobile phone Bluetooth and the car Bluetooth module through security authentication, and the mobile phone application sends control instructions to the car Bluetooth module. However, at this stage, the communication between the vehicle and the Bluetooth key still has problems such as unstable connection and long connection time. When using the Bluetooth key, the car owner still has the situation that he is close to the vehicle but cannot connect to the vehicle. Therefore, there is a great need to test the connection stability of the Bluetooth key.
[0003] Although there are some detection methods and devices for testing the connection stability of Bluetooth keys on the market, most of them communicate through multiple modules (such as car Bluetooth key modules, CAN / LIN modules, programmable power modules, etc.), which makes it difficult to coordinate multiple test resources; and the entire detection system is too complicated, which increases the learning cost for mobile phone testers to a certain extent. The entire detection system link is long and the test process is complicated. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a Bluetooth key connection simulation detection method, device, electronic device and storage medium to solve the problem of numerous modules and complex testing process required for automobile Bluetooth key connection stability testing in the prior art.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] The Bluetooth key connection simulation detection method provided by the present invention includes:
[0007] Install a Bluetooth key APP on the smart terminal device for users to control the car via Bluetooth;
[0008] Obtain the Bluetooth communication status between the Bluetooth key APP and the car Bluetooth key module;
[0009] If the Bluetooth key APP communicates normally with the car Bluetooth key module, the smart terminal device is connected to the PC interface and the smart terminal device is identified by the test tool;
[0010] Compile a test script for Bluetooth key connection test by using the test tool;
[0011] Run the test script and generate a test report.
[0012] According to the above technical means, the method can conduct special tests on the stability of Bluetooth key connection, complete batch automated tests from command issuance to response result determination and automatic generation of test reports under unmanned conditions, thereby improving test efficiency and reducing labor costs and resource costs.
[0013] In one embodiment of the present invention, the obtaining of the communication status between the Bluetooth key APP and the vehicle Bluetooth key module includes:
[0014] Send a connection instruction to the car Bluetooth key module through the Bluetooth key APP;
[0015] If the Bluetooth key APP obtains the execution result returned by the car Bluetooth key module, it indicates that the Bluetooth key APP communicates normally with the car Bluetooth key module.
[0016] According to the above technical means, the communication status between the Bluetooth key APP and the car Bluetooth key module can be obtained simply and quickly, and the subsequent steps can be continued when the communication is normal; if the communication fails, it is necessary to reconnect to ensure that the Bluetooth key APP and the car Bluetooth key module are connected and communicated.
[0017] In one embodiment of the present invention, the testing tool is Airtest, and the script is compiled using the python language.
[0018] According to the above technical means, the Airtest test tool can be used in combination with the python language for script compilation to test the stability of the Bluetooth connection by running the script.
[0019] In one embodiment of the present invention, the running of the test script and generating a test report includes:
[0020] Run the test case to trigger the Bluetooth key APP to send control instructions to the car Bluetooth key module; wherein the test case is a functional script compiled on Airtest;
[0021] Obtaining a feedback result generated by the car Bluetooth key module according to the control instruction;
[0022] A test report is generated according to the feedback result.
[0023] According to the above technical means, it is possible to simply and quickly implement the compilation of functional scripts for Bluetooth key connection testing and generate a test report.
[0024] In one embodiment of the present invention, the method further includes: adding a loop statement to the function script to execute the function script in a loop as a function use case.
[0025] According to the above technical means, it is possible to simply and quickly compile a test script for a Bluetooth key connection test and implement the test function.
[0026] In an embodiment of the present invention, the test report includes a Bluetooth key connection success time, a Bluetooth key connection failure time, and a Bluetooth key control response time.
[0027] According to the above technical means, the corresponding test report can be generated simply and quickly, and fed back to the operator for reference.
[0028] In one embodiment of the present invention, a car control unit is provided on the Bluetooth key APP, and the car control unit includes Bluetooth connection, unlocking, locking and start buttons to send Bluetooth connection instructions, unlocking instructions, locking instructions and start instructions to the car respectively.
[0029] According to the above technical means, various vehicle control commands can be executed through the Bluetooth key APP to control various functions of the vehicle.
[0030] The present invention also provides a Bluetooth key connection simulation detection device, the device comprising:
[0031] An application installation module, configured to install a Bluetooth key APP on a smart terminal device for a user to control a car via Bluetooth;
[0032] A status acquisition module, configured to acquire the communication status between the Bluetooth key APP and the car Bluetooth;
[0033] The device identification module is configured to connect the smart terminal device to the PC if the Bluetooth key APP and the car Bluetooth communication are normal, and identify the smart terminal device through a test tool;
[0034] A script creation module, configured to compile a test script for Bluetooth key connection testing through the test tool;
[0035] The script testing module is configured to run the test script and generate a test report.
[0036] According to the above-mentioned technical means, the device can perform special tests on the stability of Bluetooth key connection, complete batch automated tests from command issuance to response result determination and automatic generation of test reports under unmanned conditions, thereby improving test efficiency and reducing labor costs and resource costs.
[0037] The present invention further provides an electronic device, comprising:
[0038] one or more processors;
[0039] The storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the Bluetooth key connection simulation detection method as described above.
[0040] According to the above technical means, the electronic device can simply and quickly implement the Bluetooth key connection simulation detection method as described above.
[0041] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer is enabled to execute the Bluetooth key connection simulation detection method as described above.
[0042] According to the above technical means, the storage medium can simply and quickly enable a computer to execute the above-mentioned Bluetooth key connection simulation detection method.
[0043] Beneficial effects of the present invention:
[0044] The present invention can perform a special test on the connection stability of the Bluetooth key, complete batch automated testing from command issuance to response result determination and automatic generation of test reports under unmanned conditions, thereby improving test efficiency and reducing labor costs and resource costs.
[0045] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0047] Figure 1 is a schematic diagram of an implementation environment of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application;
[0048] Figure 2 This is a flow chart of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application. Figure 1 ;
[0049] Figure 3 is a flowchart of step S250 of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application;
[0050] Figure 4 is a block diagram of a Bluetooth key connection simulation detection device shown in an exemplary embodiment of the present application;
[0051] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0053] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0054] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0055] With the increasing number of car users and the rapid development and popularization of smart mobile terminals, people carry smart terminals with them and can use various APPs on smart terminals easily and skillfully. While enjoying high-tech life, they can also enjoy the convenience brought by it in all aspects. With the popularity of cars in the lives of ordinary people, applying more intelligent technology to cars has also become an important topic for major automobile manufacturers and related scientific research units. For example, using Bluetooth keys installed on smart terminals instead of ordinary keys to start the engine and control various functions of the vehicle can not only bring customers a high-end technological experience, but also make it more convenient and comfortable to use, while reducing the cost of using the car. However, at this stage, the communication between vehicles and Bluetooth keys still has problems such as unstable connection and long connection time. When car owners use Bluetooth keys, they still cannot connect to the vehicle even when they are close to the vehicle. Therefore, there is a great need to test the connection stability of Bluetooth keys. Most of the existing detection methods and smart terminal devices are cumbersome and complicated, inconvenient to use, and labor-intensive and costly.
[0056] To solve the above problems, the embodiments of the present application respectively propose a Bluetooth key connection simulation detection method, a Bluetooth key connection simulation detection device, an electronic device and a storage medium, which will be described in detail below.
[0057] It should be noted that the user described in the following embodiments refers to the driver or passenger of the car; the car computer refers to the car and its internal systems. Functions of Bluetooth keys: Completely replace traditional physical keys through smart terminals. You only need one smart terminal to complete various operations such as vehicle locking / unlocking, trunk opening / closing, vehicle information acquisition, and key sharing; keyless entry and start of the vehicle can be achieved. Technical route of Bluetooth keys: After the vehicle-side Bluetooth module receives the information from the smart terminal Bluetooth module, it executes the results after data decryption and analysis and feeds back the results to the smart terminal Bluetooth module, which not only brings a new key experience to customers, but also makes it easier and more comfortable to use, reducing the cost of use.
[0058] See also Figure 1 , Figure 1 It is a schematic diagram of an implementation environment of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application. Figure 1The smart terminal 110 shown can be any terminal device that supports the installation of control software, such as a smart phone, a smart watch, a car computer, a tablet computer, a laptop computer, etc., but is not limited thereto. In this embodiment, the smart terminal is a smart phone. The smart phone is equipped with a Bluetooth key APP for connecting to the car. The APP interface displays a variety of options for controlling the car for the user to choose from, and displays the corresponding control status information. The embodiments of the present application do not limit the detailed information displayed on the smart phone interface, and can be set according to actual needs. Figure 1 The server 120 shown can be, for example, an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, and is not limited here. The smart terminal 110 can communicate with the server 120 through wireless networks such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), and 5G (fifth generation mobile information technology), and is not limited here. Figure 1 The car 130 shown is equipped with a car Bluetooth key module and is capable of Bluetooth communication. Figure 1 The PC terminal 140 shown may be, for example, a laptop computer, a desktop computer, a tablet computer, etc.
[0059] See also Figure 2 , Figure 2 is a flowchart of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the smart terminal 110 and the server 120 in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0060] like Figure 2 As shown, in an exemplary embodiment, the Bluetooth key connection simulation detection method includes at least steps S210 to S230, which are described in detail as follows:
[0061] Step S210, installing a Bluetooth key APP on the smart terminal device for the user to control the car through Bluetooth.
[0062] Specifically, the smart terminal device includes: a smart phone, a smart watch, a tablet or a smart key remote control for a car. The smart terminal device has the function of networking and self-contained terminal Bluetooth connection. It can be connected to the car Bluetooth key module through the smart terminal to perform vehicle control operations. The mobile smart terminal device is convenient for users to carry and operate.
[0063] Bluetooth Key APP is a car smart key service software developed for Bluetooth keys. Users can easily open the door by connecting through a smartphone or smart watch, allowing you to open the door without a key, making it easier for you to open the door. The app provides users with door locking, door unlocking and trunk opening services, providing users with a one-stop keyless operation mode. Users can freely select and operate in the app according to their needs, which is simple and convenient.
[0064] The Bluetooth key APP is provided with a car control unit, which includes Bluetooth connection, unlocking, locking and starting buttons to send Bluetooth connection instructions, unlocking instructions, locking instructions and starting instructions to the car respectively. In this way, a variety of car control instructions can be executed through the Bluetooth key APP to control various functions of the vehicle.
[0065] Step S220, obtaining the Bluetooth communication status between the Bluetooth key APP and the car Bluetooth key module.
[0066] Specifically, connect the Bluetooth key APP to the car Bluetooth key module through Bluetooth, and obtain the communication status of the connection between the two. The specific steps are as follows:
[0067] A connection instruction is sent to the car Bluetooth key module through the Bluetooth key APP; specifically, the operator operates the Bluetooth key APP installed on the mobile terminal device and clicks the Bluetooth key to connect to the car Bluetooth key module.
[0068] If the Bluetooth key APP obtains the execution result returned by the car Bluetooth key module, it indicates that the Bluetooth key APP communicates normally with the car Bluetooth key module.
[0069] On the contrary, if the Bluetooth key APP does not obtain the execution result returned by the car Bluetooth key module, it indicates that the communication between the Bluetooth key APP and the car Bluetooth key module is abnormal, and it is necessary to connect or check again until the two can be connected and communicated normally.
[0070] Step S230: If the Bluetooth key APP communicates normally with the car Bluetooth key module, the smart terminal device is connected to the PC interface and the smart terminal device is identified by a test tool.
[0071] Specifically, while ensuring that the Bluetooth key APP is connected to the car Bluetooth key module and the communication is normal, the smart terminal device is connected to the PC interface (USB interface) via a data cable, the test tool installed on the PC (computer) is started, and the connected smart terminal device is identified through the test tool.
[0072] Step S240: compile a test script for Bluetooth key connection test by using the test tool.
[0073] Specifically, the test tool is Airtest, and the script is compiled in python language. The Airtest tool is an automated test framework based on image recognition and UI control recognition. It is simple to operate, has concise and clear functions, has low requirements for code ability, can record scripts, generate reports with one click, and supports python voice for personalized script programming. The Airtest tool can identify and connect to the mobile terminal on the current host. After the tester designs the test case, it can be executed according to the steps of the test case. The test case of the mobile terminal includes the declaration of variables, installation and startup of the mobile application, capture of the target image to be operated on the page, operation of the target image (such as clicking on the image, inputting characters to a relative coordinate position of the image, sliding the screen, etc.), and comparing the results with expectations, and then judging whether the execution of the test case is successful or not. In this way, the Airtest test tool can be used in combination with the python language for script compilation, which is used to test the stability of the Bluetooth connection by running the script.
[0074] Step S250, running the test script and generating a test report.
[0075] After the test script is finished running, a corresponding test report can be generated for the execution process of the test case. The test report may include the test process data and the test result data, and the test report can be uploaded to the database for storage to facilitate subsequent analysis and problem location, etc.; and, based on the test report, it can be determined whether the test script has run successfully. If the test script fails to run, the test report will be pushed to the tester.
[0076] See also Figure 3 , Figure 3 : is a flowchart of step S250 of a Bluetooth key connection simulation detection method shown in an exemplary embodiment of the present application; in the above step S250, the running of the test script and the generation of a test report include:
[0077] Step S310, running the test case to trigger the Bluetooth key APP to send a control instruction to the car Bluetooth key module; wherein the test case is a functional script compiled on Airtest.
[0078] Compile a function script on Airtest and run it as a test case to trigger the Bluetooth key APP to send a control command to the car Bluetooth key module, and then wait for and obtain the feedback result of the car Bluetooth key module. Specifically, it includes the following steps:
[0079] Step S311, find the corresponding function button through the element positioning button, and then click the button using the client() code to enable the smart terminal device to send a control instruction to the car Bluetooth key module through the Bluetooth key APP.
[0080] Step S312, by combining the wait() code with the sleep() code, wait for the expected target to appear. If the expected target, for example, Bluetooth connection is successful, then feedback is provided of the successful connection information.
[0081] Step S320, adding the function script to a loop statement to run it as a function use case loop.
[0082] Specifically, add the function script to the loop statement, and run the function script to realize the loop operation of the function case, that is, to realize the test script of the Bluetooth key connection stability. The written test case can cover multiple functional points of the test software, and then debug the test case. Finally, execute the test case by entering instructions in the command line.
[0083] Step S330, obtaining a feedback result generated by the car Bluetooth key module according to the control instruction.
[0084] Step S340: Generate a test report according to the feedback result.
[0085] The test report includes the successful connection time of the Bluetooth key, the failed connection time of the Bluetooth key, and the control response time of the Bluetooth key. On the basis of the test script that can be run, logs are added to record the Bluetooth key connection time, the failed connection time of the Bluetooth key, and the control response time of the Bluetooth key, so as to reduce the error of manually recording the response time of the Bluetooth key. In this way, the test report includes the time of each successful connection of the Bluetooth key, which is convenient for analyzing the connection response time of the Bluetooth key. The test report includes the time point when the Bluetooth key fails to connect, so as to facilitate the analysis of the problem.
[0086] Figure 4 is a block diagram of a Bluetooth key connection simulation detection device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown is as follows. The device may also be applicable to other exemplary implementation environments. This embodiment does not limit the implementation environment to which the device is applicable.
[0087] like Figure 4As shown, the exemplary Bluetooth key connection simulation detection device includes:
[0088] The application installation module 401 is configured to install a Bluetooth key APP on the smart terminal device for the user to control the car through Bluetooth;
[0089] The status acquisition module 402 is configured to acquire the communication status between the Bluetooth key APP and the car Bluetooth;
[0090] The device identification module 403 is configured to connect the smart terminal device to the PC if the Bluetooth key APP and the car Bluetooth communication are normal, and identify the smart terminal device through a test tool;
[0091] A script creation module 404, configured to compile a test script for Bluetooth key connection test through the test tool;
[0092] The script testing module 405 is configured to run the test script and generate a test report.
[0093] It should be noted that the Bluetooth key connection simulation detection device provided in the above embodiment and the Bluetooth key connection simulation detection method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In actual application, the Bluetooth key connection simulation detection device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0094] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the Bluetooth key connection simulation detection method provided in the above-mentioned embodiments.
[0095] Figure 5 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 5 The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0096] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method described in the above embodiment. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, the ROM 502 and the RAM 503 are connected to each other through the bus 504. The input / output (I / O) interface 505 is also connected to the bus 504. The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0097] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0098] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0099] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0101] Another aspect of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor of a computer, the computer executes the Bluetooth key connection simulation detection method as described above. The storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0102] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A Bluetooth key connection simulation detection method, characterized in that: The method comprises: Install a Bluetooth key APP on the smart terminal device for users to control the car via Bluetooth; Obtain the Bluetooth communication status between the Bluetooth key APP and the car Bluetooth key module; If the Bluetooth key APP communicates normally with the car Bluetooth key module, the smart terminal device is connected to the PC interface and the smart terminal device is identified by the test tool; A test script for Bluetooth key connection test is compiled by using the test tool; the test tool is Airtest, and the script is compiled using the python language; Run the test script and generate a test report; determine whether the test script is successfully executed based on the test report; if the test script fails to execute, push the test report to the tester.
2. The Bluetooth key connection simulation detection method according to claim 1, characterized in that: The obtaining of the communication status between the Bluetooth key APP and the car Bluetooth key module includes: Send a connection instruction to the car Bluetooth key module through the Bluetooth key APP; If the Bluetooth key APP obtains the execution result returned by the car Bluetooth key module, it indicates that the Bluetooth key APP communicates normally with the car Bluetooth key module.
3. The Bluetooth key connection simulation detection method according to claim 1, characterized in that: The running of the test script and generating a test report includes: Run the test case to trigger the Bluetooth key APP to send control instructions to the car Bluetooth key module; wherein the test case is a functional script compiled on Airtest; Obtaining a feedback result generated by the car Bluetooth key module according to the control instruction; A test report is generated according to the feedback result.
4. The Bluetooth key connection simulation detection method according to claim 3, characterized in that: The method further comprises: Add the functional script to a loop statement and run it as a functional use case loop.
5. The Bluetooth key connection simulation detection method according to claim 1, characterized in that: The test report includes the Bluetooth key connection success time, the Bluetooth key connection failure time and the Bluetooth key control response time.
6. The Bluetooth key connection simulation detection method according to claim 1, characterized in that: The Bluetooth key APP is provided with a car control unit, which includes Bluetooth connection, unlocking, locking and starting buttons to send Bluetooth connection instructions, unlocking instructions, locking instructions and starting instructions to the car respectively.
7. A Bluetooth key connection simulation detection device, characterized in that: The device comprises: An application installation module, configured to install a Bluetooth key APP on a smart terminal device for a user to control a car via Bluetooth; A status acquisition module, configured to acquire the communication status between the Bluetooth key APP and the car Bluetooth; The device identification module is configured to connect the smart terminal device to the PC if the Bluetooth key APP and the car Bluetooth communication are normal, and identify the smart terminal device through a test tool; A script creation module, configured to compile a test script for a Bluetooth key connection test through the test tool; the test tool is Airtest, and the script is compiled using the Python language; The script testing module is configured to run the test script and generate a test report; determine whether the test script runs successfully based on the test report, and if the test script fails to run, push the test report to the tester.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the Bluetooth key connection simulation detection method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the Bluetooth key connection simulation detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic testing method for Bluetooth digital key
CN114172835A