Test method and device of communication module, storage medium and electronic device

By simulating serial communication between a virtual baseboard and the communication module under test on a mobile terminal, the problem of low testing efficiency of WIFI communication modules is solved, enabling data-level testing and analysis of the communication module, thus improving testing efficiency and accuracy.

CN115884238BActive Publication Date: 2026-03-20QINGDAO HAIER TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies cannot effectively perform testing and interactive data analysis of the communication between the WIFI communication module and the baseboard at the data level, resulting in low testing efficiency.

Method used

By enabling a virtual baseboard program on a mobile terminal to simulate a virtual baseboard, a serial communication channel is established with the communication module under test, receiving instructions from the IoT cloud and generating simulated response data, which is then uploaded to the IoT cloud for comparison and analysis.

Benefits of technology

It enables data-level testing and analysis of the communication module, improving testing efficiency and coverage, and ensuring the functional accuracy and transparency of the communication module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115884238B_ABST
    Figure CN115884238B_ABST
Patent Text Reader

Abstract

The application discloses a kind of communication module test method and device, storage medium, electronic device, wherein, the above-mentioned method includes: determine the virtual backplane that virtual backplane program simulated is enabled on mobile terminal, wherein, virtual backplane is simulated by virtual backplane program The program with the function of target home appliance equipment backplane;In the case where virtual backplane exists communication module to be measured, the communication channel of virtual backplane and communication module to be measured is established by serial port;Through communication channel, receive the device instruction that Internet of Things cloud end issues through communication module to be measured, and determine the response result of virtual backplane to device instruction, wherein, response result is uploaded to Internet of Things cloud end via communication module to be measured, solve the problem that cannot be realized from data level to test and analyze communication module, to realize the accurate collection of each link flow transfer data corresponding to communication module to be measured, improve the test efficiency of communication module to be measured and the coverage of test instruction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, in particular to a test method and device of a communication module, a storage medium and an electronic device. BACKGROUND

[0002] At present, in the field of intelligent household appliances, a WIFI communication module as important physical hardware serves as a bridge for interaction between physical devices and the cloud. It is connected to the cloud to transmit control instructions and data sent by the cloud, and is connected to devices to send instructions and data sent by the cloud to the devices for execution, and meanwhile, the execution data and state of the devices are reported to the cloud. It plays an important role in the entire IOT (Internet of Things, IOT for short) link. However, when the WIFI communication module is tested using a real hardware board, it is difficult to cover all scenarios of communication and interaction between the WIFI communication module and the board, and it is inconvenient to obtain the interaction data between the board and the WIFI communication module for analyzing the correctness of the data sent and responded by the WIFI communication module, and the test efficiency is low.

[0003] In the related art, there is no effective solution to the problem that the communication module cannot be tested and analyzed from the data level. SUMMARY

[0004] Embodiments of the present application provide a test method and device of a communication module, a storage medium and an electronic device to at least solve the problem in the related art that the communication module cannot be tested and analyzed from the data level.

[0005] According to one embodiment of an embodiment of the present application, a test method of a communication module is provided, including: determining a virtual board simulated by a virtual board program enabled on a mobile terminal, wherein the virtual board is a program simulated by the virtual board program and having a function of a target household appliance device board; in a case where the virtual board exists a to-be-tested communication module, establishing a communication channel between the virtual board and the to-be-tested communication module through a serial port; receiving a device instruction issued by an Internet of Things cloud through the to-be-tested communication module through the communication channel, and determining a response result of the virtual board to the device instruction, wherein the response result is uploaded to the Internet of Things cloud via the to-be-tested communication module.

[0006] In an example embodiment, after the communication channel between the virtual backplane and the communication module under test is established through the serial port in the case that the virtual backplane corresponds to the communication module under test, the method further comprises: receiving a test instruction of the target object, wherein the test instruction is used to instruct the virtual backplane program to perform a simulation response test of the virtual backplane; generating corresponding simulation response data according to the test instruction; sending the simulation response data to the communication module under test, and obtaining a reporting result of the communication module under test to the Internet of Things cloud, wherein the reporting result is used to indicate the case that the simulation response data is uploaded to the Internet of Things cloud after being processed by the communication module under test.

[0007] In an example embodiment, after the simulation response data is generated according to the test instruction, the method further comprises: uploading the simulation response data directly to the Internet of Things cloud through the mobile terminal, wherein the simulation response data comprises at least one of the following: target object data corresponding to the virtual backplane, device configuration data corresponding to the virtual backplane, device running data corresponding to the virtual backplane, and device parameter data corresponding to the virtual backplane.

