Test system, method, device, storage medium and computer program product

By simulating the data transmission and reception of multiple clients on the IoT platform, the testing problem of multi-protocol interfaces is solved, more sufficient and effective testing is achieved, and the development process is simplified.

CN118827451AActive Publication Date: 2024-10-22CHINA MOBILE M2M +1

Patent Information

Application Number
CN202410387225.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-01
Publication Date
2024-10-22
Estimated Expiration
2044-04-01

AI Technical Summary

Technical Problem

In the automated testing of IoT platforms, it is difficult for the tested platform with multiple protocol interfaces to ensure stable and real services, resulting in difficulty in troubleshooting and high delivery costs, and it is difficult to trigger tests for abnormal scenarios.

Method used

By simulating the data sending and receiving of multiple clients on the same computer, using the agent management module, protocol component and transmission management module, communication links and channels with the Internet of Things platform are established to implement abnormal testing of each interface.

Benefits of technology

It improves the adequacy and effectiveness of testing, simplifies testing of multi-protocol interfaces, reduces development complexity, and enables rapid detection of product problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827451A_ABST
    Figure CN118827451A_ABST
Patent Text Reader

Abstract

The invention discloses a test system, method and device, a storage medium and a computer program product, and the method comprises the steps: generating at least one simulation object which carries out information interaction with an Internet of Things platform according to configuration parameters, and defining a communication protocol of at least one interface in the Internet of Things platform; a communication link with each interface is established through the transmission management module, a communication channel with each simulation object is established, the transmission management module is used for maintaining connection of the communication links in a unified mode, and bidirectional forwarding of data messages is achieved according to the mapping relation between the communication links and the communication channels. By controlling the information interaction process of the simulation object and the Internet of Things platform, the data receiving and transmitting of multiple clients can be simulated in the same computer, the exception test of each interface of the Internet of Things platform is met, and the sufficiency and effectiveness of the test are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of physical networks, and in particular to a testing system, method, device, storage medium and computer program product. Background Art

[0002] With the development of IoT technology, the number of IoT devices has increased exponentially. A large number of terminal devices are connected to the device gateway through various protocol components, and then connected to the IoT platform. The IoT platform also supports docking with various business services. In the actual IoT product development process, for IoT platforms that support multiple interfaces, when performing automated testing, usually after the business service development is completed, the IoT platform is connected to the real business service, and the automated testing framework simulates the terminal to send and receive messages for testing. However, when the platform under test (IoT platform) has multiple interfaces with different protocols, the solution for the platform under test to dock with the real service needs to ensure that stable real services are prepared in advance. Usually, the platform and business services are developed by different teams, and some third-party business services are even developed by external companies. It is difficult to ensure that stable business services can be provided according to the R&D plan. It is difficult to troubleshoot problems and the delivery-related costs are high. In addition, since the docking is with real business services, it is difficult to trigger the test of some abnormal scenarios. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a test system, method, device, storage medium and computer program product, which can simulate the data transmission and reception of multiple clients on the same computer by controlling the information interaction process between the simulation object and the Internet of Things platform, meet the abnormal testing of various interfaces of the Internet of Things platform, and improve the adequacy and effectiveness of the test.

[0004] To achieve the above object, an embodiment of the present invention provides a testing system, including:

[0005] An agent management module, used to generate at least one simulation object for information interaction with the Internet of Things platform according to configuration parameters;

[0006] A protocol component, used to define a communication protocol of at least one interface in the IoT platform;

[0007] The transmission management module is used to establish a communication link with each interface and a communication channel with each simulation object, and forward messages through the communication link and the communication channel.

[0008] As an improvement of the above solution, the transmission management module includes:

[0009] The message distribution center is used to search for the corresponding communication channel in a preset mapping table when receiving the downlink data sent by the Internet of Things platform; and is also used to search for the corresponding communication link in the mapping table when receiving the uplink data sent by the simulation object;

[0010] The communication channel is used to send the downlink data to the corresponding simulation object, and to send the uplink data sent by the simulation object to the message distribution center.

[0011] As an improvement of the above solution, the message distribution center is used to:

[0012] When receiving the downlink data sent by the Internet of Things platform, obtaining the destination address in the downlink data, searching the target communication channel corresponding to the destination address in the mapping table, and sending the downlink data to the corresponding simulation object through the target communication channel;

