CN115858256A - Test method and device for Internet of things equipment and electronic equipment - Google Patents

Test method and device for Internet of things equipment and electronic equipment Download PDF

Info

Publication number
CN115858256A
CN115858256A CN202111122019.XA CN202111122019A CN115858256A CN 115858256 A CN115858256 A CN 115858256A CN 202111122019 A CN202111122019 A CN 202111122019A CN 115858256 A CN115858256 A CN 115858256A
Authority
CN
China
Prior art keywords
command
serial port
single serial
determining
return information
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
CN202111122019.XA
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.)
Sichuan Ailian Technology Co ltd
Original Assignee
Sichuan Ailian 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 Sichuan Ailian Technology Co ltd filed Critical Sichuan Ailian Technology Co ltd
Priority to CN202111122019.XA priority Critical patent/CN115858256A/en
Publication of CN115858256A publication Critical patent/CN115858256A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a method and a device for testing Internet of things equipment and electronic equipment, and relates to the technical field of computers, wherein the method for testing the Internet of things equipment comprises the following steps: acquiring at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port; determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file; receiving return information generated by the serial port in response to the complete command; when the return information comprises the analysis success mark data, determining an output variable based on the return information; and updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command. The test process of the Internet of things equipment can be completed according to the initial configuration parameters, the test efficiency is improved, and the stability and the reliability in the test process are improved.

Description