[0008] In an example embodiment, after the simulation response data is sent to the communication module under test, and the reporting result of the communication module under test to the Internet of Things cloud is determined, the method further comprises: in the case that the reporting result indicates that the simulation response data has been completely processed and uploaded to the Internet of Things cloud by the communication module under test, obtaining a data comparison result of the simulation response data uploaded by the communication module under test and the simulation response data uploaded by the mobile terminal in the Internet of Things cloud, wherein the data comparison result is used to indicate whether the data processing logic of the communication module under test conforms to the preset standard logic.

[0009] In an example embodiment, the device instruction issued by the Internet of Things cloud through the communication module under test is received through the communication channel, and the response result of the virtual backplane to the device instruction comprises: analyzing the device instruction to determine the response requirement corresponding to the device instruction, wherein the response requirement is used to indicate the target simulation response data that needs to be fed back by the virtual backplane; determining the data type to be generated by the virtual backplane program for test feedback according to the response requirement; feeding back the data corresponding to the data type as the response result of the device instruction to the communication module under test through the communication channel.

[0010] In an example embodiment, after receiving the device instruction issued by the Internet of Things cloud through the communication channel and determining the response result of the virtual bottom plate to the device instruction, the method further comprises: storing the device instruction and the response result corresponding to the device instruction one by one to obtain first test information; adding a time stamp to the simulated response data generated by the virtual bottom plate program according to the test instruction of the target object to obtain second test information; matching the test communication module used by the first test information and the second test information, and binding the first test information and the second test information corresponding to the same test communication module, and uploading the first test information and the second test information with the binding relationship to the Internet of Things cloud.

[0011] In an example embodiment, after uploading the first test information and the second test information with the binding relationship to the Internet of Things cloud, the method further comprises: obtaining the analysis result of the Internet of Things cloud to the first test information and the second test information; and determining whether the function of the test communication module is normal according to the analysis result.

[0012] According to another embodiment of the embodiment of the application, a test device of a communication module is also provided, comprising: a determination module configured to determine a virtual bottom plate simulated by a virtual bottom plate program enabled on a mobile terminal, wherein the virtual bottom plate is a program simulating a function of a bottom plate of a target home appliance; an establishment module configured to establish a communication channel between the virtual bottom plate and a test communication module through a serial port when the test communication module exists; and a response module configured to receive a device instruction issued by an Internet of Things cloud through the test communication module through the communication channel, and determine a response result of the virtual bottom plate to the device instruction, wherein the response result is uploaded to the Internet of Things cloud through the test communication module.

[0013] In an example embodiment, the device further comprises: a receiving module configured to receive a test instruction of a target object, wherein the test instruction is used to instruct the virtual bottom plate program to perform a simulated response test of the virtual bottom plate; generate corresponding simulated response data according to the test instruction; send the simulated response data to the test communication module, and obtain a reporting result of the test communication module to the Internet of Things cloud, wherein the reporting result is used to indicate a case that the simulated response data is uploaded to the Internet of Things cloud after being processed by the test communication module.

[0014] In an example embodiment, the receiving module is further configured to directly upload the simulated response data to the Internet of Things cloud through the mobile terminal, wherein the simulated response data comprises at least one of the following: target object data corresponding to the virtual bottom plate, device configuration data corresponding to the virtual bottom plate, device running data corresponding to the virtual bottom plate, and device parameter data corresponding to the virtual bottom plate.

[0015] In an example embodiment, the receiving module further comprises an obtaining unit configured to, in a case where the reporting result indicates that the to-be-tested communication module has processed all the simulation response data and uploaded the simulation response data to the Internet of Things cloud, obtain a data comparison result of the simulation response data uploaded by the to-be-tested communication module and the simulation response data uploaded by the mobile terminal by the Internet of Things cloud, wherein the data comparison result is used to indicate whether the data processing logic of the to-be-tested communication module conforms to the preset standard logic.

[0016] In an example embodiment, the response module is further configured to parse the device instruction to determine a response requirement corresponding to the device instruction, wherein the response requirement is used to indicate target simulation response data required to be fed back by the virtual backplane; determine a data type generated by the virtual backplane program for test feedback according to the response requirement; take data corresponding to the data type as a response result corresponding to the device instruction, and feed back the response result to the to-be-tested communication module through the communication channel.

[0017] In an example embodiment, the device further comprises a storage module configured to store the device instruction and the response result corresponding to the device instruction in a one-to-one manner to obtain first test information; add a time stamp to the simulation response data generated by the virtual backplane program according to the test instruction of the target object to obtain second test information; match the to-be-tested communication module used by the first test information and the second test information, and bind the first test information and the second test information corresponding to the same to-be-tested communication module, and upload the first test information and the second test information having the binding relationship to the Internet of Things cloud.

[0018] In an example embodiment, the storage module is further configured to obtain an analysis result of the first test information and the second test information by the Internet of Things cloud; and determine whether the function of the to-be-tested communication module is normal according to the analysis result.

[0019] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, wherein the computer program is configured to execute the test method of the communication module when running.