[0013] When receiving the uplink data sent by the simulation object, the target interface corresponding to the simulation object is obtained, and the target communication link corresponding to the target interface is searched in the mapping table to send the uplink data to the Internet of Things platform through the target communication link.

[0014] As an improvement of the above solution, the communication channel is Channel.

[0015] As an improvement of the above solution, each communication channel is associated with a linear communication model; wherein the linear communication model is provided with a plurality of Handlers, and when the communication channel performs data transmission, the Handler performs data processing.

[0016] As an improvement of the above solution, the test system further includes:

[0017] A protocol encoder, used for serializing the message object sent by the transmission management module to encode the message object into a byte sequence;

[0018] A protocol decoder is used to deserialize the byte sequence received by the transmission management module to convert the byte sequence into a message object.

[0019] As an improvement of the above solution, the configuration parameters include device parameters, IP parameters, port parameters and protocol type.

[0020] To achieve the above object, an embodiment of the present invention further provides a testing method, comprising:

[0021] Generate at least one simulation object for information interaction with the Internet of Things platform according to the configuration parameters;

[0022] Defining a communication protocol of at least one interface in the IoT platform;

[0023] A communication link is established with each interface, and a communication channel is established with each simulation object, and messages are forwarded through the communication link and the communication channel.

[0024] To achieve the above objectives, an embodiment of the present invention further provides a testing device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the testing method described in the above embodiment when executing the computer program.

[0025] To achieve the above objectives, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the test method described in the above embodiment.

[0026] To achieve the above objectives, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the test method described in the above embodiment when executed by a processor.

[0027] Compared with the prior art, the test system, method, device, storage medium and computer program product disclosed in the present invention generate at least one simulation object for information interaction with an Internet of Things platform according to configuration parameters, and define the communication protocol of at least one interface in the Internet of Things platform; establish a communication link with each interface and a communication channel with each simulation object through a transmission management module, use the transmission management module to uniformly maintain the connection of the communication link, and realize two-way forwarding of data messages according to the mapping relationship between the communication link and the communication channel. By controlling the information interaction process between the simulation object and the Internet of Things platform, the data transmission and reception of multiple clients can be simulated on the same computer, thereby meeting the abnormal test of each interface of the Internet of Things platform and improving the adequacy and effectiveness of the test. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a structural block diagram of a test system provided by an embodiment of the present invention;

[0029] Figure 2 is a connection diagram of a test system and an Internet of Things platform provided by an embodiment of the present invention;

[0030] Figure 3 is another connection diagram of the test system and the Internet of Things platform provided by an embodiment of the present invention;

[0031] Figure 4 It is a schematic diagram of the framework of the linear communication model provided by an embodiment of the present invention;

[0032] Figure 5 is a structural block diagram of another test system provided by an embodiment of the present invention;

[0033] Figure 6 is a flow chart of a testing method provided by an embodiment of the present invention;

[0034] Figure 7 It is a structural block diagram of a test device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] See also Figure 1 , Figure 1 1 is a structural block diagram of a test system 100 provided in an embodiment of the present invention, wherein the test system 100 includes:

[0037] The agent management module 11 is used to generate at least one simulation object for information interaction with the Internet of Things platform according to the configuration parameters;

[0038] A protocol component 12, used to define a communication protocol of at least one interface in the Internet of Things platform;

[0039] The transmission management module 13 is used to establish a communication link with each interface and a communication channel with each simulation object, and forward messages through the communication link and the communication channel.

[0040] Exemplarily, the test system 100 is used to test the IoT platform. It can independently test the IoT platform with multiple interfaces. The proxy management module 11 generates at least one simulation object for information interaction with the IoT platform according to the configuration parameters, and the protocol component 12 defines the communication protocol of at least one interface in the IoT platform. Finally, the transmission management module 13 establishes a communication link with each interface and a communication channel with each simulation object. The transmission management module 13 is used to uniformly maintain the connection of the communication link, and the bidirectional forwarding of data messages is realized according to the mapping relationship between the communication link and the communication channel. Figure 2As shown, the test system 100 generates a number of simulation objects such as simulation terminals and business services through the agent management module 11. By controlling the information interaction process between the simulation objects and the Internet of Things platform, it can simulate the data transmission and reception of multiple clients on the same computer, meet the abnormal testing of various interfaces of the Internet of Things platform, quickly detect product problems, and improve the adequacy and effectiveness of the test.