Test method and device for Internet of things equipment and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for testing Internet of things equipment and electronic equipment.
Background
After the internet of things (IOT) module is developed, the radio frequency performance, partial functions, and the like of the module need to be tested in the production stage, and the test process is usually completed through production software. Aiming at the condition that an upper computer controls the Internet of things module through a serial port, in actual production, the chip model and the chip firmware version of the Internet of things module are different, so that serial port instructions and serial port return information to be sent are different.
At present, different production test software is created for chips of different models, so that the versions of the production test software are more, and the management and maintenance costs are higher.
Disclosure of Invention
The invention aims to provide a method and a device for testing Internet of things equipment and electronic equipment, which are used for solving the problems that the version of production test software is more, and the management and maintenance costs are higher due to the fact that different types of chips are created by the method for testing the Internet of things module.
In a first aspect, the present invention provides a method for testing an internet of things device, including:
acquiring at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port;
determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file;
receiving return information generated by the serial port in response to the complete command;
when the return information comprises the analysis success mark data, determining an output variable based on the return information;
and updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
Compared with the prior art, the test method of the internet of things equipment, provided by the embodiment of the application, can be used for obtaining at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port, determining the complete command comprising the command configuration parameters and the input variable based on the single serial port commands and the initialization file, receiving the return information generated by the serial port in response to the complete command, determining the output variable based on the return information under the condition that the return information comprises the analysis success flag data, updating the initialization file based on the output variable to obtain the target file, determining that the execution of the single serial port commands is successful, completing the single serial port commands, realizing the test process of the internet of things equipment, completing the test process of the internet of things equipment according to the initial configuration parameters, achieving the production test of the internet of things equipment adapting to different chip manufacturers, different chip models and different firmware versions, improving the test efficiency, reducing the management and maintenance cost, and improving the stability and reliability in the test process.
In one possible implementation manner, after the receiving serial port generates the return information in response to the complete command, the method further includes:
and when the returned information does not include the analysis success mark data and the analysis times of the returned information are greater than or equal to the preset retry times, determining that the execution of the single serial port command fails and finishing the single serial port command.
In one possible implementation manner, after the receiving serial port generates the return information in response to the complete command, the method further includes:
and when the return information does not comprise the analysis success mark data and the analysis times of the return information are less than the preset retry times, returning and executing the step of the return information generated by the receiving serial port in response to the complete command.
In a possible implementation manner, the determining a complete command including command configuration parameters and input variables based on the single serial port command and the initialization file includes:
determining command configuration parameters and input variables based on the initialization file corresponding to the single serial port command under the condition that the single serial port command starts to be executed;
and updating the input variable according to a configured command template based on the input variable to generate the complete command comprising the command configuration parameters and the input variable.
In a possible implementation manner, before the obtaining of the single serial port command matched with the internet of things device, the method further includes:
initializing the serial port;
and acquiring initial configuration parameters of the serial port, wherein the initial configuration parameters comprise serial port command definition parameters, test node definition parameters and test transaction sequences.
In a possible implementation manner, after the initializing file is updated based on the output variable to obtain a target file, and it is determined that the single serial port command is successfully executed and the single serial port command is completed, the method further includes:
under the condition that all single serial port commands of the test node are not finished, returning to the step of determining a complete command comprising command configuration parameters and input variables based on the single serial port commands and the initialization file;
under the condition that all single serial port commands of the test nodes are finished and all the test nodes are not finished, returning to the step of determining a complete command comprising command configuration parameters and input variables based on the single serial port commands and the initialization file;
and determining that the test result is a pass result under the conditions that all single serial port commands of the test nodes are completed and all the test nodes are completed.
In a possible implementation manner, in a case that the returned information does not include the analysis success flag data and the analysis number of times of the returned information is greater than or equal to a preset retry number, it is determined that the single serial port command fails to be executed, and after the single serial port command is completed, the method further includes:
and determining that the test result is a failure result under the condition that the execution of the single serial port command fails.
In a second aspect, the present invention further provides a testing apparatus for an internet of things device, where the apparatus includes:
the first acquisition module is used for acquiring at least two single serial port commands of one test node based on the initial configuration parameter sequence of the serial port;
the first determining module is used for determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file;
the receiving module is used for receiving return information generated by the serial port in response to the complete command;
the second determining module is used for determining an output variable based on the return information under the condition that the return information comprises the analysis success mark data;
and the third determining module is used for updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
In one possible implementation, the apparatus further includes:
and a fourth determining module, configured to determine that the single serial port command fails to be executed when the returned information does not include the analysis success flag data and the analysis frequency of the returned information is greater than or equal to a preset retry frequency, and complete the single serial port command.
In one possible implementation, the apparatus further includes:
and the first returning module is used for returning and executing the step of returning the return information generated by the receiving serial port in response to the complete command under the condition that the return information does not comprise the analysis success mark data and the analysis times of the return information are less than the preset retry times.
In one possible implementation manner, the first determining module includes:
the first determining submodule is used for determining command configuration parameters and input variables based on the initialization file corresponding to the single serial port command under the condition that the single serial port command starts to be executed;
and the generating submodule is used for updating the input variable according to a configured command template based on the input variable to generate the complete command comprising the command configuration parameters and the input variable.
In one possible implementation, the apparatus further includes:
the initialization module is used for initializing the serial port;
and the second acquisition module is used for acquiring the initial configuration parameters of the serial port, wherein the initial configuration parameters comprise serial port command definition parameters, test node definition parameters and test transaction sequences.
In one possible implementation, the apparatus further includes:
a second returning module, configured to return the step of determining a complete command including command configuration parameters and input variables based on the single serial command and the initialization file when all the single serial commands of the test node are not completed;
a third returning module, configured to return the step of determining a complete command including command configuration parameters and input variables based on the single serial command and the initialization file when all the single serial commands of the test nodes are completed and all the test nodes are not completed;
and the fifth determining module is used for determining that the test result is a pass result under the condition that all the single serial port commands of the test nodes are completed and all the test nodes are completed.
In one possible implementation, the apparatus further includes:
and the sixth determining module is used for determining that the test result is a failure result under the condition that the execution of the single serial port command fails.
In a third aspect, the present invention also provides an electronic device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, enable performance of the method for testing internet of things devices of any of the first aspects.
Compared with the prior art, the testing device of the internet of things equipment and the electronic equipment provided by the invention have the same beneficial effects as the testing method of the internet of things equipment in the technical scheme, and are not repeated herein.
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 specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not limit the invention. In the drawings:
fig. 1 shows a schematic flow chart of a testing method for internet of things equipment provided in the embodiment of the present application;
fig. 2 is a schematic flow chart illustrating another testing method for internet of things equipment according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a testing apparatus for an internet of things device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a technology level determination device in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a chip according to an embodiment of the present invention.
Detailed Description
In order to facilitate clear description of technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish identical items or similar items with substantially the same functions and actions. For example, the first threshold and the second threshold are only used for distinguishing different thresholds, and the sequence order of the thresholds is not limited. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
It is intended that the words "exemplary" or "such as" and "like" be used herein to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the present invention, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a and b combination, a and c combination, b and c combination, or a, b and c combination, wherein a, b and c can be single or multiple.
Fig. 1 shows a schematic flow chart of a testing method for internet of things equipment provided in an embodiment of the present application, and as shown in fig. 1, the testing method for the internet of things equipment includes:
step 101: and acquiring at least two single serial port commands of one test node based on the initial configuration parameter sequence of the serial port.
In the application, a testing device or electronic equipment of the internet of things equipment can obtain a plurality of serial port commands of one testing node based on the initial configuration parameter sequence of the serial port.
In the application, different serial port commands can be defined by reading serial port commands and feedback information supported by the internet of things equipment (internet of things module) in the configuration file and relevant information such as variables needing to be captured. The test nodes for completing a specific test function can be defined by the command combination and execution sequence required by different test functions. The sequence of test transactions to complete the production test may be defined by a combination of different test nodes.
Step 102: and determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file.
Optionally, in this application, when the single serial port command starts to be executed, command configuration parameters and input variables may be determined based on the initialization file corresponding to the single serial port command;
further, based on the input variable, the input variable is updated according to a configured command template, and the complete command including the command configuration parameter and the input variable is generated.
In the application, after the relevant configuration parameters and the input variables of the serial port command are read, if one or more input variables exist, the response variables can be replaced according to the configured command template, and the effective command which can be sent to the Internet of things equipment is generated.
Step 103: and receiving the return information generated by the serial port in response to the complete command.
After determining a complete command including command configuration parameters and input variables based on the single serial port command and the initialization file, the complete command needs to be sent to the internet of things device, and further, feedback information of the internet of things device, namely the return information, needs to be waited.
Step 104: and determining an output variable based on the return information under the condition that the return information comprises the analysis success flag data.
Optionally, the return information includes a parsing success flag data, which indicates that waiting timeout does not occur, and the output variable may be determined based on the return information.
The mark data may be a binary value or an ASCII character string, which is not specifically limited in the embodiment of the present application and may be marked and adjusted according to an actual application scenario.
Step 105: and updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
In the application, the output variable can be written into the response position of the initialization file for use by other nodes in the following.
In the application, under the condition that parameters corresponding to an input variable and an output variable need to be transmitted between different test nodes, bottoming can be performed through an Initialization File (INI) File, so that the test nodes are modularized, different test sequences can be formed by adjusting the test nodes in a loose coupling mode, and different production test applications are completed.
To sum up, the test method of the internet of things device provided by the embodiment of the application can firstly obtain at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port, determine the complete command including the command configuration parameters and the input variables based on the single serial port commands and the initialization file, receive the return information generated by the serial port in response to the complete command, determine the output variables based on the return information when the return information includes the analysis success flag data, update the initialization file based on the output variables to obtain the target file, determine that the execution of the single serial port commands is successful, complete the single serial port commands, realize the test process of the internet of things device, complete the test process of the internet of things device according to the initial configuration parameters, achieve the production test of the internet of things device adapting to different chip manufacturers, different chip models and different firmware versions, improve the test efficiency, reduce the management and maintenance costs, and improve the stability and reliability in the test process.
Fig. 2 shows a schematic flow chart of another testing method for internet of things equipment provided in the embodiment of the present application, and as shown in fig. 2, the testing method for internet of things equipment includes:
step 201: initializing the serial port; and acquiring initial configuration parameters of the serial port, wherein the initial configuration parameters comprise serial port command definition parameters, test node definition parameters and test transaction sequences.
In the application, the serial port can be initialized, and different serial port commands, namely the serial port command definition parameters, can be defined by reading the serial port commands and feedback information supported by the internet of things equipment (internet of things module) in the configuration file and the related information such as variables needing to be captured. The test nodes that complete a specific test function, that is, the test node definition parameters, can be defined by the command combinations and execution sequences required by different test functions. The sequence of test transactions to complete the production test may be defined by a combination of different test nodes.
Wherein the test transaction sequence includes all test nodes; the test node comprises all serial port commands; the serial port command comprises a command template, a feedback keyword to be checked, a preset retry number, a timeout duration and the like.
Step 202: and acquiring at least two single serial port commands of one test node based on the initial configuration parameter sequence of the serial port.
In the application, a testing device or electronic equipment of the internet of things equipment can obtain a plurality of serial port commands of one testing node based on the initial configuration parameter sequence of the serial port.
Step 203: and determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file.
Optionally, in the present application, when the single serial port command starts to be executed, command configuration parameters and input variables may be determined based on the initialization file corresponding to the single serial port command;
further, based on the input variable, the input variable is updated according to a configured command template, and the complete command including the command configuration parameter and the input variable is generated.
In the application, after the relevant configuration parameters and the input variables of the serial port command are read, if one or more input variables exist, the response variables can be replaced according to the configured command template, and the effective command which can be sent to the Internet of things equipment is generated.
Step 204: and receiving the return information generated by the serial port in response to the complete command.
After determining a complete command including command configuration parameters and input variables based on the single serial port command and the initialization file, the complete command needs to be sent to the internet of things device, and further, feedback information of the internet of things device, namely the return information, needs to be waited.
Step 205: and determining an output variable based on the return information under the condition that the return information comprises the analysis success flag data.
Optionally, the return information includes a flag data indicating that the wait timeout does not occur, and the output variable may be determined based on the return information.
The mark data may be a binary value or an ASCII character string, which is not specifically limited in the embodiment of the present application and may be marked and adjusted according to an actual application scenario.
Step 206: and updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
In the application, the output variable can be written into the response position of the initialization file for use by other nodes in the following.
In the application, under the condition that parameters corresponding to an input variable and an output variable need to be transmitted between different test nodes, bottoming can be performed through an Initialization File (INI) File, so that the test nodes are modularized, different test sequences can be formed by adjusting the test nodes in a loose coupling mode, and different production test applications are completed.
Step 207: and when the returned information does not include the analysis success mark data and the analysis times of the returned information are greater than or equal to the preset retry times, determining that the execution of the single serial port command fails and finishing the single serial port command.
And determining that the test result is a failure result under the condition that the execution of the single serial port command fails.
The preset retry number may be 3, 4, or other values, which is not specifically limited in this embodiment of the application and may be adjusted by marking according to an actual application scenario.
Step 208: and when the return information does not comprise the analysis success mark data and the analysis times of the return information are less than the preset retry times, returning and executing the step of the return information generated by the receiving serial port in response to the complete command.
When the returned information does not include the analysis success flag data and the analysis times of the returned information are smaller than the preset retry times, judging and analyzing are required to be carried out again until the flag data indicating the success or failure of the command is analyzed or the waiting overtime data is analyzed.
Step 209: and under the condition that all the single serial port commands of the test node are not finished, returning to the step of determining the complete command comprising the command configuration parameters and the input variables based on the single serial port commands and the initialization file.
And under the condition that all the single serial port commands of the test node are not finished, if the single serial port commands of the test node which are not tested need to be tested, returning the complete commands which are determined to comprise command configuration parameters and input variables based on the single serial port commands and the initialization file, and testing the single serial port commands which are not tested.
Step 210: and returning to the step of determining the complete command comprising the command configuration parameters and the input variables based on the single serial port command and the initialization file under the condition that all the single serial port commands of the test nodes are finished and all the test nodes are not finished.
And under the conditions that all single serial port commands of the test nodes are finished and all the test nodes are not finished, if the untested test nodes need to be tested, returning the complete command which is determined to comprise command configuration parameters and input variables based on the single serial port command and the initialization file, and starting to test other untested test nodes.
Step 211: and determining that the test result is a pass result under the conditions that all single serial port commands of the test nodes are completed and all the test nodes are completed.
All test nodes are tested, i.e. the test transaction sequence is completed.
In the application, mass production can be carried out by modifying the initial configuration parameters for the internet of things modules of different chip manufacturers, different chip models and different firmware versions.
To sum up, the test method of the internet of things device provided by the embodiment of the application can firstly obtain at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port, determine the complete command including the command configuration parameters and the input variables based on the single serial port commands and the initialization file, receive the return information generated by the serial port in response to the complete command, determine the output variables based on the return information when the return information includes the analysis success flag data, update the initialization file based on the output variables to obtain the target file, determine that the execution of the single serial port commands is successful, complete the single serial port commands, realize the test process of the internet of things device, complete the test process of the internet of things device according to the initial configuration parameters, achieve the production test of the internet of things device adapting to different chip manufacturers, different chip models and different firmware versions, improve the test efficiency, reduce the management and maintenance costs, and improve the stability and reliability in the test process.
Fig. 3 shows a block diagram of a testing apparatus for internet of things equipment according to an embodiment of the present invention. As shown in fig. 3, the testing apparatus for the internet of things device includes:
a first obtaining module 301, configured to obtain at least two single serial port commands of one test node based on an initial configuration parameter sequence of a serial port;
a first determining module 302, configured to determine, based on the single serial port command and the initialization file, a complete command including command configuration parameters and input variables;
a receiving module 303, configured to receive return information generated by the serial port in response to the complete command;
a second determining module 304, configured to determine an output variable based on the return information when the return information includes the analysis success flag data;
a third determining module 305, configured to update the initialization file based on the output variable to obtain a target file, determine that the single serial port command is successfully executed, and complete the single serial port command.
To sum up, the testing device of the internet of things equipment provided by the embodiment of the application can obtain at least two single serial port commands of a testing node based on the initial configuration parameter sequence of the serial port at first, determine the complete command including the command configuration parameter and the input variable based on the single serial port command and the initialization file, receive the serial port response to the return information generated by the complete command, work as under the condition that the return information includes the analysis success flag data, determine the output variable based on the return information, update the initialization file based on the output variable, obtain the target file, determine that the execution of the single serial port command is successful, complete the single serial port command, realize the testing process of the internet of things equipment, can complete the testing process of the internet of things equipment according to the initial configuration parameter, can achieve the production test of the internet of things equipment adapting to different chip manufacturers, different chip models and different firmware versions, can improve the testing efficiency, reduce the management and maintenance cost, and improve the stability and reliability in the testing process.
In one possible implementation, the apparatus further includes:
and a fourth determining module, configured to determine that the single serial port command fails to be executed when the returned information does not include the analysis success flag data and the analysis frequency of the returned information is greater than or equal to a preset retry frequency, and complete the single serial port command.
In one possible implementation, the apparatus further includes:
and the first returning module is used for returning and executing the step of returning the return information generated by the receiving serial port in response to the complete command under the condition that the return information does not comprise the analysis success mark data and the analysis times of the return information are less than the preset retry times.
In one possible implementation manner, the first determining module includes:
the first determining submodule is used for determining command configuration parameters and input variables based on the initialization file corresponding to the single serial port command under the condition that the single serial port command starts to be executed;
and the generating submodule is used for updating the input variable according to a configured command template based on the input variable to generate the complete command comprising the command configuration parameters and the input variable.
In one possible implementation, the apparatus further includes:
the initialization module is used for initializing the serial port;
and the second acquisition module is used for acquiring the initial configuration parameters of the serial port, wherein the initial configuration parameters comprise serial port command definition parameters, test node definition parameters and test transaction sequences.
In one possible implementation, the apparatus further includes:
a second returning module, configured to, in a case that all single serial commands of the test node are not completed, return to the step of determining, based on the single serial command and the initialization file, a complete command including command configuration parameters and input variables;
a third returning module, configured to return the step of determining a complete command including command configuration parameters and input variables based on the single serial command and the initialization file when all the single serial commands of the test nodes are completed and all the test nodes are not completed;
and the fifth determining module is used for determining that the test result is a pass result under the condition that all the single serial port commands of the test nodes are completed and all the test nodes are completed.
In one possible implementation, the apparatus further includes:
and the sixth determining module is used for determining that the test result is a failure result under the condition that the execution of the single serial port command fails.
To sum up, the testing device of the internet of things equipment provided by the embodiment of the application can obtain at least two single serial port commands of a testing node based on the initial configuration parameter sequence of the serial port at first, determine the complete command including the command configuration parameter and the input variable based on the single serial port command and the initialization file, receive the serial port response to the return information generated by the complete command, work as under the condition that the return information includes the analysis success flag data, determine the output variable based on the return information, update the initialization file based on the output variable, obtain the target file, determine that the execution of the single serial port command is successful, complete the single serial port command, realize the testing process of the internet of things equipment, can complete the testing process of the internet of things equipment according to the initial configuration parameter, can achieve the production test of the internet of things equipment adapting to different chip manufacturers, different chip models and different firmware versions, can improve the testing efficiency, reduce the management and maintenance cost, and improve the stability and reliability in the testing process.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In some possible implementations, the testing apparatus of the internet of things device may further include a storage module, configured to store program codes and data of the base station.
The Processing module may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module may be a transceiver, a transceiving circuit or a communication interface, etc. The storage module may be a memory.
When the processing module is a processor, the communication module is a communication interface, and the storage module is a memory, the testing apparatus for internet of things equipment according to the embodiment of the present invention may be the electronic equipment shown in fig. 4.
Optionally, an embodiment of the present application further provides an electronic device, including: one or more processors; and one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause performance of the method of testing internet of things devices of any of the first aspects.
Fig. 4 shows a hardware structure diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, the electronic device 40 includes a processor 401 and a communication interface 402.
As shown in fig. 4, the processor may be a general processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more ics for controlling the execution of programs according to the present invention. The number of the communication interfaces may be one or more. The communication interface may use any transceiver or the like for communicating with other devices or communication networks.
As shown in fig. 4, the terminal device may further include a communication line 403. The communication link may include a path for transmitting information between the aforementioned components.
Optionally, as shown in fig. 4, the terminal device may further include a memory 404. The memory is used for storing computer-executable instructions for implementing the inventive arrangements and is controlled by the processor for execution. The processor is used for executing the computer execution instructions stored in the memory, thereby realizing the method provided by the embodiment of the invention.
As shown in fig. 4, the memory may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be separate and coupled to the processor via a communication link. The memory may also be integral to the processor.
Optionally, the computer-executable instructions in the embodiment of the present invention may also be referred to as application program codes, which is not specifically limited in this embodiment of the present invention.
In one implementation, as shown in fig. 4, processor 401 may include one or more CPUs, such as CPU0 and CPU1 in fig. 4, as an example.
In one embodiment, as shown in fig. 4, the terminal device may include a plurality of processors, such as the processor 401-1 and the processor 401-2 in fig. 4. Each of these processors may be a single-core processor or a multi-core processor.
Fig. 5 is a schematic structural diagram of a chip according to an embodiment of the present invention. As shown in fig. 5, the chip 50 includes one or more (including two) processors 401 and a communication interface 402.
Optionally, as shown in FIG. 5, the chip also includes memory 404, which may include read-only memory and random access memory, and provides operating instructions and data to the processor. The portion of memory may also include non-volatile random access memory (NVRAM).
In some embodiments, as shown in FIG. 5, the memory stores elements, execution modules or data structures, or a subset thereof, or an expanded set thereof.
In the embodiment of the present invention, as shown in fig. 5, by calling an operation instruction stored in the memory (the operation instruction may be stored in the operating system), a corresponding operation is performed.
As shown in fig. 5, a processor, which may also be referred to as a Central Processing Unit (CPU), controls the processing operations of any one of the terminal devices.
As shown in fig. 5, the memories may include both read-only and random-access memories and provide instructions and data to the processor. The portion of memory may also include NVRAM. For example, in applications where the memory, communication interface, and memory are coupled together by a bus system that may include a power bus, a control bus, a status signal bus, etc., in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 5.
As shown in fig. 5, the method disclosed in the above embodiments of the present invention may be applied to a processor, or may be implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The processor may be a general purpose processor, a Digital Signal Processor (DSP), an ASIC, an FPGA (field-programmable gate array) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
In a possible implementation manner, as shown in fig. 5, the communication interface is configured to execute step 101 of the testing method for the internet of things device in the embodiment shown in fig. 1. The processor is configured to execute step 102 and step 103 of the testing method for the internet of things device in the embodiment shown in fig. 1.
In one aspect, a computer-readable storage medium is provided, in which instructions are stored, and when executed, implement the functions performed by the technology level determination device in the above embodiments.
In one aspect, a chip is provided, where the chip is applied in a terminal device, and the chip includes at least one processor and a communication interface, where the communication interface is coupled with the at least one processor, and the processor is configured to execute instructions to implement the functions performed by the technology level determining device in the foregoing embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the procedures or functions described in the embodiments of the present invention are performed in whole or in part. The computer may be a general purpose computer, special purpose computer, computer network, terminal, user equipment, or other programmable device. The computer program or instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire or wirelessly. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The usable medium may be a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape; or optical media such as Digital Video Disks (DVDs); it may also be a semiconductor medium, such as a Solid State Drive (SSD).
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
While the invention has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the invention. Accordingly, the specification and figures are merely exemplary of the invention as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A testing method for Internet of things equipment is characterized by comprising the following steps:
acquiring at least two single serial port commands of a test node based on the initial configuration parameter sequence of the serial port;
determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file;
receiving return information generated by the serial port in response to the complete command;
determining an output variable based on the return information under the condition that the return information comprises the successfully analyzed mark data;
and updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
2. The method of claim 1, wherein after receiving the return information generated by the serial port in response to the full command, the method further comprises:
and when the returned information does not include the analysis success mark data and the analysis times of the returned information are greater than or equal to the preset retry times, determining that the execution of the single serial port command fails and finishing the single serial port command.
3. The method of claim 1, wherein after receiving the return information generated by the serial port in response to the full command, the method further comprises:
and when the return information does not comprise the analysis success mark data and the analysis times of the return information are less than the preset retry times, returning and executing the step of the return information generated by the receiving serial port in response to the complete command.
4. The method of claim 1, wherein determining a complete command including command configuration parameters and input variables based on the single serial port command and initialization file comprises:
determining command configuration parameters and input variables based on the initialization file corresponding to the single serial port command under the condition that the single serial port command starts to be executed;
and updating the input variables according to a configured command template based on the input variables to generate the complete command comprising the command configuration parameters and the input variables.
5. The method of claim 1, wherein prior to the obtaining the single serial command matching the internet of things device, the method further comprises:
initializing the serial port;
and acquiring initial configuration parameters of the serial port, wherein the initial configuration parameters comprise serial port command definition parameters, test node definition parameters and test transaction sequences.
6. The method of claim 1, wherein after the initializing file is updated based on the output variable to obtain a target file, the single serial command is determined to be successfully executed, and the single serial command is completed, the method further comprises:
under the condition that all single serial port commands of the test node are not finished, returning to the step of determining a complete command comprising command configuration parameters and input variables based on the single serial port commands and the initialization file;
under the condition that all single serial port commands of the test nodes are finished and all the test nodes are not finished, returning to the step of determining a complete command comprising command configuration parameters and input variables based on the single serial port commands and the initialization file;
and determining that the test result is a pass result under the conditions that all single serial port commands of the test nodes are completed and all the test nodes are completed.
7. The method according to claim 2, wherein when the return information does not include the parsing success flag data and the number of times of parsing the return information is greater than or equal to a preset number of retries, it is determined that the single serial port command fails to be executed, and after the single serial port command is completed, the method further includes:
and determining that the test result is a failure result under the condition that the execution of the single serial port command fails.
8. A testing device for Internet of things equipment is characterized in that the device comprises:
the first acquisition module is used for acquiring at least two single serial port commands of one test node based on the initial configuration parameter sequence of the serial port;
the first determining module is used for determining a complete command comprising command configuration parameters and input variables based on the single serial port command and the initialization file;
the receiving module is used for receiving return information generated by the serial port in response to the complete command;
the second determining module is used for determining an output variable based on the return information under the condition that the return information comprises the analysis success mark data;
and the third determining module is used for updating the initialization file based on the output variable to obtain a target file, determining that the single serial port command is successfully executed, and finishing the single serial port command.
9. The apparatus of claim 8, further comprising:
and a fourth determining module, configured to determine that the single serial port command fails to be executed when the returned information does not include the analysis success flag data and the analysis frequency of the returned information is greater than or equal to a preset retry frequency, and complete the single serial port command.
10. An electronic device, comprising: one or more processors; and one or more machine readable media having instructions stored thereon that when executed by the one or more processors cause performance of the method of testing an internet of things device of any of claims 1 to 7.
CN202111122019.XA 2021-09-24 2021-09-24 Test method and device for Internet of things equipment and electronic equipment Pending CN115858256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111122019.XA CN115858256A (en) 2021-09-24 2021-09-24 Test method and device for Internet of things equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111122019.XA CN115858256A (en) 2021-09-24 2021-09-24 Test method and device for Internet of things equipment and electronic equipment