[0020] According to another aspect of the embodiments of the present application, an electronic device is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the test method of the communication module through the computer program.

[0021] In this embodiment of the invention, a virtual baseboard simulated by a virtual baseboard program enabled on a mobile terminal is determined. The virtual baseboard is a program simulated by the virtual baseboard program, possessing the baseboard function of the target home appliance. When a communication module under test exists on the virtual baseboard, a communication channel is established between the virtual baseboard and the communication module under test via a serial port. Device commands issued by the IoT cloud through the communication module under test are received through the communication channel, and the virtual baseboard's response to the device commands is determined. The response result is uploaded to the IoT cloud via the communication module under test. In other words, by establishing a connection between the communication module under test, the IoT cloud, and the virtual baseboard, data interacting through the communication module under test is collected. Then, the test results of the communication module under test are determined by analyzing the data. This technical solution solves the problem of not being able to test and analyze the communication module from a data perspective, thereby achieving accurate collection of the flow data of each link corresponding to the communication module under test, improving the testing efficiency of the communication module under test, and expanding the coverage of test commands. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0023] Figure 1 This is a hardware structure block diagram of a computer terminal for a testing method of a communication module according to an embodiment of the present invention.

[0024] Figure 2 This is a flowchart of a testing method for a communication module according to an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of the architecture of a test system according to an optional embodiment of the present invention;

[0026] Figure 4 This is a test interaction diagram of sending device commands from the IoT cloud according to an optional embodiment of the present invention;

[0027] Figure 5 This is a test interaction diagram (a) of a virtual baseboard actively sending application commands according to an optional embodiment of the present invention;

[0028] Figure 6 This is a test interaction diagram (II) of a virtual baseboard actively sending application commands according to an optional embodiment of the present invention;

[0029] Figure 7 This is a structural block diagram of a testing device for a communication module according to an embodiment of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] The methods and embodiments provided in this application can be executed on a computer terminal, a computer terminal, or a similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal for a testing method of a communication module according to an embodiment of the present invention. (See diagram below.) Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. In one exemplary embodiment, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.

[0033] The memory 104 can be configured to store computer programs, for example, software programs of application software and modules, such as a computer program corresponding to the test method of the communication module in the embodiment of the present application. The processor 102 can execute various functional applications and data processing, i.e., implement the above method, by running the computer programs stored in the memory 104. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include memories remotely arranged with respect to the processor 102, which can be connected to the computer terminal through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0034] The transmission device 106 is configured to receive or send data via a network. A specific example of the above network can include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to be capable of communicating with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.

[0035] In the embodiment, a test method of a communication module is provided, which is applied to the above computer terminal, Figure 2 is a flowchart of the test method of the communication module according to the embodiment of the present application, which includes the following steps:

[0036] In step S202, a virtual backplane simulated by a virtual backplane program enabled on the mobile terminal is determined, wherein the virtual backplane is a program having a function of a backplane of a target home appliance device simulated by the virtual backplane program;

[0037] Optionally, in the embodiment of the present application, the backplane function of different home appliance devices is simulated by installing the virtual backplane program on the mobile terminal, and the connection test of the communication module to be tested is implemented by generating the virtual backplane.

[0038] In step S204, a communication channel between the virtual backplane and the communication module to be tested is established through a serial port in a case where the communication module to be tested exists in the virtual backplane;

[0039] In step S206, a device instruction issued by an Internet of Things cloud through the communication module to be tested is received through the communication channel, and a response result of the virtual backplane to the device instruction is determined, wherein the response result is uploaded to the Internet of Things cloud through the communication module to be tested.

[0040] It can be understood that, in order to ensure the collection of the test data of the to-be-tested communication module, after the virtual backplane responds to the device instruction issued by the Internet of Things, the corresponding response result is determined according to the data change state in the virtual backplane, and the response result is uploaded to the cloud of the Internet of Things after being processed by the to-be-tested communication module.

[0041] Through the above steps, the virtual backplane simulated by the virtual backplane program enabled on the mobile terminal is determined, wherein the virtual backplane is a program that simulates the function of the backplane of the target home appliance through the virtual backplane program; in the case that the to-be-tested communication module exists in the virtual backplane, a communication channel between the virtual backplane and the to-be-tested communication module is established through a serial port; the device instruction issued by the cloud of the Internet of Things through the to-be-tested communication module is received through the communication channel, and the response result of the virtual backplane to the device instruction is determined, wherein the response result is uploaded to the cloud of the Internet of Things through the to-be-tested communication module; that is, by establishing the connection relationship among the to-be-tested communication module, the cloud of the Internet of Things, and the virtual backplane, the data interacting through the to-be-tested communication module is collected, and then the test result of the to-be-tested communication module is determined by analyzing the data, the above technical solution solves the problem that the communication module cannot be tested and analyzed from the data level, and further realizes the accurate collection of the data flowing through each link corresponding to the to-be-tested communication module, thereby improving the test efficiency of the to-be-tested communication module and the coverage of the test instruction.

