CN115884238A - Communication module testing method and device, storage medium and electronic device - Google Patents

Communication module testing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115884238A
CN115884238A CN202111139079.2A CN202111139079A CN115884238A CN 115884238 A CN115884238 A CN 115884238A CN 202111139079 A CN202111139079 A CN 202111139079A CN 115884238 A CN115884238 A CN 115884238A
Authority
CN
China
Prior art keywords
communication module
tested
bottom plate
virtual
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111139079.2A
Other languages
Chinese (zh)
Inventor
吴小波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202111139079.2A priority Critical patent/CN115884238A/en
Publication of CN115884238A publication Critical patent/CN115884238A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a test method and a test device for a communication module, a storage medium and an electronic device, wherein the method comprises the following steps: determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of the target household appliance; under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through the serial port; receive the equipment instruction that the thing networking high in the clouds was issued through communication module that awaits measuring through communication channel to confirm the response result of virtual bottom plate to the equipment instruction, wherein, the response result uploads to the thing networking high in the clouds via communication module that awaits measuring, solved and can't realize the test and the analysis scheduling problem to communication module from the data aspect, and then realize the accurate collection to each link circulation data that communication module that awaits measuring corresponds, promoted the test efficiency and the coverage of test instruction to communication module that awaits measuring.

Description

