CN111858295B - Firmware testing method and device, electronic equipment and storage medium - Google Patents

Firmware testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111858295B
CN111858295B CN201911410354.2A CN201911410354A CN111858295B CN 111858295 B CN111858295 B CN 111858295B CN 201911410354 A CN201911410354 A CN 201911410354A CN 111858295 B CN111858295 B CN 111858295B
Authority
CN
China
Prior art keywords
test
instruction
target
firmware
wireless communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911410354.2A
Other languages
Chinese (zh)
Other versions
CN111858295A (en
Inventor
杨健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qisheng Technology Co Ltd
Original Assignee
Beijing Qisheng Technology 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 Beijing Qisheng Technology Co Ltd filed Critical Beijing Qisheng Technology Co Ltd
Priority to CN201911410354.2A priority Critical patent/CN111858295B/en
Publication of CN111858295A publication Critical patent/CN111858295A/en
Application granted granted Critical
Publication of CN111858295B publication Critical patent/CN111858295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a firmware testing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions; packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction; the target message Wen Zhiling is sent to a tested device by using a communication connection corresponding to the wireless communication protocol, and the target message instruction is used for testing functional firmware which runs in the tested device and corresponds to the target message instruction; the plurality of test instructions are instructions used for indicating the tested device to execute the function of the tested device from logic instructions of the control equipment, and the aim of testing the Internet of things product in time can be achieved through the method.

Description

Firmware testing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of device testing technologies, and in particular, to a firmware testing method, a device, an electronic device, and a storage medium.
Background
With the development of the internet of things, more and more internet of things products are put on the market. Before the internet of things product is put on the market, in order to ensure the quality of the product, the internet of things product needs to be tested to determine whether the functions on the internet of things product can be normally realized.
At present, when testing the internet of things product, after application programs running on control equipment (a server and a user control terminal) are all required to be completed, a function execution instruction is sent to the internet of things product through the control equipment so as to complete the test of the function on the internet of things product. However, the development period of the application program on the control device is longer than that of the product of the internet of things, so that after the development of the product of the internet of things is completed, the application program on the control device is required to be tested after the development of the product of the internet of things is completed, and the product of the internet of things cannot be tested in time after the development of the product of the internet of things.
Disclosure of Invention
In view of the above, the application provides a firmware testing method, a device, an electronic device and a storage medium, so as to achieve the purpose of testing the internet of things product in time.
In a first aspect, an embodiment of the present application provides a firmware testing method, including:
Determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions;
packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The target message Wen Zhiling is sent to a tested device by using a communication connection corresponding to the wireless communication protocol, and the target message instruction is used for testing functional firmware which runs in the tested device and corresponds to the target message instruction;
the plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
Optionally, the firmware testing method further includes:
And after receiving the test feedback information sent by the tested device through the communication connection, continuing to execute the step of determining the target test instruction to be executed currently according to the preset test sequence of the plurality of test instructions.
Optionally, the firmware testing method further includes:
After receiving the test feedback information sent by the tested device through the communication connection, analyzing the test feedback information to obtain test data;
comparing a preset result corresponding to the target test instruction with the test data to obtain a comparison result of the preset result and the test data;
And outputting the comparison result.
Optionally, for each test instruction, the test instruction includes a preset message body parameter.
Optionally, the wireless communication protocol includes:
The long-range wireless communication protocol and the short-range wireless communication protocol.
Optionally, the control device includes a server and a client;
When the target test instruction belongs to a test instruction included by the server, the wireless communication protocol is the remote wireless communication protocol;
And when the target test instruction belongs to the test instruction included by the client, the wireless communication protocol is the short-distance wireless communication protocol.
In a second aspect, an embodiment of the present application provides a firmware test apparatus, including:
the determining unit is used for determining a target test instruction to be executed currently according to a preset test sequence of the plurality of test instructions;
the packaging unit is used for packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The sending unit is configured to send the target packet Wen Zhiling to a device under test by using a communication connection corresponding to the wireless communication protocol, where the target packet instruction is used to test functional firmware running in the device under test and corresponding to the target packet instruction;
the plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
Optionally, the determining unit is further configured to:
And after receiving the test feedback information sent by the tested device through the communication connection, continuing to execute the step of determining the target test instruction to be executed currently according to the preset test sequence of the plurality of test instructions.
Optionally, the firmware testing apparatus further includes:
The analysis unit is used for analyzing the test feedback information after receiving the test feedback information sent by the tested device through the communication connection to obtain test data;
the comparison unit is used for comparing the preset result corresponding to the target test instruction with the test data to obtain a comparison result of the preset result and the test data;
and the output unit is used for outputting the comparison result.
Optionally, for each test instruction, the test instruction includes a preset message body parameter.
Optionally, the wireless communication protocol includes:
The long-range wireless communication protocol and the short-range wireless communication protocol.
Optionally, the control device includes a server and a client;
When the target test instruction belongs to a test instruction included by the server, the wireless communication protocol is the remote wireless communication protocol;
And when the target test instruction belongs to the test instruction included by the client, the wireless communication protocol is the short-distance wireless communication protocol.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over a bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the firmware test method of any of the first aspects.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the firmware test method as in any of the first aspects.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
In the application, when testing the functional firmware in the tested device, the target test instruction to be executed currently can be determined according to the preset test sequence of a plurality of test instructions, each test can be conducted on one test instruction through the steps, so that the test instruction can be orderly conducted, the functional firmware in the tested device can be sequentially tested, after the target test instruction is determined, the target test instruction is packaged by using the preset wireless communication protocol corresponding to the target test instruction, so as to obtain a target message instruction, and then the target message Wen Zhiling is sent to the tested device by using the communication connection corresponding to the wireless communication protocol. The control device is a device for controlling the tested device in the real environment, all logic running in the control device not only comprises instructions for instructing the tested device to execute the self function, but also comprises logic for controlling the self data processing, further, in the development stage of the control device, after the instructions for instructing the tested device to execute the self function are developed, the firmware running in the tested device can be tested by utilizing the test mode, and since the firmware running in the tested device is not required to be tested after all logic instructions running in the control device are developed, the purpose of early test is facilitated, namely: the purpose of testing the internet of things product in real time can be achieved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a firmware testing method according to a first embodiment of the present application;
FIG. 2 is a flowchart of another firmware testing method according to a first embodiment of the present application;
Fig. 3 is a schematic structural diagram of a firmware testing apparatus according to a second embodiment of the present application;
fig. 4 is a schematic structural diagram of another firmware testing apparatus according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
It should be noted in advance that, the internet of things product in the present application is a device that can be controlled by a user terminal or a server, for example, a sweeping robot, a sharing bicycle, a sharing electric bicycle, etc., the specific type of the internet of things product is not specifically limited herein, the device to be tested in the present application may be a component in the internet of things product for controlling the internet of things product, and the control device in the present application includes a device for sending an instruction to the device to be tested in a real environment, for example: the user terminal or the server takes the Internet of things product as an example of the air conditioner, after the user purchases the air conditioner, the user can control the air conditioner through the mobile phone, the mobile phone can be called control equipment at the moment, if the user sends a control instruction to the server through the mobile phone, the server sends the control instruction to the air conditioner, and the server can be called control equipment at the moment.
It should be noted that, the firmware related in the present application refers to a program written in the eeprom or the eeprom, and after the firmware is executed by the internet of things product, a plurality of functions can be implemented, where each function has a corresponding functional firmware, and the functional firmware is a part of the firmware.
In addition, it should be noted in advance that the embodiment of the present application relates to the servers that may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the server may be local or remote to the terminal. For example, the server may access information and/or data stored in a service requester terminal, a service provider terminal, or a database, or any combination thereof, via a network. As another example, the server may be directly connected to at least one of the service requester terminal, the service provider terminal, and the database to access the stored information and/or data. In some embodiments, the server may be implemented on a cloud platform; for example only, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud (community cloud), distributed cloud, inter-cloud (inter-cloud), multi-cloud (multi-cloud), and the like, or any combination thereof.
In addition, the client related to the embodiment of the application specifically may include: a mobile device, a tablet computer, a laptop computer, or a built-in device in a motor vehicle, etc., or any combination thereof. In some embodiments, the mobile device may include a smart home device, a wearable device, a smart mobile device, a virtual reality device, or an augmented reality device, or the like, or any combination thereof. In some embodiments, the smart home devices may include smart lighting devices, control devices for smart appliances, smart monitoring devices, smart televisions, smart cameras or walkie-talkies, etc., or any combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart helmet, a smart watch, a smart accessory, etc., or any combination thereof. In some embodiments, the smart mobile device may include a smart phone, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a gaming device, a navigation device, etc., or any combination thereof. In some embodiments, the virtual reality device and/or the augmented reality device may include a virtual reality helmet, an augmented reality helmet, or the like, or any combination thereof. For example, the virtual reality device and/or the augmented reality device may include various virtual reality products, and the like.
The internet of things product can be controlled by a user terminal or a server, taking the internet of things product as an example, a user can send an instruction to the sweeping robot through a mobile phone, so that the sweeping robot can execute corresponding functions, such as: advancing, backing, comprehensively cleaning rooms and the like, taking an air conditioner as an example of an internet of things product, a user can send an instruction to a server for controlling the air conditioner through a mobile phone, and then the server sends the instruction to the air conditioner so that the air conditioner can execute corresponding functions, such as: the temperature is regulated up, the temperature is reduced, the humidifying function is started, the timing startup is realized, and the like.
Before the Internet of things product is put on the market, in order to ensure the instruction of the Internet of things product, the Internet of things product needs to be tested to determine that the function on the Internet of things product can be accurately realized, and at present, when the Internet of things product is tested, after the application program running on the server or the user terminal is developed, the instruction of executing the function is sent to the Internet of things product through the server or the user terminal so as to complete the test of the function on the Internet of things product. Since the application (firmware) running on the server or the user terminal includes not only an application for controlling functions on the internet of things product, but also an application for controlling processing logic of own data, for example: the processing priority of each piece of data in the server or the user terminal and the like are needed to occupy a long time when the development of the application program on the server or the user terminal is completed, and the test time of the Internet of things product is shortened because the Internet of things product is generally longer than the development of the application program on the server or the user terminal, so that after the development of the Internet of things product is completed, the function on the Internet of things product can be tested after the development of the application program on the server or the user terminal is completed, so that the Internet of things product can not be tested in time after the development of the Internet of things product is completed, and when the marketing time of the Internet of things product is determined, the development of the application program on the server or the user terminal occupies a long time, so that the test time of the Internet of things product is shortened, the test time of the Internet of things product is relatively shorter, and the stress of a test link is relatively larger.
Aiming at the problems, considering that when the Internet of things product is tested, the functions on the Internet of things product are mainly tested, and the products on the Internet of things are controlled by application programs running on a server or a user terminal when the functions are realized, and the application programs (firmware) running on the server or the user terminal not only comprise the application programs for controlling the functions on the Internet of things product, but also comprise the application programs for controlling processing logic of own data, therefore, the functions on the Internet of things product can be tested only after the application programs for controlling the functions on the Internet of things product are obtained, and based on the ideas, the application provides a firmware testing method, a device, electronic equipment and a storage medium. The development period of the Internet of things product before testing is reduced, so that the testing time of the Internet of things product can be increased, and the pressure of a testing link is reduced. The following is a detailed description of the present application.
Example 1
Fig. 1 is a flow chart of a firmware testing method according to a first embodiment of the present application, as shown in fig. 1, the method includes the following steps:
step 101, determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions.
And 102, packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction.
And 103, sending the target message Wen Zhiling to a device to be tested by using a communication connection corresponding to the wireless communication protocol, wherein the target message instruction is used for testing functional firmware which runs in the device to be tested and corresponds to the target message instruction. The plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
In the application, when testing the functional firmware in the tested device, the target test instruction to be executed currently can be determined according to the preset test sequence of a plurality of test instructions, each test can be conducted on one test instruction through the steps, so that the test instruction can be orderly conducted, the functional firmware in the tested device can be sequentially tested, after the target test instruction is determined, the target test instruction is packaged by using the preset wireless communication protocol corresponding to the target test instruction, so as to obtain a target message instruction, and then the target message Wen Zhiling is sent to the tested device by using the communication connection corresponding to the wireless communication protocol. The control device is a device for controlling the tested device in the real environment, all logic running in the control device not only comprises instructions for instructing the tested device to execute the self function, but also comprises logic for controlling the self data processing, further, in the development stage of the control device, after the instructions for instructing the tested device to execute the self function are developed, the firmware running in the tested device can be tested by utilizing the test mode, namely: the application can test the tested device without developing the control equipment, and the firmware running in the tested device is not required to be tested after all logic instructions running in the control equipment are developed, thus being beneficial to realizing the purpose of early test, namely: the purpose of testing the internet of things product in real time can be achieved.
Meanwhile, in the application, as the firmware testing device only comprises an application program for controlling functions on the internet of things product, namely: the application program which is used for controlling the functions on the Internet of things product and is operated in the control equipment is isolated from the application program which is used for controlling the processing logic of the data of the application program, and when the test result does not meet the expected requirement, the problem is required to be locked on the tested equipment, so that the problem investigation range is reduced, and the test efficiency is improved.
It should be noted that, the control device related to the embodiment of the present application includes, but is not limited to, a user device (such as a mobile phone) and a server, and the test instruction related to the embodiment of the present application only includes an instruction that is executed in the control device and is used for instructing the tested device to execute its own function, namely: the test instruction does not include an instruction which is used for controlling the test instruction in the control equipment, the tested device in the embodiment of the application is a component which is used for controlling the functions of the internet of things product in the internet of things product, the internet of things product can include equipment such as a shared bicycle, a shared trolley, a sweeping robot and an air conditioner, and the specific control equipment, the specific test instruction and the specific internet of things product can be set according to actual needs, so that the method is not limited specifically.
It should be noted that, the plurality of test instructions include instructions that are executed on the server and/or the user terminal and are used for instructing the tested device to execute the self-functions, and the plurality of test instructions may be ordered according to a preset test sequence, for example: when the first test instruction, the second test instruction and the third test instruction are the instructions running on the server, and the third test instruction is the instructions running on the user terminal, the test sequence of the three test instructions may be the sequences of the first test instruction, the second test instruction and the third test instruction, or may be the sequences of the second test instruction, the third test instruction and the first test instruction, etc., the specific test sequence may be set according to actual needs, and the specific type of the test instruction may be set according to actual needs, and the specific limitation is not made. When the target test instruction is determined, one of the plurality of test instructions can be selected as the target test instruction according to a preset test sequence, so that the tested device is not influenced by other functions when executing the function corresponding to the target test instruction, the operation result is better and more accurate, the operation result aiming at the function can be obtained, and further, when the firmware running in the tested device is tested, the plurality of test instructions are tested one by one, and therefore the test result aiming at each test instruction can be obtained.
It should be noted that, when the preset wireless communication protocol corresponding to the target test instruction is the wireless communication protocol used when the target test instruction is used in the real environment, the control device and the device under test perform data interaction, and the specific wireless communication protocol may be set according to the wireless communication protocol used when the target test instruction is actually used, for example: when the target test instruction is executed in the control device, if the control device and the device under test communicate according to a TCP (transmission control protocol ) protocol, the wireless communication protocol corresponding to the target test instruction is a TCP protocol, and if the control device and the device under test communicate according to a bluetooth communication protocol, the wireless communication protocol corresponding to the target test instruction is a BLE (bluetooth low energy ) protocol, and no specific limitation is made herein as to what wireless communication protocol the target test instruction corresponds to.
It should be noted that after determining the target test instruction, if the target test instruction is a test instruction executed by the server, the script of the target test instruction may be sent to the server through websocket connection, so that the server runs the script, then the server may encapsulate the target test instruction into a TCP packet, and send the TCP packet to the tested device according to the TCP protocol, so as to achieve the purpose of testing the firmware running in the tested device, and the specific test mode may be set according to actual needs, which is not limited herein.
In a possible implementation manner, after the tested device finishes running the functional firmware corresponding to the target message instruction, feedback information carrying the running result is sent to the firmware testing device, when the feedback information is sent, the feedback information can be sent through the established communication connection between the tested device and the firmware testing device, after the firmware testing device receives the test feedback information sent by the tested device through the communication connection, the step 101 is continuously executed, by the means, a plurality of test instructions in the firmware testing device can be executed one by one, and further, after the firmware testing device receives the feedback information corresponding to the last test instruction, the next test instruction is sent to the tested device, so that each function in the tested device is tested one by one, and the test result is relatively accurate.
In a possible implementation manner, fig. 2 is a schematic flow chart of another firmware testing method according to the first embodiment of the present application, as shown in fig. 2, after step 103 is performed, the method may further include the following steps:
step 201, after receiving the test feedback information sent by the tested device through the communication connection, analyzing the test feedback information to obtain test data.
And 202, comparing a preset result corresponding to the target test instruction with the test data to obtain a comparison result of the preset result and the test data.
And 203, outputting the comparison result.
Specifically, after receiving test feedback information sent by the tested device through the communication connection, in order to realize automatic judgment of a test result, a preset result corresponding to the target test instruction may be preset in the firmware test device, and then the preset result and test data in the feedback information are used for comparison, so as to obtain a comparison result of the preset result and the test data, namely: whether the preset result and the test data are the same, and when the preset result and the test data are different, the different data include what, and then a comparison result of the preset result and the test data is input, for example: the comparison result can be displayed or sent to the handheld terminal of the tester, and can be stored for later viewing.
It should be noted that, the specific preset result may be set according to the expected data of the target test instruction, and the specific preset result is not specifically limited herein, and the specific comparison result may also be set according to actual needs, for example: it may include only whether the preset result and the test data are the same, and when the preset result and the test data are different, which different data include, etc., and specific comparison results are not specifically limited herein.
For example, the target test instruction is an instruction for positioning the tested device, the preset result stored in the firmware test device in advance is longitude and latitude information of the tested device, after the tested device receives the target test instruction, the tested device executes the function of positioning itself, then the obtained positioning data is carried in feedback information and is sent to the firmware test device, the firmware test device analyzes the feedback information, so as to obtain the positioning data, and then the longitude and latitude information in the preset result is used for comparing with the positioning data to determine whether the longitude and latitude information is the same as the positioning data, and the comparison result is displayed.
The positioning techniques used in the present application may be based on Global positioning system (Global PositioningSystem, GPS), global navigation satellite system (Global Navigation SATELLITE SYSTEM, GLONASS), COMPASS navigation system (COMPASS), galileo positioning system, quasi Zenith satellite system (Quasi-Zenith SATELLITE SYSTEM, QZSS), wireless fidelity (WIRELESS FIDELITY, WIFI) positioning techniques, or the like, or any combination thereof. One or more of the above-described positioning systems may be used interchangeably in the present application.
In one possible embodiment, for each test instruction, the test instruction includes a preset message body parameter.
Specifically, the message body parameter in the test instruction is an important indicator for controlling the function in the device under test, for example: when the tested device is a control component in the air conditioner, and the target test instruction is the moment for controlling the opening of the air conditioner, the message body parameter in the target test instruction is a time parameter, and the message body parameter in the target test instruction can be set according to the test requirement so as to test the designated message body parameter, and the message body parameter in the test instruction can be set in error so as to test the operation of the tested device after the target test instruction containing the error message body parameter is received.
For example, when the device under test is a control unit in an air conditioner, and when the target test command is a time for controlling the air conditioner to be turned on, the message body parameter in the target test command is 25:00: and 00, after the air conditioner receives the target test instruction containing the message body parameters, an operation result of the air conditioner under the target test instruction can be obtained, and the operation data of the air conditioner after receiving the error time information can be analyzed according to the operation result.
In one possible embodiment, the wireless communication protocol comprises: the long-range wireless communication protocol and the short-range wireless communication protocol.
The specific protocol and communication type of the long-range wireless communication protocol and the short-range wireless communication protocol may be set according to actual needs, and are not particularly limited herein.
In a possible embodiment, the control device comprises a server and a client;
When the target test instruction belongs to a test instruction included by the server, the wireless communication protocol is the remote wireless communication protocol;
And when the target test instruction belongs to the test instruction included by the client, the wireless communication protocol is the short-distance wireless communication protocol.
Specifically, when the internet of things equipment is purchased, a user can send an instruction to the tested device through the control equipment, so that the internet of things equipment achieves a corresponding function, when the user sends a control instruction to the tested device, the control instruction can be sent through a client (namely, the user equipment) or a server, when the control equipment is the client, the client and the tested device can be in communication connection through short-distance wireless communication, at the moment, data communication between the client and the tested device is required to be carried out according to a short-distance wireless communication protocol, when the control equipment is the server, the server and the tested device can be in communication connection through long-distance wireless communication, at the moment, data communication between the server and the tested device is required to be carried out according to the short-distance wireless communication protocol, so that in order to enable testing to meet a real environment, when a target test instruction belongs to a test instruction included by the server, the firmware test device and the tested device are required to meet the requirement of the long-distance wireless communication protocol when the target test instruction belongs to a test instruction included by the client, and when the firmware test device and the tested device are required to be in communication.
The specific long-range wireless communication protocol and the short-range wireless communication protocol may be set according to the wireless communication protocol used when the control apparatus and the device under test actually communicate, and are not particularly limited herein.
Example two
Fig. 3 is a schematic structural diagram of a firmware testing apparatus according to a second embodiment of the present application, as shown in fig. 3, the firmware testing apparatus includes:
a determining unit 31, configured to determine a target test instruction to be executed currently according to a preset test sequence of the plurality of test instructions;
A packaging unit 32, configured to package the target test instruction using a preset wireless communication protocol corresponding to the target test instruction, to obtain a target packet instruction;
a sending unit 33, configured to send the target packet Wen Zhiling to a device under test using a communication connection corresponding to the wireless communication protocol, where the target packet instruction is used to test functional firmware running in the device under test and corresponding to the target packet instruction;
the plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
In a possible embodiment, the determining unit 31 is further configured to:
And after receiving the test feedback information sent by the tested device through the communication connection, continuing to execute the step of determining the target test instruction to be executed currently according to the preset test sequence of the plurality of test instructions.
In a possible implementation manner, fig. 4 is a schematic structural diagram of another firmware testing apparatus provided in the second embodiment of the present application, as shown in fig. 4, where the firmware testing apparatus further includes:
the parsing unit 34 is configured to parse the test feedback information after receiving the test feedback information sent by the device under test through the communication connection, so as to obtain test data;
a comparing unit 35, configured to compare a preset result corresponding to the target test instruction with the test data, so as to obtain a comparison result of the preset result and the test data;
An output unit 36 for outputting the comparison result.
In one possible embodiment, for each test instruction, the test instruction includes a preset message body parameter.
In one possible embodiment, the wireless communication protocol comprises:
The long-range wireless communication protocol and the short-range wireless communication protocol.
In a possible embodiment, the control device comprises a server and a client;
When the target test instruction belongs to a test instruction included by the server, the wireless communication protocol is the remote wireless communication protocol;
And when the target test instruction belongs to the test instruction included by the client, the wireless communication protocol is the short-distance wireless communication protocol.
The detailed description of the second embodiment refers to the related description of the first embodiment, and will not be repeated here.
In the application, when testing the functional firmware in the tested device, the target test instruction to be executed currently can be determined according to the preset test sequence of a plurality of test instructions, each test can be conducted on one test instruction through the steps, so that the test instruction can be orderly conducted, the functional firmware in the tested device can be sequentially tested, after the target test instruction is determined, the target test instruction is packaged by using the preset wireless communication protocol corresponding to the target test instruction, so as to obtain a target message instruction, and then the target message Wen Zhiling is sent to the tested device by using the communication connection corresponding to the wireless communication protocol. The control device is a device for controlling the tested device in the real environment, all logic running in the control device not only comprises instructions for instructing the tested device to execute the self function, but also comprises logic for controlling the self data processing, further, in the development stage of the control device, after the instructions for instructing the tested device to execute the self function are developed, the firmware running in the tested device can be tested by utilizing the test mode, namely: the application can test the tested device without developing the control equipment, and the firmware running in the tested device is not required to be tested after all logic instructions running in the control equipment are developed, thus being beneficial to realizing the purpose of early test, namely: the purpose of testing the internet of things product in real time can be achieved.
Meanwhile, in the application, as the firmware testing device only comprises an application program for controlling functions on the internet of things product, namely: the application program which is used for controlling the functions on the Internet of things product and is operated in the control equipment is isolated from the application program which is used for controlling the processing logic of the data of the application program, and when the test result does not meet the expected requirement, the problem is required to be locked on the tested equipment, so that the problem investigation range is reduced, and the test efficiency is improved.
Example III
Fig. 5 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, including: a processor 501, a storage medium 502 and a bus 503, where the storage medium 502 stores machine readable instructions executable by the processor 501, when the electronic device runs the firmware test method described above, the processor 501 communicates with the storage medium 502 through the bus 503, and the processor 501 executes the machine readable instructions to perform the following steps:
Determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions;
packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The target message Wen Zhiling is sent to a tested device by using a communication connection corresponding to the wireless communication protocol, and the target message instruction is used for testing functional firmware which runs in the tested device and corresponds to the target message instruction;
the plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
In the embodiment of the present application, the storage medium 502 may also execute other machine readable instructions to perform the method as described in the other embodiments, and the specific implementation of the steps and principles of the method are referred to in the description of the embodiment, and are not described in detail herein.
Example IV
A fourth embodiment of the present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
Determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions;
packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The target message Wen Zhiling is sent to a tested device by using a communication connection corresponding to the wireless communication protocol, and the target message instruction is used for testing functional firmware which runs in the tested device and corresponds to the target message instruction;
the plurality of test instructions are instructions for instructing the device under test to execute the function of the device under test from logic instructions of the control device.
In the embodiment of the present application, the computer program may also execute other machine readable instructions when executed by the processor to perform the method as described in the other embodiments, and the specific implementation of the steps and principles of the method are referred to in the description of the embodiment, and are not described in detail herein.
The processors referred to in the present application may comprise one or more processing cores (e.g., single core processor (S) or multi-core processor (S)). By way of example only, the Processor may include a central processing unit (Central Processing Unit, CPU), application Specific Integrated Circuit (ASIC), special instruction set Processor (Application Specific Instruction-set Processor, ASIP), graphics processing unit (Graphics Processing Unit, GPU), physical processing unit (Physics Processing Unit, PPU), digital signal Processor (DIGITAL SIGNAL Processor, DSP), field programmable gate array (Field Programmable GATE ARRAY, FPGA), programmable logic device (Programmable Logic Device, PLD), controller, microcontroller unit, reduced instruction set computer (Reduced Instruction Set Computing, RISC), microprocessor, or the like, or any combination thereof.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the method embodiments, and are not repeated in the present disclosure. In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. A method for testing firmware, comprising:
Determining a target test instruction to be executed currently according to a preset test sequence of a plurality of test instructions;
packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The target message Wen Zhiling is sent to a tested device by using a communication connection corresponding to the wireless communication protocol, and the target message instruction is used for testing functional firmware which runs in the tested device and corresponds to the target message instruction;
the plurality of test instructions are instructions used for indicating the tested device to execute the self function from logic instructions of the control equipment;
the firmware test method further comprises the following steps:
after receiving the test feedback information sent by the tested device through the communication connection, analyzing the test feedback information to obtain test data.
2. The firmware testing method of claim 1, wherein the firmware testing method further comprises:
And after receiving the test feedback information sent by the tested device through the communication connection, continuing to execute the step of determining the target test instruction to be executed currently according to the preset test sequence of the plurality of test instructions.
3. The firmware testing method of claim 1, wherein the firmware testing method further comprises:
comparing a preset result corresponding to the target test instruction with the test data to obtain a comparison result of the preset result and the test data;
And outputting the comparison result.
4. The firmware testing method of claim 1, wherein for each test instruction, the test instruction includes a predetermined message body parameter.
5. The firmware testing method of claim 1, wherein the wireless communication protocol comprises:
The long-range wireless communication protocol and the short-range wireless communication protocol.
6. The firmware testing method as claimed in claim 5, wherein the control device includes a server and a client;
When the target test instruction belongs to a test instruction included by the server, the wireless communication protocol is the remote wireless communication protocol;
And when the target test instruction belongs to the test instruction included by the client, the wireless communication protocol is the short-distance wireless communication protocol.
7. A firmware testing apparatus, comprising:
the determining unit is used for determining a target test instruction to be executed currently according to a preset test sequence of the plurality of test instructions;
the packaging unit is used for packaging the target test instruction by using a preset wireless communication protocol corresponding to the target test instruction to obtain a target message instruction;
The sending unit is configured to send the target packet Wen Zhiling to a device under test by using a communication connection corresponding to the wireless communication protocol, where the target packet instruction is used to test functional firmware running in the device under test and corresponding to the target packet instruction;
the plurality of test instructions are instructions used for indicating the tested device to execute the self function from logic instructions of the control equipment;
the firmware testing apparatus further includes:
and the analysis unit is used for analyzing the test feedback information after receiving the test feedback information sent by the tested device through the communication connection to obtain test data.
8. The firmware testing apparatus of claim 7, wherein the determining unit is further configured to:
And after receiving the test feedback information sent by the tested device through the communication connection, continuing to execute the step of determining the target test instruction to be executed currently according to the preset test sequence of the plurality of test instructions.
9. An electronic device, comprising: a processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor in communication with the storage medium via the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of firmware testing of any of claims 1 to 6.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of firmware testing according to any of claims 1 to 6.
CN201911410354.2A 2019-12-31 2019-12-31 Firmware testing method and device, electronic equipment and storage medium Active CN111858295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911410354.2A CN111858295B (en) 2019-12-31 2019-12-31 Firmware testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911410354.2A CN111858295B (en) 2019-12-31 2019-12-31 Firmware testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111858295A CN111858295A (en) 2020-10-30
CN111858295B true CN111858295B (en) 2024-05-14

Family

ID=72970893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911410354.2A Active CN111858295B (en) 2019-12-31 2019-12-31 Firmware testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111858295B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822073B (en) * 2020-12-30 2023-03-17 广东乐心医疗电子股份有限公司 Test method, device, system, electronic equipment and readable storage medium
CN113163418B (en) * 2021-02-19 2023-06-27 广东电网有限责任公司广州供电局 Standardized test management system and test method for metering automation equipment
CN113590393B (en) * 2021-07-08 2024-03-12 深圳Tcl新技术有限公司 Intelligent device testing method and device, electronic device and storage medium
CN116669064B (en) * 2022-12-08 2024-04-05 荣耀终端有限公司 Wireless protocol testing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017181591A1 (en) * 2016-04-20 2017-10-26 乐视控股(北京)有限公司 Testing method and system
WO2019205280A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server testing method, apparatus, and device, and computer readable storage medium
WO2019218458A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Application program test method and device, mobile terminal and medium
CN110532171A (en) * 2019-07-22 2019-12-03 深圳壹账通智能科技有限公司 Application testing method, device, equipment and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201312340A (en) * 2011-09-09 2013-03-16 Askey Technology Jiangsu Ltd Handheld electronic device testing system and method
US10430263B2 (en) * 2016-02-01 2019-10-01 Electro Industries/Gauge Tech Devices, systems and methods for validating and upgrading firmware in intelligent electronic devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017181591A1 (en) * 2016-04-20 2017-10-26 乐视控股(北京)有限公司 Testing method and system
WO2019205280A1 (en) * 2018-04-24 2019-10-31 平安科技(深圳)有限公司 Server testing method, apparatus, and device, and computer readable storage medium
WO2019218458A1 (en) * 2018-05-16 2019-11-21 平安科技(深圳)有限公司 Application program test method and device, mobile terminal and medium
CN110532171A (en) * 2019-07-22 2019-12-03 深圳壹账通智能科技有限公司 Application testing method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
EPA协议中事件服务的实现和测试;郑军;;电子测试(07);全文 *

Also Published As

Publication number Publication date
CN111858295A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111858295B (en) Firmware testing method and device, electronic equipment and storage medium
WO2017071519A1 (en) Multi-platform general test method, apparatus and system
CN113064185B (en) Positioning method, terminal and server
US11740997B2 (en) Method and apparatus for debugging a device
CN111385762A (en) Vehicle abnormity reporting method and device, shared vehicle and storage medium
US10237369B2 (en) Opportunistic backhauling of data for fine time measurement (FTM) responder systems
CN115167182A (en) Automatic driving simulation test method, device, equipment and computer readable medium
CN111008128A (en) Automatic test system, method and storage medium
CN112985867B (en) Steering engine testing method, device, equipment and storage medium
CN110971478B (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN113760736A (en) Test method, device and system
CN102411312A (en) Sensor simulator and satellite closed loop simulation system
CN110781084A (en) Method and device for determining stuck identification parameter, storage medium and electronic device
CN110688318A (en) Program testing method and device
US10073762B2 (en) Debug device, debug method, and debug program
CN112769627B (en) Network environment simulation method, system and computer program product
US20220278860A1 (en) System, method and apparatus for developing smart contract
CN110633182B (en) System, method and device for monitoring server stability
CN114579131A (en) Method, device and system for acquiring hardware performance data
CN113721961A (en) Equipment upgrading method and device, storage medium and electronic equipment
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN110851254A (en) Equipment production method, device, server and storage medium based on microservice
CN112747733A (en) Navigation method, navigation device, storage medium and electronic device
CN216014047U (en) Driving auxiliary system test equipment and vehicle
CN117610316B (en) GNSS positioning performance simulation test model generation method, device, equipment and medium

Legal Events

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