[0042] In one example embodiment, in the case that the corresponding to-be-tested communication module exists in the virtual backplane, after the communication channel between the virtual backplane and the to-be-tested communication module is established through the serial port, the above method further comprises: receiving a test instruction of a target object, wherein the test instruction is used to instruct the virtual backplane program to perform the simulated response test of the virtual backplane; generating corresponding simulated response data according to the test instruction; sending the simulated response data to the to-be-tested communication module, and obtaining the reporting result of the to-be-tested communication module to the cloud of the Internet of Things, wherein the reporting result is used to indicate the case that the simulated response data is uploaded to the cloud of the Internet of Things after being processed by the to-be-tested communication module.

[0043] In short, in order to ensure the accuracy of the test of the to-be-tested communication module, the virtual backplane can also actively initiate simulated response data for testing through the setting of the target object, and obtain the reporting result of the to-be-tested communication module to the cloud of the Internet of Things after processing the simulated response data through the to-be-tested communication module, and upload all data to the cloud of the Internet of Things, so that the simulated response data through the to-be-tested communication module and the original simulated response data corresponding to the virtual backplane exist on the cloud of the Internet of Things, and according to the data change, it is determined whether the function of the to-be-tested communication module is correct and effective.

[0044] In an example embodiment, after the corresponding simulation response data is generated according to the test instruction, the method further comprises: uploading the simulation response data directly to the Internet of Things cloud by the mobile terminal, wherein the simulation response data comprises at least one of the following: target object data corresponding to the virtual baseboard, device configuration data corresponding to the virtual baseboard, device running data corresponding to the virtual baseboard, and device parameter data corresponding to the virtual baseboard.

[0045] Optionally, the virtual baseboard program for generating the virtual baseboard can upload the target object data for representing the identity of the target object as the simulation response data, or the device running data corresponding to the target household appliance device simulated by the virtual baseboard as the simulation response data, or the device parameter data of the target household appliance device corresponding to the virtual baseboard as the simulation response data, and comprehensively report the data change of the virtual baseboard to the Internet of Things cloud, and when the target object changes the program content corresponding to the virtual baseboard in the virtual baseboard program, the changed data is uploaded in real time through the to-be-tested communication module, so that the test coverage of the to-be-tested communication module is more extensive.

[0046] In an example embodiment, after the simulation response data is sent to the to-be-tested communication module and the reporting result of the to-be-tested communication module to the Internet of Things cloud is determined, the method further comprises: in the case where the reporting result indicates that the to-be-tested communication module has processed and uploaded all the simulation response data to the Internet of Things cloud, obtaining a data comparison result of the simulation response data uploaded by the to-be-tested communication module and the simulation response data uploaded by the mobile terminal in the Internet of Things cloud, wherein the data comparison result is used to indicate whether the data processing logic of the to-be-tested communication module conforms to the preset standard logic.

[0047] It can be understood that when the Internet of Things cloud has both the simulation response data uploaded by the to-be-tested module and the original simulation response data uploaded by the mobile terminal for testing the to-be-tested module, by comparing the differences in the data, it can be determined whether the to-be-tested communication module has functional defects.

[0048] In an example embodiment, the device instruction issued by the Internet of Things cloud through the communication channel and the response result of the virtual baseboard to the device instruction are determined, comprising: analyzing the device instruction to determine the response requirement corresponding to the device instruction, wherein the response requirement is used to indicate the target simulation response data that needs to be fed back by the virtual baseboard; determining the data type generated by the virtual baseboard program for test feedback according to the response requirement; taking the data corresponding to the data type as the response result corresponding to the device instruction, and feeding back to the to-be-tested communication module through the communication channel.

[0049] For example, after the device instruction of "starting the device" is issued by the to-be-tested communication module in the Internet of Things cloud, the virtual bottom plate parses the device instruction through the pre-set E++ protocol authentication mode to obtain a control instruction for controlling the virtual bottom plate to start, and then the virtual bottom plate determines the corresponding response requirement according to the control instruction, and instructs the virtual bottom plate program to generate the corresponding response result, that is, the virtual bottom plate program can realize the simulation of different functions of the target household appliance bottom plate, and comprehensively test the to-be-tested communication module.

[0050] In one example embodiment, after the device instruction issued by the to-be-tested communication module in the Internet of Things cloud is received through the communication channel, and the response result of the virtual bottom plate to the device instruction is determined, the above method further comprises: storing the device instruction and the response result corresponding to the device instruction one by one to obtain first test information; adding a time stamp to the simulation response data generated by the virtual bottom plate program according to the test instruction of the target object to obtain second test information; matching the to-be-tested communication module used by the first test information and the second test information, and binding the first test information and the second test information corresponding to the same to-be-tested communication module, and uploading the first test information and the second test information with the binding relationship to the Internet of Things cloud.