[0041] Specifically, the agent management module 11 is responsible for the generation, destruction, and business logic processing of the simulator. The simulation object is generated according to the configuration parameters. When the test script ends, the agent management module 11 destroys the simulation object to release resources. The simulation object can call other modules to perform business processing such as sending and receiving messages.

[0042] Exemplarily, the configuration parameters include device parameters, IP parameters, port parameters and protocol type; wherein the device parameters include device type and device ID, the IP parameters include local IP address and peer IP address, and the port parameters include local port number and peer port number. The data type of each configuration parameter can be referred to Table 1.

[0043] Table 1 Data types of configuration parameters

[0044] Configuration parameters Data Types Device Type String Device ID Integer Local IP address String Local port number Integer Peer IP address String Peer port number Integer Protocol Type String

[0045] Specifically, the protocol component 12 supports adding communication protocols on demand to meet the test of supporting multiple protocol interfaces at the same time. The protocol component 12 defines a unified protocol framework and a general interface. The newly added protocol only needs to implement the general interface Receive Handler (Handler, which is mainly used for processing asynchronous messages) and Send Handler (Send Handler) to be integrated into the test system 100. The specific business logic of each protocol is implemented in the general interface.

[0046] Specifically, the transmission management module 13 includes:

[0047] The message distribution center 131 is used to search for the corresponding communication channel in a preset mapping table when receiving the downlink data sent by the Internet of Things platform; and is also used to search for the corresponding communication link in the mapping table when receiving the uplink data sent by the simulation object;

[0048] The communication channel 132 is used to send the downlink data to the corresponding simulation object, and to send the uplink data sent by the simulation object to the message distribution center.

[0049] For example, see Figure 3 , Figure 3It is another connection diagram of the test system and the Internet of Things platform provided by an embodiment of the present invention. The message distribution center 131 is a Dispatcher module. All received messages are forwarded to corresponding other modules via this module. The message distribution center 131 is connected to interfaces a~c of the Internet of Things platform through three communication links. Different communication links can adopt different communication protocols, which are defined by the protocol component 12. The communication protocols include but are not limited to MQTT (Message Queuing Telemetry Transport), COAP (Constrained Application Protocol), and HTTP (HyperText Transfer Protocol). For example, the protocol adopted by the communication link between the interface a and the message distribution center 131 is MQTT. The message distribution center 131 is connected to the simulation terminal 1, simulation terminal 2 and business service in the simulation object through three communication channels a~c respectively. It is worth noting that Figure 3 The number of communication links, the adopted protocols and the number of communication channels shown are only examples. In actual applications, the number of communication links, the adopted protocols and the number of communication channels can be set as needed according to the number of interfaces of the Internet of Things platform.

[0050] Specifically, the communication channel is Channel. Channel is responsible for intercepting and processing I / O events or I / O operations. It can selectively intercept and process events of interest, or transparently transmit and terminate the transmission of events. Based on the Channel Handler interface, users can easily customize business logic, such as printing logs, uniformly encapsulating exception information, performance statistics, and message encoding and decoding.

[0051] It is worth noting that the present invention introduces the concept of Channel, and the reading and writing of data are all performed through Channel. In the prior art, the typical Channel implementation method is to distinguish multiple links by listening to different ports on the server side. When a message event is listened to, the Handler registered on the corresponding Channel is called to process the message; when it is a client, only one Channel is maintained. When there are simulation objects of multiple protocols, they cannot be processed in the same Channel. Therefore, this method does not support the scenario of simulating multiple devices as clients on the same computer. In order to solve this problem, the present invention no longer distinguishes between the client Channel and the server Channel, and adds a message distribution center 131 to be responsible for establishing a link connection with the Internet of Things platform and routing and distributing messages. The IO Thread (thread) no longer listens to the Accept event (the Accept event means accepting a parameter and performing certain operations, and there is no return value), but the message distribution center 131 uniformly listens to the message event, finds the corresponding communication link and communication channel according to the maintained mapping table of the communication link and the communication channel (Channel), and forwards the data.

[0052] Specifically, the message distribution center 131 is used to:

[0053] When receiving the downlink data sent by the Internet of Things platform, obtaining the destination address in the downlink data, searching the target communication channel corresponding to the destination address in the mapping table, and sending the downlink data to the corresponding simulation object through the target communication channel;

[0054] When receiving the uplink data sent by the simulation object, the target interface corresponding to the simulation object is obtained, and the target communication link corresponding to the target interface is searched in the mapping table to send the uplink data to the Internet of Things platform through the target communication link.

[0055] Exemplarily, the mapping table records the mapping relationship between different simulation objects and their corresponding communication channels, and records the mapping relationship between different interfaces and their corresponding communication links, such as Figure 3 As shown: "Simulation terminal 1-communication channel a", "Simulation terminal 2-communication channel b", "Business service-communication channel c"; "Interface a-communication link 1 (MQTT protocol)", "Interface b-communication link 2 (COAP protocol)", "Interface c-communication link 3 (HTTP protocol)".

[0056] Exemplarily, the connection between the IoT platform and the message distribution center 131 is processed by the submodule ClientProcessor (Client, IoT terminal device, processor, and the processor processes the Client transmission data). When receiving the downlink data (such as Socket) sent by the IoT platform, the message distribution center 131 obtains the destination address in the downlink data, and finds the target communication channel corresponding to the destination address through the mapping table. For example, when the destination address indicates that the data is sent to the simulation terminal 1, the message distribution center 131 finds the communication channel a corresponding to the simulation terminal 1 according to the mapping table, and sends the uplink data to the simulation terminal 1 through the communication channel a. When the message distribution center 131 receives the uplink data sent by the simulation object (such as the simulation terminal 2), it queries the target interface corresponding to the simulation object, finds the target communication link corresponding to the target interface through the mapping table, and if the target interface corresponding to the simulation terminal 2 is interface b, the message distribution center 131 finds the communication link 2 corresponding to the interface b according to the mapping table, and sends the uplink data to the IoT platform through the communication link 2.

[0057] Specifically, each communication channel is associated with a linear communication model; wherein the linear communication model is provided with a plurality of Handlers, and when the communication channel performs data transmission, the Handler performs data processing.

[0058] For example, see Figure 4 , Figure 4 : is a schematic diagram of the framework of the linear communication model provided by an embodiment of the present invention. The linear communication model is a Pipeline. Each Channel is associated with a Pipeline. The Pipeline places the defined processor Handler in the Pipeline in a bidirectional linked list. When there is data in the Channel, it is processed by the Handler. Figure 4 There are 4 Handlers in the Pipeline. The Handler is responsible for processing and intercepting I / O operations and forwarding them to the next Handler in the Pipeline for processing. The Channel Pipeline acts like a pipeline, through which inbound and outbound data and events are processed. The effective arrangement and interaction of the Channel Handlers through the Channel Pipeline constitutes the core of the application data and event processing logic.

[0059] See also Figure 5 , Figure 5is a structural block diagram of another test system 100 provided in an embodiment of the present invention, wherein the test system 100 further includes:

[0060] A protocol encoder 14, used for serializing the message object sent by the transmission management module 13 to encode the message object into a byte sequence;

[0061] The protocol decoder 15 is used to deserialize the byte sequence received by the transmission management module 13 to convert the byte sequence into a message object.

[0062] Exemplarily, serialization is the process of decomposing data (string) into byte streams so that it can be stored in a file or transmitted on the network; deserialization is the process of opening the byte stream and reconstructing the object. The protocol encoder implements the Encode Handler interface, serializes the sent message object, and encodes the message into a byte sequence. The protocol decoder implements the Decode Handler interface, which is responsible for converting the received message from the serialized form into the defined message object. For the caller, it needs to add a serialization Encode Handler to the Pipeline to serialize the request sent, and at the same time, it needs to add a deserialization Decode Handler to deserialize the call result. When sending a message in the test script, the transmission management module 13 calls the Send Handler interface, sends the message to the EncodeHandler of the protocol codec, serializes the message, and forwards it to the network through the message distribution center 131. After the transmission management module 13 receives the message, the message distribution center 131 distributes the message to the corresponding Channel, uses the Decode Handler to deserialize the message, and then calls the Receive Handler to process the message.

[0063] See also Figure 5 , Figure 5 is a structural block diagram of another test system 100 provided in an embodiment of the present invention, wherein the test system 100 further includes:

[0064] Configuration management module 16, used to manage configurations in a unified manner and save configuration items (such as configuration parameters) in files in the form of key-value pairs;

[0065] The message template 17 is used to define various messages in the protocol. The field name and value type are defined through a file in yaml or json format, and different messages are distinguished by type flags. The encapsulator in the message template 17 is used to read the format definition file and encapsulate the parameterized variable values ​​into a protocol message according to the defined format. The format definition file also defines the correspondence between the sending and replying messages, so as to support scenarios with different sending and receiving message type flags.

[0066] The use case execution engine 18 is used to initialize and generate corresponding instances based on the test resources and configuration information specified by the user to provide to the test case, such as configuring Figure 3 The three simulation objects shown are simulation terminal 1, simulation terminal 2 and business service, and any one of them can be selected to perform exception testing, such as controlling simulation terminal 1 to send and receive messages, thereby constructing scenarios such as message exceptions, response exceptions, and sending exceptions; the use case execution engine 18 manages the life cycle of the test case, is responsible for the initialization, execution and final cleanup of the test case, and can capture unhandled exceptions in the test case so that it does not affect the execution of other use cases.

[0067] The log report module 19 is used to centrally register and manage logs and uniformly output log files. Test cases also need to centrally register logs, record the relevant modules used by the test cases, and output the logs generated during the execution of the test cases. The test report uses a tree mapping method to record test case numbers, test steps, test results and other data.

[0068] Data management 20 is used to save test data in YAML format files and supports writing and reading functions of test data.

[0069] Compared with the prior art, the test system 100 disclosed in the present invention generates at least one simulation object for information interaction with the Internet of Things platform according to configuration parameters, and defines the communication protocol of at least one interface in the Internet of Things platform; establishes a communication link with each interface through a transmission management module, and establishes a communication channel with each simulation object, uses the transmission management module to uniformly maintain the connection of the communication link, and realizes the two-way forwarding of data messages according to the mapping relationship between the communication link and the communication channel. By controlling the information interaction process between the simulation object and the Internet of Things platform, it is possible to simulate the data transmission and reception of multiple clients on the same computer, meet the abnormal test of each interface of the Internet of Things platform, and improve the adequacy and effectiveness of the test. In addition, the read and write data of multiple links are maintained by the message distribution center, and the message processor Handeler is registered in a two-way linked list, which is convenient for processing messages when sending and receiving, and reduces the complexity of developing custom protocols.

[0070] See also Figure 6 , Figure 6 is a flow chart of a testing method provided by an embodiment of the present invention, the testing method comprising:

[0071] S1. Generate at least one simulation object for information interaction with the Internet of Things platform according to configuration parameters;

[0072] S2. Define a communication protocol of at least one interface in the Internet of Things platform;

[0073] S3. Establish a communication link with each interface and a communication channel with each simulation object, and forward messages through the communication link and the communication channel.

[0074] Specifically, the forwarding of the message through the communication link and the communication channel includes:

[0075] When receiving the downlink data sent by the Internet of Things platform, searching the corresponding communication channel in the preset mapping table to send the downlink data to the corresponding simulation object through the communication channel;

[0076] When receiving the uplink data sent by the simulation object, the corresponding communication link is searched in the mapping table to send the uplink data to the Internet of Things platform through the communication link.

[0077] Specifically, searching for a corresponding communication channel in a preset mapping table to send the downlink data to a corresponding simulation object through the communication channel includes:

[0078] The destination address in the downlink data is obtained, and a target communication channel corresponding to the destination address is searched in the mapping table, so as to send the downlink data to the corresponding simulation object through the target communication channel.

[0079] Specifically, searching the corresponding communication link in the mapping table to send the uplink data to the Internet of Things platform through the communication link includes:

[0080] A target interface corresponding to the simulation object is obtained, and a target communication link corresponding to the target interface is searched in the mapping table, so as to send the uplink data to the Internet of Things platform through the target communication link.

[0081] Specifically, the communication channel is a Channel; each communication channel is associated with a linear communication model; wherein the linear communication model is provided with a plurality of Handlers, and when the communication channel performs data transmission, the Handler performs data processing.

[0082] Specifically, when forwarding the message through the communication link and the communication channel, the method further includes:

[0083] Serializing the sent message object to encode the message object into a byte sequence;

[0084] Deserialize the received byte sequence to convert the byte sequence into a message object.

[0085] Specifically, the configuration parameters include device parameters, IP parameters, port parameters and protocol type.

[0086] It is worth noting that the working process of the testing method described in the embodiment of the present invention can refer to the working process of the testing system described in the above embodiment, which will not be repeated here.

[0087] See also Figure 7 , Figure 7 1 is a structural block diagram of a test device 200 provided in an embodiment of the present invention, wherein the test device 200 includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps in the above-mentioned test method embodiments are implemented, such as steps S1 to S3.

[0088] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the test device 200.

[0089] The test device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the test device 200 and does not limit the test device 200. The test device 200 may include more or fewer components than shown in the figure, or may combine certain components, or may include different components. For example, the test device 200 may also include input and output devices, network access devices, buses, etc.

[0090] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor 21 is the control center of the test device 200, and various parts of the entire test device 200 are connected using various interfaces and lines.

[0091] The memory 22 can be used to store the computer program and / or module. The processor 21 realizes various functions of the test device 200 by running or executing the computer program and / or module stored in the memory 22 and calling the data stored in the memory 22. The memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0092] Wherein, if the module / unit integrated in the test device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor 21. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0093] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A testing system, characterized in that: include: An agent management module, used to generate at least one simulation object for information interaction with the Internet of Things platform according to configuration parameters; A protocol component, used to define a communication protocol of at least one interface in the IoT platform; The transmission management module is used to establish a communication link with each interface and a communication channel with each simulation object, and forward messages through the communication link and the communication channel.

2. The test system according to claim 1, characterized in that: The transmission management module includes: The message distribution center is used to search for the corresponding communication channel in a preset mapping table when receiving the downlink data sent by the Internet of Things platform; and is also used to search for the corresponding communication link in the mapping table when receiving the uplink data sent by the simulation object; The communication channel is used to send the downlink data to the corresponding simulation object, and to send the uplink data sent by the simulation object to the message distribution center.

3. The test system according to claim 2, characterized in that: The message distribution center is used for: When receiving the downlink data sent by the Internet of Things platform, obtaining the destination address in the downlink data, searching the target communication channel corresponding to the destination address in the mapping table, and sending the downlink data to the corresponding simulation object through the target communication channel; When receiving the uplink data sent by the simulation object, the target interface corresponding to the simulation object is obtained, and the target communication link corresponding to the target interface is searched in the mapping table to send the uplink data to the Internet of Things platform through the target communication link.

4. The test system according to claim 1, characterized in that: The communication channel is Channel.

5. The test system according to claim 1, characterized in that: Each communication channel is associated with a linear communication model; wherein the linear communication model is provided with a plurality of Handlers, and when the communication channel performs data transmission, the Handler performs data processing.

6. The test system according to claim 1, characterized in that: The test system further comprises: A protocol encoder, used for serializing the message object sent by the transmission management module to encode the message object into a byte sequence; A protocol decoder is used to deserialize the byte sequence received by the transmission management module to convert the byte sequence into a message object.

7. The test system according to claim 1, characterized in that: The configuration parameters include device parameters, IP parameters, port parameters and protocol type.

8. A testing method, characterized in that: include: Generate at least one simulation object for information interaction with the Internet of Things platform according to the configuration parameters; Defining a communication protocol of at least one interface in the IoT platform; A communication link is established with each interface, and a communication channel is established with each simulation object, and messages are forwarded through the communication link and the communication channel.

9. A testing device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the testing method according to claim 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the testing method according to claim 8.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the testing method as claimed in claim 8 is implemented.

Citation Information

Patent Citations

  • Testing method and testing device for intelligent equipment platform

    CN105959174A

  • Processing method and device compatible with multiple TCPs based on Internet-of-Things system

    CN112714153A

  • Internet of Things testing method and system for simulating hardware equipment

    CN114928565A

  • Simulation platform and simulation method based on Internet of Things management system

    CN116192656A

  • Management protocol proxy communication system and method based on HTTP, and storage medium

    CN116506416A

Cited By

  • Networking spacecraft navigation system simulation test device and method based on track real-time injection

    CN120084359A

  • Simulation test method and device and storage medium

    CN120750794A