Publications (1)

Publication Number Publication Date
CN115858256A true CN115858256A (en) 2023-03-28

Family

ID=85653107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111122019.XA Pending CN115858256A (en) 2021-09-24 2021-09-24 Test method and device for Internet of things equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN115858256A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932305A (en) * 2023-09-15 2023-10-24 新华三信息技术有限公司 Test file generation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932305A (en) * 2023-09-15 2023-10-24 新华三信息技术有限公司 Test file generation method and device, electronic equipment and storage medium
CN116932305B (en) * 2023-09-15 2023-12-12 新华三信息技术有限公司 Test file generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111428462B (en) Communication protocol template construction method and terminal equipment
CN110618903A (en) Electronic equipment testing method and device
CN114048701B (en) Netlist ECO method, device, equipment and readable storage medium
US11023343B2 (en) Method for injecting deliberate errors into PCIE device for test purposes, apparatus applying method, and computer readable storage medium for code of method
CN115357434A (en) Complete machine testing method, device to be tested, computer device and storage medium
CN115858256A (en) Test method and device for Internet of things equipment and electronic equipment
CN114332353A (en) Three-dimensional model matching method and device, electronic equipment and storage medium
CN111259619A (en) Control method and device for configuration object, storage medium and verification platform
CN115712559A (en) Method and device for testing hardware management software and electronic equipment
CN116049270A (en) Method, device and storage medium for accessing database
CN111596199B (en) Test chip, integrated circuit test method and system and detection equipment
CN113672260A (en) CPU initialization method for processor
CN108334313A (en) Continuous integrating method, apparatus and code management system for large-scale SOC research and development
CN111459406B (en) Method and system for identifying NVME hard disk under storage unloading card
CN116415599A (en) IC card reading method, writing device, electronic device and storage medium
CN110968566A (en) Migration tool-based domestic application system migration method
CN111078596A (en) Flash chip control method, device and system and readable storage medium
CN114489851B (en) Memory chip starting method and device, computer equipment and storage medium
CN114579198B (en) Memory chip starting method and device, computer equipment and storage medium
CN111209056B (en) Method and device for loading function, readable storage medium and electronic equipment
CN108829592B (en) Method and device for verifying quick access register and table entry and verification equipment
CN118069502A (en) Test system, method and device and storage medium
CN116521585A (en) Groove silk screen display method, device, equipment and storage medium
CN114356610A (en) Control method, device and equipment for interface calling and storage medium
CN114444423A (en) Data processing method and system based on verification platform and electronic 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