[0051] In one example embodiment, after the first test information and the second test information with the binding relationship are uploaded to the Internet of Things cloud, the above method further comprises: obtaining the analysis result of the Internet of Things cloud to the first test information and the second test information; and determining whether the function of the to-be-tested communication module is normal according to the analysis result.

[0052] In order to better understand the process of the above communication module test method, the implementation method flow of the above communication module test will be described in combination with the optional embodiment below, but it is not used to limit the technical solutions of the embodiments of the present application.

[0053] In this embodiment, a test method for a WIFI communication module of a smart household appliance based on a virtual bottom plate is provided, which simulates the function of a real device through a virtual bottom plate program, interacts with the WIFI communication module through a serial port, collects data in the test of the WIFI communication module, and reports the data to the Internet of Things cloud. The Internet of Things cloud analyzes the collected data to determine whether the function of the to-be-tested WIFI communication module is normal, and judges the correctness of the function of the WIFI communication module.

[0054] Optionally, Figure 3 The architecture schematic diagram of the test system of the optional embodiment of the present application comprises the following parts:

[0055] A virtual backplane 32 is used to simulate the function of a real physical device and can be an application program developed by using JAVA language and running on a PC (Personal computer, PC for short). The application program realizes communication with the WIFI module (i.e. WIFI communication module) by monitoring the serial port of the PC connected with the module.

[0056] Optionally, the virtual backplane 32 has the following main functions: (1) responding to the device instructions sent by the WIFI module through the serial port, for example, responding to the reporting of device version, reporting of product code and product code short identifier, responding to the reporting of fault alarm, ACK (Acknowledge Character, ACK for short) confirmation frame after receiving the instructions, etc. (2) actively sending application instructions to the WIFI module and receiving the responses of the WIFI module, for example, actively reporting user data, setting the WIFI module to enter the configuration mode, querying the information of the WIFI module, etc. (3) collecting the device instructions sent by the WIFI module, the application instructions sent by the virtual backplane to the WIFI module and the response data of the WIFI module to the application instructions, and then reporting them to the IOT cloud after corresponding matching.

[0057] The WIFI module 34 (equivalent to the communication module to be tested in the embodiment of the application) is a real hardware device, which is connected with the serial port of the PC through a data line and connected with the IOT cloud through a wide area network. The WIFI module 34 is used to receive the device instructions issued by the IOT cloud, send the processed device instructions to the virtual backplane, receive the response instructions of the virtual backplane, perform subsequent processing and report the data to the IOT cloud. The WIFI module 34 is also used to receive the application instructions sent by the virtual backplane and perform instruction response, process the data corresponding to the received application instructions and report the data to the IOT cloud.

[0058] The IOT cloud 36 is used to receive the data reported by the virtual backplane and the WIFI module, perform data comparison, judge whether the data processed by the WIFI module is correct and then verify the correctness of the corresponding function of the WIFI module.

[0059] It should be noted that when the WIFI module is connected with the IOT cloud, the WIFI module uses the wide area network and adopts the SOCKET connection mode. When the WIFI module is connected with the device, the WIFI module usually uses RS485 / RS232 to perform serial communication. The above architecture simulates the real device by establishing a virtual backplane program, obtains the data sent by the WIFI module to the backplane, sends instruction data to the WIFI module through the virtual backplane program and collects the response data of the WIFI module. The interaction data between the WIFI module and the virtual backplane program is used to comprehensively analyze the correctness of the function of the WIFI module, improve the test accuracy and test efficiency of the correctness of the code of the WIFI module and make the WIFI module test process transparent and efficient.

[0060] Figure 4 is a test interaction schematic diagram of the IOT cloud issuing device instructions according to an optional embodiment of the present application, as shown in the following steps: Figure 4

[0061] Step S402: The IOT cloud issues a device instruction written by using an E++ protocol to a WIFI module;

[0062] Step S404: The WIFI module forwards the device instruction to a virtual backplane;

[0063] Step S406: The virtual backplane simulates a response instruction according to content corresponding to the device instruction;

[0064] Step S408: The response instruction is fed back to the WIFI module;

[0065] Step S410: The WIFI module processes the response instruction to obtain device data;

[0066] Step S412: The WIFI module uploads the device data to the IOT cloud.

[0067] Figure 5 is a test interaction schematic diagram of the virtual backplane actively sending an application instruction according to an optional embodiment of the present application (one), as shown in the following steps: Figure 5

[0068] Step S502: The virtual backplane determines a simulated response instruction to be generated according to a test requirement;

[0069] Step S504: The virtual backplane actively sends the simulated response instruction to the WIFI module after the simulated response instruction is written by using an E++ protocol;