Communication module testing method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for testing a communication module, a storage medium, and an electronic apparatus.
Background
At present, a WIFI communication module in the field of intelligent household appliances is used as important physical hardware and is used as a bridge for interaction between physical equipment and a cloud end, the WIFI communication module is connected with the cloud end on the upper side and transmits control instructions and data sent by the cloud end, the WIFI communication module is connected with lower connection equipment and sends the instructions and the data sent by the cloud end to the equipment, the equipment executes the control instructions and the data, and meanwhile, execution data and states of the equipment are reported to the cloud end, so that the WIFI communication module plays an important role in a whole IOT (Internet of Things, IOT for short) link; however, when the WIFI communication module is tested by using a real hardware bottom plate, all scenes of communication and interaction between the WIFI communication module and the bottom plate are not covered well, so that interactive data between the bottom plate and the WIFI communication module are not convenient to acquire, correctness of data sent and responded by the WIFI communication module is analyzed, and testing efficiency is low.
Aiming at the problems that the test and analysis of a communication module cannot be realized from a data plane in the related technology, an effective solution is not provided yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing a communication module, a storage medium and an electronic device, which are used for at least solving the problems that the communication module cannot be tested and analyzed from a data level in the related technology.
According to an embodiment of the present invention, there is provided a method for testing a communication module, including: determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of the target household appliance; under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through a serial port; the method comprises the steps of receiving an equipment instruction sent by the Internet of things cloud end through a communication module to be tested through a communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
In an exemplary embodiment, in a case that the virtual backplane has a corresponding communication module to be tested, after establishing a communication channel between the virtual backplane and the communication module to be tested via a serial port, the method further includes: receiving a test instruction of a target object, wherein the test instruction is used for instructing a virtual backplane program to perform a simulation response test of a virtual backplane; generating corresponding simulation response data according to the test instruction; and sending the simulation response data to a communication module to be tested, and acquiring a report result of the communication module to be tested to the cloud end of the Internet of things, wherein the report result is used for indicating the condition that the simulation response data is uploaded to the cloud end of the Internet of things after being processed by the communication module to be tested.
In an exemplary embodiment, after generating the corresponding simulation response data according to the test instruction, the method further includes: the simulation response data are directly uploaded to the cloud end of the Internet of things through the mobile terminal, wherein the simulation response data comprise at least one of the following data: target object data corresponding to the virtual bottom plate, device configuration data corresponding to the virtual bottom plate, device operation data corresponding to the virtual bottom plate, and device parameter data corresponding to the virtual bottom plate.
In an exemplary embodiment, after the simulated response data is sent to the communication module to be tested and the report result of the communication module to be tested to the cloud end of the internet of things is determined, the method further includes: and under the condition that the reported result indicates that the communication module to be tested completely processes and uploads the simulation response data to the cloud end of the Internet of things, acquiring a data comparison result of the simulation response data uploaded by the communication module to be tested by the cloud end of the Internet of things and the simulation response data uploaded by the mobile terminal, wherein the data comparison result is used for indicating whether the data processing logic of the communication module to be tested accords with the preset standard logic.
In an exemplary embodiment, receiving, through a communication channel, an equipment instruction issued by an internet of things cloud through a communication module to be tested, and determining a response result of a virtual backplane to the equipment instruction includes: analyzing the equipment instruction to determine a response requirement corresponding to the equipment instruction, wherein the response requirement is used for indicating target simulation response data needing to be fed back by the virtual bottom plate; determining the data type to be generated by the virtual bottom board program for test feedback according to the response requirement; and taking the data corresponding to the data type as a response result corresponding to the equipment instruction, and feeding back the response result to the communication module to be tested through the communication channel.
In an exemplary embodiment, after receiving, through a communication channel, an equipment instruction issued by the internet of things cloud through a communication module to be tested and determining a response result of the virtual backplane to the equipment instruction, the method further includes: storing the equipment instruction and a response result corresponding to the equipment instruction in a one-to-one correspondence manner to obtain first test information; adding a timestamp to simulation response data generated by the virtual bottom board program according to the test instruction of the target object to obtain second test information; the communication modules to be tested used by the first test information and the second test information are matched, the first test information and the second test information corresponding to the same communication module to be tested are bound, and the first test information and the second test information with the binding relation are uploaded to the cloud end of the Internet of things.
In an exemplary embodiment, after the first test information and the second test information having the binding relationship are uploaded to the cloud of the internet of things, the method further includes: acquiring an analysis result of the cloud end of the Internet of things on the first test information and the second test information; and determining whether the function of the communication module to be tested is normal or not according to the analysis result.
According to another embodiment of the present invention, there is also provided a test apparatus for a communication module, including: the system comprises a determining module, a judging module and a processing module, wherein the determining module is used for determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal, and the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of the target household appliance; the establishing module is used for establishing a communication channel between the virtual bottom plate and the communication module to be tested through a serial port under the condition that the communication module to be tested exists in the virtual bottom plate; the response module is used for receiving an equipment instruction sent by the Internet of things cloud end through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
In an exemplary embodiment, the apparatus further includes: the system comprises a receiving module, a test module and a control module, wherein the receiving module is used for receiving a test instruction of a target object, and the test instruction is used for indicating a virtual bottom board program to carry out a simulation response test of a virtual bottom board; generating corresponding simulation response data according to the test instruction; and sending the simulation response data to a communication module to be tested, and acquiring a report result of the communication module to be tested to the cloud end of the Internet of things, wherein the report result is used for indicating the condition that the simulation response data is uploaded to the cloud end of the Internet of things after being processed by the communication module to be tested.
In an exemplary embodiment, the receiving module is further configured to directly upload, by the mobile terminal, the simulation response data to the cloud of the internet of things, where the simulation response data includes at least one of: target object data corresponding to the virtual bottom plate, device configuration data corresponding to the virtual bottom plate, device operation data corresponding to the virtual bottom plate, and device parameter data corresponding to the virtual bottom plate.
In an exemplary embodiment, the receiving module further includes: and the obtaining unit is used for obtaining a data comparison result of the simulation response data uploaded by the communication module to be tested and the simulation response data uploaded by the mobile terminal from the internet of things cloud under the condition that the reporting result indicates that the communication module to be tested completely processes and uploads the simulation response data to the internet of things cloud, wherein the data comparison result is used for indicating whether the data processing logic of the communication module to be tested accords with the preset standard logic.
In an exemplary embodiment, the response module is further configured to analyze the device instruction to determine a response requirement corresponding to the device instruction, where the response requirement is used to indicate that the virtual backplane needs to feed back target simulation response data; determining the type of data to be generated by the virtual bottom board program for test feedback according to the response requirement; and taking the data corresponding to the data type as a response result corresponding to the equipment instruction, and feeding back the response result to the communication module to be tested through the communication channel.
In an exemplary embodiment, the apparatus further includes: the storage module is used for correspondingly storing the equipment instructions and response results corresponding to the equipment instructions one by one to obtain first test information; adding a timestamp to simulation response data generated by the virtual bottom board program according to the test instruction of the target object to obtain second test information; the communication modules to be tested used by the first test information and the second test information are matched, the first test information and the second test information corresponding to the same communication module to be tested are bound, and the first test information and the second test information with the binding relation are uploaded to the cloud end of the Internet of things.
In an exemplary embodiment, the storage module is further configured to obtain an analysis result of the internet of things cloud end on the first test information and the second test information; and determining whether the function of the communication module to be tested is normal or not according to the analysis result.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method for testing the communication module when running.
According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for testing the communication module through the computer program.
In the embodiment of the invention, a virtual bottom plate simulated by a virtual bottom plate program started on a mobile terminal is determined, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of a target household appliance; under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through the serial port; receiving an equipment instruction sent by the Internet of things cloud end through a communication module to be tested through a communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested; that is to say, through establishing the communication module that awaits measuring, the thing networking high in the clouds, and the relation of connection between the virtual bottom plate, carry out interactive data through the communication module that awaits measuring and collect, then confirm the test result of the communication module that awaits measuring through the analytic data, adopt above-mentioned technical scheme, the unable test and the analysis scheduling problem of realizing communication module from the data aspect of having solved, and then realize the accurate collection to each link circulation data that the communication module that awaits measuring corresponds, the test efficiency and the cover face of test instruction to the communication module that awaits measuring have been promoted.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a testing method of a communication module according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of testing a communication module according to an embodiment of the invention;
FIG. 3 is an architectural diagram of a test system according to an alternative embodiment of the present invention;
fig. 4 is a schematic diagram illustrating test interaction of IOT cloud-issued device commands according to an alternative embodiment of the present invention;
FIG. 5 is a diagram of a test interaction for a virtual backplane to actively send application instructions in accordance with an alternative embodiment of the present invention;
FIG. 6 is a diagram of a test interaction for a virtual backplane to actively send application instructions in accordance with an alternative embodiment of the present invention;
fig. 7 is a block diagram of a testing apparatus for a communication module according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal, or a similar computing device. Taking the example of running on a computer terminal, fig. 1 is a hardware structure block diagram of a computer terminal of a testing method of a communication module according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, and in an exemplary embodiment, may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used for storing a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the testing method of the communication module in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may 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 communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a testing method of a communication module is provided, which is applied to the computer terminal, and fig. 2 is a flowchart of the testing method of the communication module according to the embodiment of the present invention, where the flowchart includes the following steps:
step S202, determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of the target household appliance;
optionally, in the embodiment of the present invention, a virtual backplane program is installed on the mobile terminal to simulate backplane functions of different home appliances, and a virtual backplane is generated to implement a connection test on the communication module to be tested.
Step S204, under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through a serial port;
step S206, receiving an equipment instruction sent by the Internet of things cloud end through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
It can be understood that, in order to ensure the collection of the test data of the communication module to be tested, after the virtual bottom plate 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 bottom plate, and the response result is uploaded to the cloud end of the internet of things after being processed by the communication module to be tested.
Determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal through the steps, wherein the virtual bottom plate is a program which is simulated through the virtual bottom plate program and has the bottom plate function of the target household appliance; under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through the serial port; receiving an equipment instruction issued by the Internet of things cloud through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud through the communication module to be tested; that is to say, through establishing the communication module that awaits measuring, the thing networking high in the clouds, and the relation of connection between the virtual bottom plate, carry out interactive data to the communication module that awaits measuring and collect, then confirm the test result of the communication module that awaits measuring through the analytic data, adopt above-mentioned technical scheme, the unable test and the analysis scheduling problem of realizing communication module from the data aspect of having solved, and then realize the accurate collection of each link circulation data that the communication module that awaits measuring corresponds, the test efficiency and the coverage of test instruction to the communication module that awaits measuring have been promoted.
In an exemplary embodiment, in a case that the virtual backplane has a corresponding communication module to be tested, after establishing a communication channel between the virtual backplane and the communication module to be tested via a serial port, the method further includes: receiving a test instruction of a target object, wherein the test instruction is used for instructing a virtual bottom board program to perform a simulation response test of a virtual bottom board; generating corresponding simulation response data according to the test instruction; and sending the simulation response data to a communication module to be tested, and acquiring a report result of the communication module to be tested to the cloud end of the Internet of things, wherein the report result is used for indicating the condition that the simulation response data is uploaded to the cloud end of the Internet of things after being processed by the communication module to be tested.
In short, in order to ensure the accuracy of the test of the communication module to be tested, the virtual bottom plate can also pass through the setting of a target object, the simulation response data for the test is actively initiated, the simulation response data is processed by the communication module to be tested, all data are uploaded to the report result of the cloud end of the internet of things to the cloud end of the internet of things through the communication module to be tested, further, the simulation response data passing through the communication module to be tested and the original simulation response data corresponding to the virtual bottom plate exist on the cloud end of the internet of things, and whether the function of the communication module to be tested is correct and effective is determined according to the data change condition.
In an exemplary embodiment, after generating the corresponding simulation response data according to the test instruction, the method further includes: the simulation response data are directly uploaded to the cloud end of the Internet of things through the mobile terminal, wherein the simulation response data comprise at least one of the following data: target object data corresponding to the virtual bottom plate, device configuration data corresponding to the virtual bottom plate, device operation data corresponding to the virtual bottom plate, and device parameter data corresponding to the virtual bottom plate.
Optionally, the virtual backplane program for generating the virtual backplane may use target object data used to represent the identity of the target object as simulation response data, or use device operation data corresponding to the target household appliance simulated by the virtual backplane as simulation response data, and may also use device parameter data corresponding to the target household appliance corresponding to the virtual backplane as simulation response data, and report data change conditions of the virtual backplane to the cloud comprehensively, and when the program content corresponding to the virtual backplane is changed in the virtual backplane program by the target object, the changed data is uploaded through the communication module to be tested in real time, so that the test coverage of the communication module to be tested is wider.
In an exemplary embodiment, after the simulated response data is sent to the communication module to be tested and the report result of the communication module to be tested to the cloud end of the internet of things is determined, the method further includes: and under the condition that the reported result indicates that the communication module to be tested completely processes and uploads the simulation response data to the cloud end of the Internet of things, acquiring a data comparison result of the simulation response data uploaded by the communication module to be tested by the cloud end of the Internet of things and the simulation response data uploaded by the mobile terminal, wherein the data comparison result is used for indicating whether the data processing logic of the communication module to be tested accords with a preset standard logic.
It can be understood that, under the circumstances that the internet of things cloud end has the simulation response data that this module to be tested corresponds the simulation response data uploaded and the original simulation response data of this module to be tested of test that mobile terminal uploaded simultaneously, through comparing the difference that appears in the data, alright carry out certain definite affirmation with whether there is functional defect in the communication module to be tested.
In an exemplary embodiment, receiving, through a communication channel, an equipment instruction issued by an internet of things cloud through a communication module to be tested, and determining a response result of a virtual backplane to the equipment instruction includes: analyzing the equipment instruction to determine a response requirement corresponding to the equipment instruction, wherein the response requirement is used for indicating target simulation response data needing to be fed back by the virtual bottom plate; determining the data type to be generated by the virtual bottom board program for test feedback according to the response requirement; and taking the data corresponding to the data type as a response result corresponding to the equipment instruction, and feeding back the response result to the communication module to be tested through the communication channel.
For example, after the internet of things cloud issues a device instruction of 'starting a device' through the communication module to be tested, the virtual backplane analyzes the device instruction through a preset 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, instructs the virtual backplane program to generate a corresponding response result, namely, the virtual backplane program can realize different functions of a target household appliance backplane, and comprehensively test the communication module to be tested.
In an exemplary embodiment, after receiving, through a communication channel, an equipment instruction issued by an internet-of-things cloud through a communication module to be tested, and determining a response result of a virtual backplane to the equipment instruction, the method further includes: storing the equipment instruction and a response result corresponding to the equipment instruction in a one-to-one correspondence manner to obtain first test information; adding a timestamp to simulation response data generated by the virtual bottom board program according to the test instruction of the target object to obtain second test information; the communication modules to be tested used by the first test information and the second test information are matched, the first test information and the second test information corresponding to the same communication module to be tested are bound, and the first test information and the second test information with the binding relation are uploaded to the cloud end of the Internet of things.
In an exemplary embodiment, after the first test information and the second test information having the binding relationship are uploaded to the cloud of the internet of things, the method further includes: obtaining the analysis result of the cloud end of the Internet of things on the first test information and the second test information; and determining whether the function of the communication module to be tested is normal or not according to the analysis result.
In order to better understand the process of the testing method of the communication module, the following describes a flow of the implementation method of the testing of the communication module with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
The method for testing the intelligent household appliance WIFI communication module based on the virtual bottom plate is provided in the embodiment, the function of real equipment is simulated through a virtual bottom plate program, a serial port is used for interacting with the WIFI communication module, data are collected in the test of the WIFI communication module, the data are reported to the cloud end of the Internet of things, the cloud end of the Internet of things is analyzed according to the collected data, whether the function of the to-be-tested WIFI communication module is normal or not is determined, and the correctness of the function of the WIFI communication module is judged.
Optionally, fig. 3 is a schematic diagram of an architecture of a test system according to an alternative embodiment of the present invention, which includes the following parts:
the virtual backplane 32 is configured to simulate a function of a real physical device, and may be an application program developed in JAVA language and running on a PC (Personal computer, PC for short), and implement communication with a WIFI module (i.e., a WIFI communication module) by monitoring a serial port connected to the module on the PC.
Optionally, the virtual backplane 32 has the following main functions: (1) And responding to the device instruction sent by the WIFI module through the serial port, for example, responding to report the device version, report the finished product code and the finished product code short identifier, respond to report a fault alarm, and receive an ACK (acknowledgement Character, abbreviated as ACK) acknowledgement frame after the instruction is received. (2) Actively sending an application instruction to the WIFI module, and receiving a response of the WIFI module, for example: actively reporting user data, setting the WIFI module to enter a configuration mode, inquiring information of the WIFI module and the like. (3) And after the received device instruction sent by the WIFI module, the application instruction sent to the WIFI by the virtual bottom plate and response data of the WIFI module aiming at the application instruction are collected and correspondingly matched, the device instruction and the response data are reported to the IOT cloud.
The WIFI module 34 (which is equivalent to a communication module to be tested in the embodiment of the present invention), which is a real hardware device, is connected to a serial port of a PC through a data line, and is connected to the IOT cloud end through a wide area network, and is configured to receive a device instruction issued by the IOT cloud end, process the device instruction, send the processed device instruction to the virtual backplane, then receive a response instruction of the virtual backplane, perform subsequent processing, and report data to the IOT cloud; and the system is also used for receiving the application instruction sent by the virtual bottom plate, responding to the instruction, processing the data corresponding to the received application instruction and reporting the data to the IOT cloud.
The IOT cloud 36 is used for comparing data after receiving the data reported by the virtual bottom plate and the WIFI module, judging whether the data processed by the WIFI module is correct or not, and further verifying the correctness of the corresponding function of the WIFI module.
It should be noted that when the WIFI module is connected with the IOT cloud, the WIFI module is connected with the IOT cloud by using a SOCKET connection mode through a wide area network; when the WIFI module is connected with the equipment, the RS485/RS232 is generally used for serial port communication; the framework simulates real equipment by establishing a virtual bottom plate program, acquires data sent to a bottom plate by a WIFI module, and can send instruction data to the WIFI module through the virtual bottom plate program and collect response data of the WIFI module; through interactive data between the WIFI module and the virtual bottom plate program, the correctness of the function of the WIFI module is comprehensively analyzed, the test accuracy and the test efficiency of the code correctness of the WIFI module are improved, and the transparency and the high efficiency of the WIFI module in the test process are kept.
Fig. 4 is a schematic diagram of test interaction of an IOT cloud issuing device instruction according to an alternative embodiment of the present invention, as shown in fig. 4, specifically including the following steps:
step S402: the IOT cloud end issues a device instruction written by using an E + + protocol to the WIFI module;
step S404: the WIFI module forwards the equipment instruction to the virtual bottom plate;
step S406: the virtual bottom board simulates a response instruction according to the content corresponding to the equipment instruction;
step S408: feeding the response instruction back to the WIFI module;
step S410: the WIFI module processes the response instruction to obtain equipment data;
step S412: WIFI module spare equipment data upload to the IOT high in the clouds.
Fig. 5 is a schematic diagram (one) of interaction of testing when a virtual backplane actively sends an application instruction according to an alternative embodiment of the present invention, as shown in fig. 5, the following steps are specifically performed:
step S502: the virtual bottom plate determines a simulation response instruction to be generated according to the test requirement;
step S504: the virtual bottom board actively writes the simulation response instruction through an E + + protocol and then sends the simulation response instruction to the WIFI module;
step S506: the WIFI module processes the simulation response instruction to obtain equipment data;
step S508: the WIFI module feeds back the device data to the IOT cloud;
step S510: and the WIFI module feeds back an E + + instruction response corresponding to the uploading result of the equipment data to the virtual bottom plate.
Fig. 6 is a schematic diagram (ii) of interaction of testing when a virtual backplane actively sends an application instruction according to an alternative embodiment of the present invention, as shown in fig. 6, the following steps are specifically performed:
step S602: the virtual bottom plate determines a simulation response instruction to be generated according to the test requirement;
step S604: the virtual bottom board actively writes the simulation response instruction through an E + + protocol and then sends the simulation response instruction to the WIFI module;
step S606: the WIFI module processes the simulation response instruction;
step S608: and the WIFI module feeds back the E + + instruction response corresponding to the processing result after processing the simulation response instruction to the virtual bottom plate.
It should be noted that the interaction manner corresponding to fig. 5 is mainly applied to a situation that the virtual backplane actively sends the application instruction and the IOT cloud end can receive the device data change. The interaction mode corresponding to fig. 5 is mainly applied to the situation that the virtual backplane actively sends an application instruction, the WIFI module processes the application instruction, and the device data does not need to be reported to the IOT cloud.
Optionally, the IOT cloud may further compare data with the label position in the above-mentioned interactive flowcharts such as fig. 4 to fig. 6, so as to determine whether the data processing and function of the WIFI module meet the requirements.
In conclusion, according to the embodiment, the code mode is used for simulating the function of the real device, the bottom plate instruction is generated for testing the WIFI module, the function of the WIFI module is tested from the data layer, the problem that the function correctness of the WIFI module is checked by the original testing module through the operation device by means of the real device and the APP is avoided, the testing is completely a black box, and the problems that the transparency and the efficiency of the WIFI module testing cannot be achieved are solved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Fig. 7 is a block diagram of a test apparatus for a communication module according to an embodiment of the present invention; as shown in fig. 7, includes:
a determining module 72, configured to determine a virtual backplane simulated by a virtual backplane program activated on the mobile terminal, where the virtual backplane is a program that is simulated by the virtual backplane program and has a backplane function of the target home appliance;
the establishing module 74 is used for establishing a communication channel between the virtual bottom plate and the communication module to be tested through a serial port under the condition that the communication module to be tested exists in the virtual bottom plate;
the response module 76 is configured to receive, through the communication channel, an equipment instruction issued by the internet of things cloud through the communication module to be tested, and determine a response result of the virtual bottom plate to the equipment instruction, where the response result is uploaded to the internet of things cloud through the communication module to be tested.
Determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal through the device, wherein the virtual bottom plate is a program which is simulated through the virtual bottom plate program and has the bottom plate function of the target household appliance; under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through the serial port; receiving an equipment instruction issued by the Internet of things cloud through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud through the communication module to be tested; that is to say, through establishing the communication module that awaits measuring, the thing networking high in the clouds, and the relation of connection between the virtual bottom plate, carry out interactive data to the communication module that awaits measuring and collect, then confirm the test result of the communication module that awaits measuring through the analytic data, adopt above-mentioned technical scheme, the unable test and the analysis scheduling problem of realizing communication module from the data aspect of having solved, and then realize the accurate collection of each link circulation data that the communication module that awaits measuring corresponds, the test efficiency and the coverage of test instruction to the communication module that awaits measuring have been promoted.
In an exemplary embodiment, the apparatus further includes: the system comprises a receiving module, a test module and a control module, wherein the receiving module is used for receiving a test instruction of a target object, and the test instruction is used for indicating a virtual bottom board program to carry out a simulation response test of a virtual bottom board; generating corresponding simulation response data according to the test instruction; and sending the simulation response data to a communication module to be tested, and acquiring a report result of the communication module to be tested to the cloud end of the Internet of things, wherein the report result is used for indicating the condition that the simulation response data is uploaded to the cloud end of the Internet of things after being processed by the communication module to be tested. In short, in order to ensure the accuracy of the test of the communication module to be tested, the virtual bottom plate can also pass through the setting of a target object, the simulation response data for the test is actively initiated, the simulation response data is processed by the communication module to be tested, all data are uploaded to the report result of the cloud end of the internet of things to the cloud end of the internet of things through the communication module to be tested, further, the simulation response data passing through the communication module to be tested and the original simulation response data corresponding to the virtual bottom plate exist on the cloud end of the internet of things, and whether the function of the communication module to be tested is correct and effective is determined according to the data change condition.
In an exemplary embodiment, the receiving module is further configured to directly upload, by the mobile terminal, the simulation response data to the cloud of the internet of things, where the simulation response data includes at least one of: target object data corresponding to the virtual backplane, device configuration data corresponding to the virtual backplane, device operation data corresponding to the virtual backplane, and device parameter data corresponding to the virtual backplane.
Optionally, the virtual backplane program for generating the virtual backplane may use target object data used to represent the identity of the target object as simulation response data, or use device operation data corresponding to the target household appliance simulated by the virtual backplane as simulation response data, and may also use device parameter data corresponding to the target household appliance corresponding to the virtual backplane as simulation response data, and report data change conditions of the virtual backplane to the cloud comprehensively, and when the program content corresponding to the virtual backplane is changed in the virtual backplane program by the target object, the changed data is uploaded through the communication module to be tested in real time, so that the test coverage of the communication module to be tested is wider.
In an exemplary embodiment, the receiving module further includes: the obtaining unit is used for obtaining a data comparison result of the simulation response data uploaded by the communication module to be tested and the simulation response data uploaded by the mobile terminal from the cloud of the internet of things under the condition that the reported result indicates that the communication module to be tested completely processes and uploads the simulation response data to the cloud of the internet of things, wherein the data comparison result is used for indicating whether the data processing logic of the communication module to be tested accords with the preset standard logic.
It can be understood that, under the circumstances that the internet of things cloud end has the simulation response data that this module to be tested corresponds the simulation response data uploaded and the original simulation response data of this module to be tested of test that mobile terminal uploaded simultaneously, through comparing the difference that appears in the data, alright carry out certain definite affirmation with whether there is functional defect in the communication module to be tested.
In an exemplary embodiment, the response module is further configured to analyze the device instruction to determine a response requirement corresponding to the device instruction, where the response requirement is used to indicate that the virtual backplane needs to feed back target simulation response data; determining the data type to be generated by the virtual bottom board program for test feedback according to the response requirement; and taking the data corresponding to the data type as a response result corresponding to the equipment instruction, and feeding back the response result to the communication module to be tested through the communication channel.
For example, after the internet of things cloud issues a device instruction of 'starting a device' through the communication module to be tested, the virtual bottom board analyzes the device instruction through a preset E + + protocol authentication mode to obtain a control instruction for controlling the virtual bottom board to start, and then the virtual bottom board determines a corresponding response requirement for the control instruction, instructs the virtual bottom board program to generate a corresponding response result, namely, the virtual bottom board program can realize different functions of the bottom board of the target household appliance device, and comprehensively tests the communication module to be tested.
In an exemplary embodiment, the apparatus further includes: the storage module is used for correspondingly storing the equipment instructions and response results corresponding to the equipment instructions one by one to obtain first test information; adding a timestamp to simulation response data generated by the virtual bottom board program according to the test instruction of the target object to obtain second test information; the communication modules to be tested used by the first test information and the second test information are matched, the first test information and the second test information corresponding to the same communication module to be tested are bound, and the first test information and the second test information with the binding relation are uploaded to the cloud end of the Internet of things.
In an exemplary embodiment, the storage module is further configured to obtain an analysis result of the internet of things cloud end on the first test information and the second test information; and determining whether the function of the communication module to be tested is normal or not according to the analysis result.
An embodiment of the present invention further provides a storage medium including a stored program, where the program executes the method of any one of the above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
the method comprises the steps of S1, determining a virtual bottom plate simulated by a virtual bottom plate program started on a mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of a target household appliance;
s2, under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through a serial port;
and S3, receiving an equipment instruction sent by the Internet of things cloud end through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus 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.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
the method comprises the steps of S1, determining a virtual bottom plate simulated by a virtual bottom plate program started on a mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of a target household appliance;
s2, under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through a serial port;
and S3, receiving an equipment instruction sent by the Internet of things cloud end through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for testing a communication module, comprising:
determining a virtual bottom plate simulated by a virtual bottom plate program started on a mobile terminal, wherein the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of a target household appliance;
under the condition that the communication module to be tested exists in the virtual bottom plate, a communication channel between the virtual bottom plate and the communication module to be tested is established through a serial port;
and receiving an equipment instruction sent by the Internet of things cloud end through the communication module to be tested through the communication channel, and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
2. The method for testing a communication module according to claim 1, wherein after the communication channel between the virtual backplane and the communication module to be tested is established through a serial port in the case that the virtual backplane has the corresponding communication module to be tested, the method further comprises:
receiving a test instruction of a target object, wherein the test instruction is used for instructing the virtual backplane program to perform a simulated response test of the virtual backplane;
generating corresponding simulation response data according to the test instruction;
and sending the simulation response data to the communication module to be tested, and acquiring a report result of the communication module to be tested to the Internet of things cloud, wherein the report result is used for indicating the condition that the simulation response data is uploaded to the Internet of things cloud after being processed by the communication module to be tested.
3. The method for testing a communication module according to claim 2, wherein after generating corresponding simulated response data according to the test instruction, the method further comprises:
the simulation response data are directly uploaded to the cloud end of the Internet of things through the mobile terminal, wherein the simulation response data comprise at least one of the following data: target object data corresponding to the virtual backplane, device configuration data corresponding to the virtual backplane, device operation data corresponding to the virtual backplane, and device parameter data corresponding to the virtual backplane.
4. The method for testing the communication module according to claim 3, wherein the simulation response data is sent to the communication module to be tested, and after determining a report result of the communication module to be tested to the cloud of the internet of things, the method further comprises:
and under the condition that the reported result indicates that the communication module to be tested completely processes and uploads the simulation response data to the Internet of things cloud, acquiring a data comparison result of the Internet of things cloud on the simulation response data uploaded by the communication module to be tested and the simulation response data uploaded by the mobile terminal, wherein the data comparison result is used for indicating whether the data processing logic of the communication module to be tested accords with preset standard logic or not.
5. The method for testing the communication module according to claim 1, wherein the step of receiving, through the communication channel, a device instruction issued by an internet-of-things cloud through the communication module to be tested, and determining a response result of the virtual backplane to the device instruction comprises:
analyzing the equipment instruction to determine a response requirement corresponding to the equipment instruction, wherein the response requirement is used for indicating target simulation response data needing to be fed back by the virtual bottom plate;
determining the data type to be generated by the virtual bottom board program for test feedback according to the response requirement;
and taking the data corresponding to the data type as a response result corresponding to the equipment instruction, and feeding back the response result to the communication module to be tested through the communication channel.
6. The method for testing the communication module according to claim 1, wherein after receiving, through the communication channel, a device command issued by an internet of things cloud through the communication module to be tested and determining a response result of the virtual backplane to the device command, the method further comprises: storing the equipment instructions and response results corresponding to the equipment instructions in a one-to-one correspondence manner to obtain first test information;
adding a timestamp to simulation response data generated by the virtual bottom board program according to the test instruction of the target object to obtain second test information;
matching the communication module to be tested 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 communication module to be tested,
and uploading the first test information and the second test information with the binding relationship to the cloud end of the Internet of things.
7. The method for testing a communication module according to claim 6, wherein after the first test information and the second test information having the binding relationship are uploaded to a cloud of the internet of things, the method further comprises:
obtaining an analysis result of the first test information and the second test information by the Internet of things cloud;
and determining whether the function of the communication module to be tested is normal or not according to the analysis result.
8. A test apparatus for a communication module, comprising:
the system comprises a determining module, a judging module and a processing module, wherein the determining module is used for determining a virtual bottom plate simulated by a virtual bottom plate program started on the mobile terminal, and the virtual bottom plate is a program which is simulated by the virtual bottom plate program and has the bottom plate function of the target household appliance;
the establishing module is used for establishing a communication channel between the virtual bottom plate and the communication module to be tested through a serial port under the condition that the communication module to be tested exists in the virtual bottom plate;
the response module is used for receiving an equipment instruction sent by the communication module to be tested through the Internet of things cloud end through the communication channel and determining a response result of the virtual bottom plate to the equipment instruction, wherein the response result is uploaded to the Internet of things cloud end through the communication module to be tested.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202111139079.2A 2021-09-27 2021-09-27 Communication module testing method and device, storage medium and electronic device Pending CN115884238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111139079.2A CN115884238A (en) 2021-09-27 2021-09-27 Communication module testing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111139079.2A CN115884238A (en) 2021-09-27 2021-09-27 Communication module testing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115884238A true CN115884238A (en) 2023-03-31