[0070] Step S506: The WIFI module processes the simulated response instruction to obtain device data;

[0071] Step S508: The WIFI module feeds back the device data to the IOT cloud;

[0072] Step S510: The WIFI module feeds back an E++ instruction response corresponding to an uploading result of the device data to the virtual backplane.

[0073] Figure 6 is a test interaction schematic diagram of the virtual backplane actively sending an application instruction according to an optional embodiment of the present application (two), as shown in the following steps: Figure 6

[0074] Step S602: The virtual backplane determines a simulated response instruction to be generated according to a test requirement;

[0075] ​​​Step S604: The virtual backplane actively sends the simulated response instruction to the WIFI module after compiling the instruction through the E++ protocol.

[0076] Step S606: The WIFI module processes the simulated response instruction.

[0077] Step S608: The WIFI module feeds back the E++ instruction response corresponding to the processing result of the simulated response instruction to the virtual backplane.

[0078] It should be noted that the above Figure 5 The corresponding interaction mode is mainly applied to the case where the virtual backplane actively sends an application instruction and the IOT cloud can receive device data changes. Figure 5 The corresponding interaction mode is mainly applied to the case where the virtual backplane actively sends an application instruction, the WIFI module processes, and the device data does not need to be reported to the IOT cloud.

[0079] Optionally, the IOT cloud can also compare the data at the labeled positions in the above Figures 4 to 6 interaction flowcharts, so as to determine whether the data processing and functions of the WIFI module meet the requirements.

[0080] In summary, through the above embodiments, the functions of the real device are simulated using the code, the backplane instruction is generated for testing the WIFI module, the WIFI module function is tested from the data level, the original test module needs to use the real device and the APP, and the WIFI module function correctness is verified by operating the device. The test is a complete black box, which avoids the problem that the transparency and efficiency of the WIFI module test cannot be achieved.

[0081] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the parts that contribute to the prior art can be embodied in the form of software products, which are stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and include a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, or network device) execute the method of each embodiment of the present application.

[0082] Figure 7 is a structural block diagram of a communication module test device according to an embodiment of the present application; as shown in Figure 7 , it includes:

[0083] determining a virtual bottom plate simulated by a virtual bottom plate program enabled on the mobile terminal, wherein the virtual bottom plate is a program with a function of a bottom plate of a target home appliance device simulated by the virtual bottom plate program;

[0084] establishing a communication channel between the virtual bottom plate and the communication module under test through a serial port when the communication module under test exists in the virtual bottom plate;

[0085] receiving a device instruction issued by the Internet of Things cloud through the communication module under test and determining a response result of the virtual bottom plate to the device instruction, wherein the response result is uploaded to the Internet of Things cloud via the communication module under test.

[0086] Through the above device, a virtual bottom plate simulated by a virtual bottom plate program enabled on the mobile terminal is determined, wherein the virtual bottom plate is a program with a function of a bottom plate of a target home appliance device simulated by the virtual bottom plate program; a communication channel between the virtual bottom plate and the communication module under test is established through a serial port when the communication module under test exists in the virtual bottom plate; a device instruction issued by the Internet of Things cloud through the communication module under test is received, and a response result of the virtual bottom plate to the device instruction is determined, wherein the response result is uploaded to the Internet of Things cloud via the communication module under test; that is, by establishing a connection relationship among the communication module under test, the Internet of Things cloud, and the virtual bottom plate, data interacting through the communication module under test is collected, and then a test result of the communication module under test is determined by analyzing the data, and by using the above technical solution, the problem that the communication module cannot be tested and analyzed from the data level is solved, and thus accurate collection of data flowing through each link corresponding to the communication module under test is realized, and the test efficiency of the communication module under test and the coverage of the test instruction are improved.

[0087] In one example embodiment, the apparatus further comprises a receiving module configured to receive a test instruction of the target object, wherein the test instruction is configured to instruct the virtual backplane program to perform a simulation response test of the virtual backplane; generate corresponding simulation response data according to the test instruction; send the simulation response data to the communication module under test, and obtain a reporting result of the communication module under test to the Internet of Things cloud, wherein the reporting result is configured to indicate a situation of uploading the simulation response data to the Internet of Things cloud after being processed by the communication module under test. In short, in order to ensure the accuracy of the test of the communication module under test, the virtual backplane can also actively initiate simulation response data for testing through the settings of the target object, and obtain the reporting result of the communication module under test to the Internet of Things cloud after processing the simulation response data by the communication module under test, so that the simulation response data passing through the communication module under test and the original simulation response data corresponding to the virtual backplane exist on the Internet of Things cloud, and according to the data change, it is determined whether the function of the communication module under test is correct and effective.

[0088] In one example embodiment, the receiving module is further configured to upload the simulation response data directly to the Internet of Things cloud through the mobile terminal, wherein the simulation response data comprises at least one of the following: target object data corresponding to the virtual backplane, device configuration data corresponding to the virtual backplane, device running data corresponding to the virtual backplane, and device parameter data corresponding to the virtual backplane.

[0089] Optionally, the target object data representing the identity of the target object can be generated as simulation response data on the virtual backplane program of the virtual backplane, or the device running data corresponding to the target home appliance device simulated by the virtual backplane can be generated as simulation response data, and the device parameter data corresponding to the target home appliance device of the virtual backplane can also be generated as simulation response data, and the data change of the virtual backplane is fully reported to the Internet of Things cloud, and when the target object changes the program content corresponding to the virtual backplane in the virtual backplane program, the changed data is uploaded through the communication module under test in real time, so that the test coverage of the communication module under test is more extensive.

[0090] In one example embodiment, the receiving module further comprises an obtaining unit configured to, in a case where the reporting result indicates that the communication module under test has processed and uploaded the simulation response data to the Internet of Things cloud, obtain a data comparison result of the simulation response data uploaded by the communication module under test and the simulation response data uploaded by the mobile terminal, wherein the data comparison result is configured to indicate whether the data processing logic of the communication module under test conforms to a preset standard logic.

[0091] It can be understood that when the Internet of Things cloud has the simulated response data uploaded by the to-be-tested module and the original simulated response data uploaded by the mobile terminal for testing the to-be-tested module, by comparing the differences in the data, it can be determined whether the to-be-tested communication module has a functional defect.

[0092] In an example embodiment, the above-mentioned response module is further configured to parse the device instruction to determine a response requirement corresponding to the device instruction, wherein the response requirement is used to indicate target simulated response data required to be fed back by the virtual backplane; determine a data type required to be generated by the virtual backplane program for test feedback according to the response requirement; and feed back data of the data type as the response result corresponding to the device instruction to the to-be-tested communication module through the communication channel.

[0093] For example, after the Internet of Things cloud issues a device instruction of "starting a device" through the to-be-tested communication module, the virtual backplane parses the device instruction through a pre-set E++ protocol authentication mode to obtain a control instruction for controlling the virtual backplane to start, and then the virtual backplane determines a corresponding response requirement for the control instruction, and instructs the virtual backplane program to generate a corresponding response result, that is, the virtual backplane program can realize simulation of different functions of the target home appliance backplane to comprehensively test the to-be-tested communication module.

[0094] In an example embodiment, the above-mentioned device further comprises a storage module configured to store the device instruction and the response result corresponding to the device instruction one by one to obtain first test information; add a time stamp to the simulated response data generated by the virtual backplane program according to the test instruction of the target object to obtain second test information; match the to-be-tested communication module used by the first test information and the second test information, and bind the first test information and the second test information corresponding to the same to-be-tested communication module, and upload the first test information and the second test information having the binding relationship to the Internet of Things cloud.

[0095] In an example embodiment, the above-mentioned storage module is further configured to obtain an analysis result of the first test information and the second test information by the Internet of Things cloud; and determine whether the function of the to-be-tested communication module is normal according to the analysis result.

[0096] Embodiments of the present application also provide a storage medium comprising a stored program, wherein the program performs any of the above methods when executed.

[0097] Optionally, in the present embodiment, the above-mentioned storage medium can be configured to store program code for performing the following steps:

[0098] S1, determine the virtual baseboard simulated by the virtual baseboard program enabled on the mobile terminal, wherein the virtual baseboard is a program that simulates the baseboard function of the target home appliance through the virtual baseboard program;

[0099] S2, if the virtual baseboard has a communication module under test, establish a communication channel between the virtual baseboard and the communication module under test through a serial port;

[0100] S3 receives device commands from the IoT cloud via the communication channel through the communication module under test, and determines the virtual backplane's response to the device commands. The response is then uploaded to the IoT cloud via the communication module under test.

[0101] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0102] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0103] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0104] S1, determine the virtual baseboard simulated by the virtual baseboard program enabled on the mobile terminal, wherein the virtual baseboard is a program that simulates the baseboard function of the target home appliance through the virtual baseboard program;

[0105] S2, if the virtual baseboard has a communication module under test, establish a communication channel between the virtual baseboard and the communication module under test through a serial port;

[0106] S3 receives device commands from the IoT cloud via the communication channel through the communication module under test, and determines the virtual backplane's response to the device commands. The response is then uploaded to the IoT cloud via the communication module under test.

[0107] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0108] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0109] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed over a network of multiple computing devices, and optionally implemented with program code executable by a computing device, which can be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described can be performed in a different order than shown, or made into individual integrated circuit modules, or multiple modules or steps made into a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.