Family

ID=85763178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111139079.2A Pending CN115884238A (en) 2021-09-27 2021-09-27 Communication module testing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115884238A (en)

Similar Documents

Publication Publication Date Title
CN111459794B (en) Communication network testing method, device, computer equipment and storage medium
CN103237082B (en) Cloud method of testing, system and cloud server
US10158552B2 (en) Device profile-driven automation for cell-based test systems
CN106776294B (en) Automatic android mobile phone testing method and system
US10251079B2 (en) Cloud-based services for management of cell-based test systems
CN107018523A (en) WIFI module method of testing and device
CN112333057B (en) Intelligent household equipment distribution network testing method and device, executive machine and storage medium
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
CN110784879B (en) Network mode switching test method, system, equipment and medium of communication module
CN106776350A (en) The accurate method of testing and device of a kind of program
CN104468288A (en) Terminal network data testing method and device
CN106792784B (en) A kind of method, server and system carrying out data check in server side
CN104717670A (en) Business quality testing method, device and system
CN113407469B (en) Parameter configuration method and device, storage medium and electronic device
CN102739463A (en) Remote reliability lifetime verification and test system, and method thereof
CN112105025B (en) eSIM-based operator network test system and method
CN103544104B (en) Testing method for power distribution terminal remote control functional software module
CN115884238A (en) Communication module testing method and device, storage medium and electronic device
CN115442266A (en) Gateway performance testing method and device, storage medium and electronic device
CN116074228A (en) Network card testing method and device, storage medium and electronic equipment
CN114466395A (en) Method and device for testing performance of base station, storage medium and electronic device
CN114268650A (en) Configuration method and system for establishing communication connection
CN104113873A (en) Automatic test system and device for GPRS module internally arranged in power distribution terminal
CN114172832A (en) Internet of things testing method and device, central control equipment and computer equipment
CN114564381A (en) Complete machine production and test method for Internet of things equipment

Legal Events

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