[0110] The preferred embodiments of the application described above are intended to be merely illustrative, and numerous modifications and adaptations will be apparent to those skilled in the art. Such modifications and adaptations do not depart from the spirit and scope of the application as set forth in the following claims.

Claims

1. A testing method for a communication module, characterized in that, include: The virtual baseboard simulated by the virtual baseboard program enabled on the mobile terminal is determined, wherein the virtual baseboard is a program that simulates the baseboard function of the target home appliance through the virtual baseboard program; When a communication module under test exists on the virtual baseboard, a communication channel between the virtual baseboard and the communication module under test is established via a serial port. The virtual baseboard receives device commands from the IoT cloud via the communication channel and determines the response of the virtual baseboard to the device commands. The response is then uploaded to the IoT cloud via the communication module under test. The method further includes: When the communication module under test has processed and uploaded all the simulated response data corresponding to the response result to the Internet of Things cloud, the data comparison result between the simulated response data uploaded by the communication module under test and the simulated response data uploaded by the mobile terminal is obtained by the Internet of Things cloud. The data comparison result is used to indicate whether the data processing logic of the communication module under test conforms to the preset standard logic.

2. The testing method for the communication module according to claim 1, characterized in that, When the virtual baseboard has a corresponding communication module under test, after establishing a communication channel between the virtual baseboard and the communication module under test via a serial port, the method further includes: Receive test instructions for the target object, wherein the test instructions are used to instruct the virtual baseboard program to perform a simulated response test of the virtual baseboard; Generate corresponding simulated response data according to the test instructions; The simulated response data is sent to the communication module under test, and the reporting result from the communication module under test to the IoT cloud is obtained. The reporting result is used to indicate the status of the simulated response data being processed by the communication module under test and uploaded to the IoT cloud.

3. The testing method for the communication module according to claim 2, characterized in that, After generating the corresponding simulated response data according to the test instructions, the method further includes: The simulated response data is directly uploaded to the Internet of Things cloud via the mobile terminal, wherein the simulated response data includes at least one of the following: target object data corresponding to the virtual base, device configuration data corresponding to the virtual base, device operation data corresponding to the virtual base, and device parameter data corresponding to the virtual base.

4. The testing method for the communication module according to claim 1, characterized in that, The virtual backplane receives device commands from the IoT cloud via the communication channel, which are then transmitted through the communication module under test. The virtual backplane's response to these device commands is then determined, including: The device command is parsed to determine the response requirement corresponding to the device command, wherein the response requirement is used to indicate the target simulated response data that the virtual baseboard needs to return; The data type to be generated by the virtual baseboard program for test feedback is determined based on the response requirements; The data corresponding to the data type is used as the response result corresponding to the device command, and is fed back to the communication module under test through the communication channel.

5. The testing method for the communication module according to claim 1, characterized in that, After receiving device commands from the IoT cloud via the communication channel through the communication module under test, and determining the virtual backplane's response to the device commands, the method further includes: The device command and the corresponding response result are stored one by one to obtain the first test information; The virtual baseboard program adds a timestamp to the simulated response data generated according to the test instructions of the target object to obtain the second test information; The test modules used by the first test information and the second test information are matched, and the first test information and the second test information corresponding to the same test module are bound together. The first test information and the second test information that are bound together are uploaded to the IoT cloud.

6. The testing method for the communication module according to claim 5, characterized in that, After uploading the first test information and the second test information, which are bound together, to the IoT cloud, the method further includes: Obtain the analysis results of the first test information and the second test information from the IoT cloud; Based on the analysis results, determine whether the communication module under test is functioning properly.

7. A testing device for a communication module, characterized in that, include: The determination module is used to determine the virtual baseboard simulated by the virtual baseboard program enabled on the mobile terminal, wherein the virtual baseboard is a program that simulates the baseboard function of the target home appliance through the virtual baseboard program; A module is established to establish a communication channel between the virtual baseboard and the communication module under test via a serial port when the virtual baseboard has a communication module under test. The response module is used to receive device commands sent by the IoT cloud through the communication module under test via the communication channel, and to determine the response result of the virtual baseboard to the device commands, wherein the response result is uploaded to the IoT cloud via the communication module under test; The device further includes a receiving module, wherein the acquisition unit in the receiving module is used to acquire, when the communication module under test has processed and uploaded all the simulated response data corresponding to the response result to the Internet of Things cloud, the data comparison result of the simulated response data uploaded by the communication module under test and the simulated response data uploaded by the mobile terminal, wherein the data comparison result is used to indicate whether the data processing logic of the communication module under test conforms to the preset standard logic.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 6.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 6 through the computer program.

Citation Information

Patent Citations

  • Cleaning home appliance and control method and system thereof

    CN109330503A

  • Internet of Things debugging method, device and system and storage medium

    CN111901155A

  • Internet of Things simulation method, device and system and storage medium

    CN111934908A