CN116991739A - Internet of things platform testing method and device, electronic equipment and readable storage medium - Google Patents

Internet of things platform testing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116991739A
CN116991739A CN202311057292.8A CN202311057292A CN116991739A CN 116991739 A CN116991739 A CN 116991739A CN 202311057292 A CN202311057292 A CN 202311057292A CN 116991739 A CN116991739 A CN 116991739A
Authority
CN
China
Prior art keywords
simulator
internet
information
platform
things platform
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
CN202311057292.8A
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.)
Shandong Youren Networking Co ltd
Original Assignee
Shandong Youren Networking 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 Shandong Youren Networking Co ltd filed Critical Shandong Youren Networking Co ltd
Priority to CN202311057292.8A priority Critical patent/CN116991739A/en
Publication of CN116991739A publication Critical patent/CN116991739A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a readable storage medium for testing an Internet of things platform, and relates to the technical field of Internet of things; analyzing the equipment information to generate simulator configuration information; configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator; and testing the function to be tested based on the target equipment simulator so as to realize platform function test of the Internet of things platform. The method solves the problem of high test cost of the internet of things platform in the prior art.

Description

Internet of things platform testing method and device, electronic equipment and readable storage medium
Technical Field
The application relates to the technical field of the internet of things, in particular to an internet of things platform testing method and device, electronic equipment and a readable storage medium.
Background
The internet of things is a system composed of mutually related computing object devices, the computing object devices can exchange and analyze data through the network through the interconnection, and with the development of the internet of things technology, more and more computing object devices start to be connected to the internet of things platform, so that the internet of things platform continuously supports more and more computing object devices, and therefore, in order to ensure the stability of the internet of things platform, the platform functions of the internet of things platform need to be tested regularly.
At present, when testing the platform function of the internet of things platform, corresponding testing equipment needs to be determined first, then the testing equipment is connected to the internet of things platform to test the corresponding platform function, but because each platform function corresponds to different testing equipment, in the actual testing process of the internet of things platform, a large number of testing equipment needs to be prepared by a tester, a large amount of equipment purchase funds are consumed, and certain human resources are consumed, so that the testing cost of the current internet of things platform is high.
Disclosure of Invention
The application mainly aims to provide a method and a device for testing an internet of things platform, electronic equipment and a readable storage medium, and aims to solve the technical problem of high testing cost of the internet of things platform in the prior art.
In order to achieve the above object, the present application provides a method for testing an internet of things platform, which includes:
responding to a configuration instruction of an equipment simulator, and acquiring a function to be tested of an Internet of things platform and equipment information of test equipment corresponding to the function to be tested;
analyzing the equipment information to generate simulator configuration information;
Configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator;
and testing the function to be tested based on the target equipment simulator so as to realize platform function test of the Internet of things platform.
Optionally, the step of parsing the device information to generate simulator configuration information includes:
acquiring an analytic service execution program corresponding to the Internet of things platform;
the analysis service process is obtained by starting the analysis service execution program;
and sending the equipment information to the analysis service process so as to analyze the equipment information through the analysis service process and obtain the simulator configuration information.
Optionally, before the step of analyzing the device information and generating simulator configuration information, the method for testing the platform of the internet of things further includes:
checking whether a target configuration file corresponding to the equipment information exists in a configuration file storage area of the equipment simulator;
if yes, acquiring target configuration information in the target configuration file, and taking the target configuration information as simulator configuration information;
And if not, executing the step of analyzing the equipment information to generate simulator configuration information.
Optionally, after the step of analyzing the device information and generating simulator configuration information, the method for testing the platform of the internet of things further includes:
data packaging is carried out on the simulator configuration information and the equipment information to obtain the target configuration file;
and storing the target configuration file into the configuration file storage area.
Optionally, the simulator configuration information includes simulator configuration content, a simulator configuration name and a simulator configuration number, and the step of configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator includes:
disassembling the equipment simulators based on the simulator configuration number to obtain a plurality of sub-simulators, wherein the number of the sub-simulators is equal to the simulator configuration number;
setting simulator names of all the sub-simulators based on the simulator configuration names, and encapsulating the simulator configuration contents corresponding to the simulator configuration names in all the sub-simulators to generate all target sub-simulators;
And integrating each target sub-simulator to obtain the target equipment simulator.
Optionally, after the step of testing the function to be tested based on the target device simulator, the method for testing the platform of the internet of things further includes:
acquiring interaction information between the target equipment simulator and the Internet of things platform, and acquiring an actual test result of the function to be tested and a theoretical test result corresponding to the function to be tested;
determining an output result of the target equipment simulator according to the actual test result and the theoretical test result;
and generating and displaying a test report on a test management platform associated with the Internet of things platform according to the interaction information and the output result.
Optionally, the step of determining the output result of the target device simulator according to the actual test result and the theoretical test result includes:
if the actual test result is verified to be consistent with the theoretical test result, determining that the output result is that the platform of the Internet of things platform is normal in function;
and if the actual test result and the theoretical test result are not consistent, determining that the output result is abnormal platform function of the Internet of things platform.
The application also provides an Internet of things platform testing device, which comprises:
the device simulator comprises an acquisition module, a configuration module and a test module, wherein the acquisition module is used for responding to a device simulator configuration instruction and acquiring a function to be tested of an Internet of things platform and device information of test devices corresponding to the function to be tested;
the analysis module is used for analyzing the equipment information and generating simulator configuration information;
the configuration module is used for configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator;
and the testing module is used for testing the function to be tested based on the target equipment simulator so as to realize the platform function test of the Internet of things platform.
The application also provides an electronic device, which is entity equipment, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the internet of things platform testing method as described above.
The application also provides a readable storage medium, which is a computer readable storage medium, the computer readable storage medium stores a program for realizing the internet of things platform testing method, and the program for realizing the internet of things platform testing method is executed by a processor to realize the steps of the internet of things platform testing method as described above
The application also provides a computer program product, which comprises a computer program, wherein the computer program realizes the steps of the Internet of things platform testing method when being executed by a processor.
The application provides a testing method of an Internet of things platform, which comprises the steps of firstly responding to a configuration instruction of a device simulator, obtaining a function to be tested of the Internet of things platform and device information of testing devices corresponding to the function to be tested, then analyzing and processing the device information to generate simulator configuration information, then configuring a preset simulator based on the simulator configuration information to obtain a target device simulator so as to complete the simulation of the operation function of the testing devices, and finally testing the function to be tested of the Internet of things platform based on the target device simulator so as to realize the platform function test of the Internet of things function.
Therefore, the running function of the test equipment for testing the platform function of the internet of things platform is simulated through the simulator, so that the internet of things platform can be tested on the test site without the need of the test equipment to be in the field, the purchase funds of the equipment are saved, the consumption of manpower resources is reduced, and the technical problem of high test cost of the internet of things platform in the prior art is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a first embodiment of a testing method for an Internet of things platform;
fig. 2 is a schematic flow chart provided in a second embodiment of a testing method of an internet of things platform according to the present application;
fig. 3 is a schematic view of a scenario provided by a second embodiment of a testing method for an internet of things platform according to the present application;
FIG. 4 is a schematic diagram of a second embodiment of a test management platform according to the present application;
FIG. 5 is a schematic diagram of a second embodiment of an apparatus simulator according to the present application;
fig. 6 is a schematic diagram of a module structure of a platform testing device for internet of things according to an embodiment of the application;
fig. 7 is a schematic diagram of a device structure of a hardware operating environment related to a testing method of an internet of things platform in an embodiment of the application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
The internet of things is a system composed of mutually related computing object devices, the computing object devices can exchange and analyze data through the network through the interconnection, and with the development of the internet of things technology, more and more computing object devices start to be connected to the internet of things platform, so that the internet of things platform continuously supports more and more computing object devices, and therefore, in order to ensure the stability of the internet of things platform, the platform functions of the internet of things platform need to be tested regularly.
At present, when testing the platform function of the internet of things platform, corresponding testing equipment needs to be determined first, then the testing equipment is connected to the internet of things platform to test the corresponding platform function, but because each platform function corresponds to different testing equipment, in the actual testing process of the internet of things platform, a large number of testing equipment needs to be prepared by a tester, a large amount of equipment purchase funds are consumed, and certain human resources are consumed, so that the testing cost of the current internet of things platform is high.
Based on this, the present application proposes a method for testing an internet of things platform according to a first embodiment, referring to fig. 1, the method for testing an internet of things platform includes:
step S10, responding to a configuration instruction of an equipment simulator, and acquiring a function to be tested of an Internet of things platform and equipment information of test equipment corresponding to the function to be tested;
it should be noted that the number of the functions to be tested may be one or more, which is not limited in this embodiment; the number of the test devices is related to the number of the functions to be tested, and each function to be tested corresponds to one test device in general; the device information may include the number of devices, the type of device, the model number of devices, the ID of devices, etc.
Step S20, analyzing the equipment information to generate simulator configuration information;
it should be noted that, the internal information representing rule of the simulator configuration information is matched with the information representing rule of the internet of things platform, and it can be understood that the parsing processing of the device information refers to converting the internal format of the device information into the platform format of the internet of things platform.
As an example, when the device information is analyzed, the device information may be analyzed in one analysis process, or the device information may be disassembled into a plurality of sub-information, so that each sub-information is analyzed in a plurality of analysis processes to improve the analysis efficiency, which is not limited in this example.
Step S30, configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator;
it will be appreciated that the purpose of configuring the device simulator based on the simulator configuration information is to enable the final configured target device simulator to simulate the device functions of the test device.
As an example, the step of configuring the preset device simulator based on the simulator configuration information to obtain the target device simulator includes: and packaging the simulator configuration information to the corresponding position of the equipment simulator to obtain the target equipment simulator.
And step S40, testing the function to be tested based on the target equipment simulator so as to realize platform function testing of the Internet of things platform.
As an example, the step of testing the function to be tested based on the target device simulator includes: and continuously sending test data to the internet of things platform based on the target equipment simulator until receiving an equipment closing instruction from the internet of things platform so as to finish the test of the function to be tested.
The embodiment of the application provides a method for testing an Internet of things platform, which comprises the steps of firstly responding to a configuration instruction of an equipment simulator, obtaining equipment information of a function to be tested of the Internet of things platform and test equipment corresponding to the function to be tested, then analyzing the equipment information to generate simulator configuration information, configuring a preset simulator based on the simulator configuration information to obtain a target equipment simulator so as to complete the simulation of the operation function of the test equipment, and finally testing the function to be tested of the Internet of things platform based on the target equipment simulator so as to realize the platform function test of the Internet of things function. Therefore, the embodiment of the application simulates the operation function of the test equipment for testing the platform function of the Internet of things platform through the simulator, so that the test of the Internet of things platform can be performed without the need of the test equipment to be in the field, thereby saving the purchase funds of the equipment, reducing the consumption of manpower resources and solving the technical problem of high test cost of the Internet of things platform in the prior art.
In one possible implementation manner, the step of parsing the device information to generate simulator configuration information includes:
step S21, an analysis service execution program corresponding to the Internet of things platform is obtained;
it should be noted that, the parsing service executing program is configured to convert external access information into an information format that matches with an information expression rule of the internet of things platform, so that a problem that an operation abnormality occurs in the internet of things platform due to a difference between the information expression rule of the external access information and the information expression rule of the internet of things platform can be avoided.
Step S22, obtaining an analysis service process by starting the analysis service execution program;
step S23, the equipment information is sent to the analysis service process, so that analysis processing is carried out on the equipment information through the analysis service process, and the simulator configuration information is obtained.
In this embodiment, an analysis service execution program corresponding to an internet of things platform and used for converting external access information into an information format matched with an information representation rule of the internet of things platform is first obtained, then the analysis service execution program is started to obtain an analysis service process of the analysis service execution program, and finally equipment information is sent to the analysis service process, so that the equipment information is analyzed and processed through the analysis service process to obtain simulator configuration information matched with the information representation rule of the internet of things platform, and therefore the problem that the operation of the internet of things platform is abnormal due to the fact that the information representation rule of the external access information is different from the information representation rule of the internet of things platform can be avoided, and the operation stability of the internet of things platform is improved.
In a possible implementation manner, before the step of analyzing the device information and generating simulator configuration information, the method for testing an internet of things platform further includes:
step S201, checking whether a target configuration file corresponding to the equipment information exists in a configuration file storage area of the equipment simulator;
step S202, if yes, acquiring target configuration information in the target configuration file, and taking the target configuration information as simulator configuration information;
it can be understood that if the target configuration file corresponding to the equipment information exists in the configuration file storage area of the equipment simulator, the target configuration information in the target configuration file can be directly obtained without analyzing the equipment information, so that the simulator configuration information can be obtained, the process of analyzing the equipment information can be saved, and the testing efficiency of the internet of things platform can be improved.
Step S203, if not, executing the step of analyzing the device information to generate simulator configuration information.
In this embodiment, before the device information is analyzed, it is necessary to check whether a target configuration file corresponding to the device information exists in a configuration file storage area of the device simulator. If the target configuration file corresponding to the equipment information exists in the configuration file storage area of the equipment simulator, the target configuration information in the target configuration file is directly acquired, so that the simulator configuration information corresponding to the equipment information can be obtained, and if the target configuration file corresponding to the equipment information does not exist in the configuration file storage area of the equipment simulator, the process of analyzing the equipment information is normally executed, so that when the target configuration file corresponding to the equipment information exists in the configuration file storage area, the process of analyzing the equipment information is saved, and the test efficiency of the Internet of things platform is improved.
In a possible implementation manner, after the step of analyzing the device information and generating simulator configuration information, the method for testing an internet of things platform further includes:
step S204, data packaging is carried out on the simulator configuration information and the equipment information to obtain the target configuration file;
as an example, because the storage space of the configuration file storage area is limited, in order to implement that the configuration file storage area can store as many configuration files as possible, the step of data packaging the simulator configuration information and the device information to obtain the target configuration file may be: data packaging is carried out on the simulator configuration information and the equipment information to obtain a packaging file; and carrying out lossless compression on the encapsulated file to obtain the target configuration file, so that the resource space occupied by the target configuration file in a configuration file storage area is further reduced by carrying out lossless compression on the encapsulated file.
Step S205, storing the target configuration file in the configuration file storage area.
In this embodiment, after the device information is analyzed and processed to generate the simulator configuration information, the simulator configuration information and the device information may be subjected to data encapsulation to obtain a target configuration file, and then the target configuration file is stored in a configuration file storage area, so that when the same test device needs to be simulated later, a target configuration file corresponding to the device information of the test device can be found in the configuration file storage area, thereby improving the simulation efficiency of the same test device in the subsequent simulation and further improving the test efficiency of the internet of things platform.
In one possible implementation manner, the method for testing the platform of the internet of things further includes:
and step A10, if the abnormal configuration files with the calling frequency smaller than the preset calling frequency threshold value exist in the configuration file storage area in the preset period, deleting the abnormal configuration files in the configuration file storage area.
It should be noted that, the preset call frequency threshold is used to characterize whether the call frequency is too low in the configuration file.
It will be appreciated that the configuration file storage area is limited in storage space. The memory space of the configuration file memory area needs to be released periodically, and when the memory space is released, the configuration files with too low calling frequency can be preferentially selected to be deleted.
In this embodiment, if it is verified that the abnormal configuration files with the call frequency less than the preset call frequency threshold value exist in the configuration file storage area in a certain preset period in a summarized manner, the abnormal configuration files in the configuration file storage area need to be deleted to release the storage space of the configuration file storage area, so that the technical effect of flexibly adjusting the configuration files in the configuration file storage area is achieved, the technical defect that a large number of abnormal configuration files with the call frequency too low exist in the configuration file storage area and the storage space of a large number of configuration file storage areas is occupied is overcome.
In one possible implementation manner, the simulator configuration information includes simulator configuration content, a simulator configuration name and a simulator configuration number, and the step of configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator includes:
step S31, disassembling the equipment simulators based on the simulator configuration number to obtain a plurality of sub-simulators, wherein the number of the sub-simulators is equal to the simulator configuration number;
it should be noted that, the number of simulator configurations is related to the number of functions to be tested, and the content of the simulator configuration is in a one-to-one relationship with the name of the simulator configuration.
Step S32, setting simulator names of all the sub-simulators based on the simulator configuration names, and encapsulating the simulator configuration content corresponding to the simulator configuration names in all the sub-simulators to generate all target sub-simulators;
and step S33, integrating each target sub-simulator to obtain the target equipment simulator.
For example, assuming that the number of simulator configurations is 3, the simulator configuration content includes content a, content B, and content C, and the simulator configuration names include device a, device B, and device C, the device simulators may be disassembled to obtain three sub-simulators, namely sub-simulator a, sub-simulator B, and sub-simulator C, the simulator name of the sub-simulator a is set as device a, and the content a is packaged into the simulator a; setting the simulator name of the sub simulator B as a device B, and packaging the content B into the simulator B; the simulator name of the sub-simulator C is set as device C and the content C is packaged into the simulator C.
In this embodiment, firstly, based on the number of simulator configurations, the device simulators are disassembled to obtain a plurality of sub-simulators, wherein the number of the sub-simulators is the same as the number of the simulator configurations, then, simulator names of all the sub-simulators are set based on the simulator configuration names, simulator configuration contents corresponding to the simulator configuration names are packaged in all the sub-simulators to generate all the target sub-models, and finally, all the target sub-models are integrated to obtain the target device simulators, so that the internet of things platform can be tested through one simulator integrating functions of a plurality of test devices.
Example two
In another embodiment of the present application, the same or similar content as that of the first embodiment may be referred to the description above, and will not be repeated. On this basis, referring to fig. 2, after the step of testing the function to be tested based on the target device simulator, the method for testing the platform of the internet of things further includes:
Step S50, obtaining interaction information between the target equipment simulator and the Internet of things platform, and obtaining an actual test result of the function to be tested and a theoretical test result corresponding to the function to be tested;
it should be noted that the interaction information refers to interaction log file information generated when the target device simulator operates on the platform of the internet of things, and it can be understood that when the platform function abnormality of the platform of the internet of things is finally tested and determined, the generation cause of the platform function abnormality can be intuitively observed through the interaction information.
Step S60, determining an output result of the target equipment simulator according to the actual test result and the theoretical test result;
further, the step of determining the output result of the target device simulator according to the actual test result and the theoretical test result includes:
step S61, if the actual test result is verified to be consistent with the theoretical test result, determining that the output result is that the platform of the Internet of things platform is normal in function;
and step S62, if the actual test result and the theoretical test result are not consistent, determining that the output result is abnormal platform function of the Internet of things platform.
And step S70, generating and displaying a test report on a test management platform associated with the Internet of things platform according to the interaction information and the output result.
It should be noted that, when the test report is displayed on the internet of things platform, the test report may be displayed on a popup window of the internet of things platform in a popup window information display manner, or may be sent to a mail in the internet of things platform in a mail form by sending a mail, or may be stored in a database of the internet of things platform, which is not limited in this embodiment.
In this embodiment, firstly, the interaction information between the target device simulator and the platform of the internet of things is obtained, and an actual test result of the function to be tested and a theoretical test result corresponding to the function to be tested are obtained, if the actual test result is consistent with the theoretical test result, it is determined that the output result of the target device simulator is that the platform of the internet of things is normal in function, and if the actual test result is consistent with the theoretical test result, it is indicated that the platform of the internet of things is normal in function; if the actual test result is inconsistent with the theoretical test result, the platform function abnormality of the Internet of things platform is indicated, the output result of the target equipment simulator is determined to be the platform function abnormality of the Internet of things platform, finally, a test report is generated and displayed on a test management platform associated with the Internet of things platform by associating the interaction information and the output result so as to be checked by a tester, the final test result can be intuitively seen by the tester through the test report, and the generation reason of the platform function abnormality can be intuitively observed by the test report when the test result is the platform function abnormality of the Internet of things platform, so that the tester can maintain the Internet of things platform in time.
For example, in order to help understand the technical concept or technical principle of the present application, please refer to fig. 3, fig. 3 provides a schematic view of a scenario in which an internet of things platform testing method is applied, specifically: and the tester sends the function and equipment information to be tested to the equipment simulator through the test management platform, after the equipment information is configured in the equipment simulator, the equipment simulator performs data interaction with the Internet of things platform through simulating the test equipment so as to test the Internet of things platform, and finally, the Internet of things platform feeds back the function operation result (namely the test result) to the test management platform so as to generate a test report on the test management platform.
As an example, referring to fig. 4, the test management platform may include a presentation layer 100, a communication layer 200, a service layer 300, and a data layer 400, where the presentation layer 100 includes a WEB page 101, the communication layer 200 includes an HTTP (HyperText Transfer Protocol ) API (Application Programming Interface, application programming interface) 201, the service layer 300 includes a test case (including the above-mentioned functions to be tested and device information) management module 301, a data file capturing module 302, a test report generating module 303, and a test case management module 304, and the data layer 400 includes a test report storage module 401 and a database 402.
As an example, referring to fig. 5, the device simulator may include a command interaction layer 1000, a logic layer 2000, and a communication layer 3000, the command interaction layer 1000 including a command management module 1001 and an parsing module 1002, the logic layer 2000 including a test management module 2001, a test report module 2002, a device service function module 2003, and a configuration management module 2004, wherein the test management module 2001 includes a test item management module 211 and an assertion (actual test result) management module 212, the test report module 2002 includes an operation data output unit 221 and a function operation data collection unit 222, and the device service function module 2003 includes a function operation module 231 and a device service function core logic module 232; the communication layer 300 includes an MQTT (Message Queue Telemetry Transport, telemetry transport protocol) device protocol module 3001, a TCP (Transmission Control Protocol ) device protocol module 3002, and an NB (Narrow Band) device protocol module 3003.
It should be noted that, when the platform test is performed on the internet of things platform by the test management platform and the device simulator, the test case management module 304 in the service layer 300 of the test management platform is in communication connection with the command interaction layer 1000 of the device simulator, the communication layer 300 of the device simulator is in communication connection with the internet of things platform, and the internet of things platform is in communication connection with the data layer 400 of the test management platform.
Further, based on the application scenario, the architecture of the test management platform, and the architecture of the device simulator, a specific embodiment is listed:
1. a developer or tester clicks a button for running a test case (the above-mentioned response to a device simulator configuration instruction) in a test management platform, starts a device simulator, and inputs starting parameters (the above-mentioned device information) such as the number of devices, the device type, the model number, the device ID and the like into the device simulator;
2. after the equipment simulator is started, a starting parameter analysis module analyzes the starting parameters, simulates corresponding equipment models according to the analyzed starting parameters (the simulator configuration information) so as to run corresponding functions and connect with the Internet of things platform under test;
3. the method comprises the steps that an Internet of things platform simultaneously runs a test flow in a test case (the function to be tested) and one or more assertions (the theoretical test result) exist in the test flow, and the Internet of things platform records the assertions;
4. one or more assertions (the actual test results) exist in the operation of the equipment simulator, and the equipment simulator records interaction information with the Internet of things platform on one hand and the assertions on the other hand;
5. after the test is finished, the equipment simulator automatically overflows, the test management platform captures an equipment simulator operation data log file (the interaction information) through the data file capturing module so as to generate a test report by combining the test case operation result (the output result of the equipment simulator), and the test report is stored in the database.
It should be noted that the above specific embodiments are only for understanding the present application, and do not limit the data transmission method of the server of the present application, and more forms of simple transformation based on the technical concept are all within the scope of the present application.
Example III
The embodiment of the application also provides a testing device for the platform of the internet of things, referring to fig. 6, the testing device for the platform of the internet of things comprises:
the device simulator comprises an acquisition module 10, a configuration module and a test module, wherein the acquisition module 10 is used for responding to a device simulator configuration instruction and acquiring a function to be tested of an Internet of things platform and device information of test devices corresponding to the function to be tested;
the parsing module 20 is configured to parse the device information to generate simulator configuration information;
the configuration module 30 is configured to configure a preset device simulator based on the simulator configuration information to obtain a target device simulator;
and the testing module 40 is configured to test the function to be tested based on the target device simulator, so as to implement a platform function test for the internet of things platform.
Optionally, the parsing module 20 is further configured to:
acquiring an analytic service execution program corresponding to the Internet of things platform;
the analysis service process is obtained by starting the analysis service execution program;
And sending the equipment information to the analysis service process so as to analyze the equipment information through the analysis service process and obtain the simulator configuration information.
Optionally, the internet of things platform testing device further includes:
checking whether a target configuration file corresponding to the equipment information exists in a configuration file storage area of the equipment simulator;
if yes, acquiring target configuration information in the target configuration file, and taking the target configuration information as simulator configuration information;
and if not, executing the step of analyzing the equipment information to generate simulator configuration information.
Optionally, the internet of things platform testing device further includes:
data packaging is carried out on the simulator configuration information and the equipment information to obtain the target configuration file;
and storing the target configuration file into the configuration file storage area.
Optionally, the simulator configuration information includes simulator configuration content, a simulator configuration name and a number of simulator configurations, and the configuration module 30 is further configured to:
disassembling the equipment simulators based on the simulator configuration number to obtain a plurality of sub-simulators, wherein the number of the sub-simulators is equal to the simulator configuration number;
Setting simulator names of all the sub-simulators based on the simulator configuration names, and encapsulating the simulator configuration contents corresponding to the simulator configuration names in all the sub-simulators to generate all target sub-simulators;
and integrating each target sub-simulator to obtain the target equipment simulator.
Optionally, the internet of things platform testing device further includes:
acquiring interaction information between the target equipment simulator and the Internet of things platform, and acquiring an actual test result of the function to be tested and a theoretical test result corresponding to the function to be tested;
determining an output result of the target equipment simulator according to the actual test result and the theoretical test result;
and generating and displaying a test report on a test management platform associated with the Internet of things platform according to the interaction information and the output result.
Optionally, the internet of things platform testing device further includes:
if the actual test result is verified to be consistent with the theoretical test result, determining that the output result is that the platform of the Internet of things platform is normal in function;
and if the actual test result and the theoretical test result are not consistent, determining that the output result is abnormal platform function of the Internet of things platform.
The internet of things platform testing device provided by the invention can solve the technical problem of high testing cost of the internet of things platform in the prior art by adopting the internet of things platform testing method in the first embodiment or the second embodiment. Compared with the prior art, the beneficial effects of the internet of things platform testing device provided by the embodiment of the invention are the same as those of the internet of things platform testing method provided by the embodiment, and other technical features of the internet of things platform testing device are the same as those disclosed by the method of the previous embodiment, so that the description is omitted.
Example IV
The embodiment of the invention provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, where the instructions are executed by the at least one processor, so that the at least one processor can execute the internet of things platform testing method in the first embodiment.
Referring now to fig. 7, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant: personal digital assistants), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 7, the electronic apparatus may include a processing device 1001 (e.g., a central processing unit, a graphics processor, or the like) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a liquid crystal display (LCD: liquid Crystal Display), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic equipment provided by the invention can solve the technical problem of high test cost of the Internet of things platform in the prior art by adopting the Internet of things platform test method in the embodiment. Compared with the prior art, the beneficial effects of the electronic equipment provided by the embodiment of the invention are the same as those of the testing method of the platform of the internet of things provided by the embodiment, and other technical features of the electronic equipment are the same as those disclosed by the method of the previous embodiment, so that the description is omitted herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example five
An embodiment of the present invention provides a computer readable storage medium having computer readable program instructions stored thereon, where the computer readable program instructions are configured to execute the method for testing an internet of things platform in the first embodiment.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM: read Only Memory), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: responding to a configuration instruction of an equipment simulator, and acquiring a function to be tested of an Internet of things platform and equipment information of test equipment corresponding to the function to be tested; analyzing the equipment information to generate simulator configuration information; configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator; and testing the function to be tested based on the target equipment simulator so as to realize platform function test of the Internet of things platform.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions for executing the testing method of the internet of things platform, so that the technical problem of high testing cost of the internet of things platform in the prior art can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the application are the same as those of the testing method of the platform of the internet of things provided by the first embodiment or the second embodiment, and are not repeated here.
Example six
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program realizes the steps of the Internet of things platform testing method when being executed by a processor.
The computer program product provided by the application can solve the technical problem of high test cost of the internet of things platform in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the application are the same as those of the testing method of the platform of the internet of things provided by the first embodiment or the second embodiment, and are not repeated here.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the application.

Claims (10)

1. The Internet of things platform testing method is characterized by comprising the following steps of:
responding to a configuration instruction of an equipment simulator, and acquiring a function to be tested of an Internet of things platform and equipment information of test equipment corresponding to the function to be tested;
analyzing the equipment information to generate simulator configuration information;
configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator;
and testing the function to be tested based on the target equipment simulator so as to realize platform function test of the Internet of things platform.
2. The method for testing the platform of the internet of things according to claim 1, wherein the step of analyzing the device information to generate simulator configuration information comprises the steps of:
acquiring an analytic service execution program corresponding to the Internet of things platform;
the analysis service process is obtained by starting the analysis service execution program;
and sending the equipment information to the analysis service process so as to analyze the equipment information through the analysis service process and obtain the simulator configuration information.
3. The internet of things platform testing method according to claim 1, wherein before the step of analyzing the device information to generate simulator configuration information, the internet of things platform testing method further comprises:
checking whether a target configuration file corresponding to the equipment information exists in a configuration file storage area of the equipment simulator;
if yes, acquiring target configuration information in the target configuration file, and taking the target configuration information as simulator configuration information;
and if not, executing the step of analyzing the equipment information to generate simulator configuration information.
4. The internet of things platform testing method according to claim 3, wherein after the step of analyzing the device information to generate simulator configuration information, the internet of things platform testing method further comprises:
data packaging is carried out on the simulator configuration information and the equipment information to obtain the target configuration file;
and storing the target configuration file into the configuration file storage area.
5. The method for testing the platform of the internet of things according to claim 1, wherein the simulator configuration information includes simulator configuration content, simulator configuration names and number of simulator configurations, and the step of configuring a preset device simulator based on the simulator configuration information to obtain the target device simulator comprises the following steps:
Disassembling the equipment simulators based on the simulator configuration number to obtain a plurality of sub-simulators, wherein the number of the sub-simulators is equal to the simulator configuration number;
setting simulator names of all the sub-simulators based on the simulator configuration names, and encapsulating the simulator configuration contents corresponding to the simulator configuration names in all the sub-simulators to generate all target sub-simulators;
and integrating each target sub-simulator to obtain the target equipment simulator.
6. The internet of things platform testing method according to claim 1, wherein after the step of testing the function to be tested based on the target device simulator, the internet of things platform testing method further comprises:
acquiring interaction information between the target equipment simulator and the Internet of things platform, and acquiring an actual test result of the function to be tested and a theoretical test result corresponding to the function to be tested;
determining an output result of the target equipment simulator according to the actual test result and the theoretical test result;
and generating and displaying a test report on a test management platform associated with the Internet of things platform according to the interaction information and the output result.
7. The internet of things platform testing method according to claim 6, wherein the step of determining the output result of the target device simulator according to the actual test result and the theoretical test result comprises:
if the actual test result is verified to be consistent with the theoretical test result, determining that the output result is that the platform of the Internet of things platform is normal in function;
and if the actual test result and the theoretical test result are not consistent, determining that the output result is abnormal platform function of the Internet of things platform.
8. The utility model provides an thing networking platform testing arrangement, its characterized in that, thing networking platform testing arrangement includes:
the device simulator comprises an acquisition module, a configuration module and a test module, wherein the acquisition module is used for responding to a device simulator configuration instruction and acquiring a function to be tested of an Internet of things platform and device information of test devices corresponding to the function to be tested;
the analysis module is used for analyzing the equipment information and generating simulator configuration information;
the configuration module is used for configuring a preset device simulator based on the simulator configuration information to obtain a target device simulator;
and the testing module is used for testing the function to be tested based on the target equipment simulator so as to realize the platform function test of the Internet of things platform.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the internet of things platform testing method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that the readable storage medium is a computer readable storage medium, on which a program for implementing an internet of things platform test method is stored, the program for implementing the internet of things platform test method being executed by a processor to implement the steps of the internet of things platform test method according to any one of claims 1 to 7.
CN202311057292.8A 2023-08-21 2023-08-21 Internet of things platform testing method and device, electronic equipment and readable storage medium Pending CN116991739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311057292.8A CN116991739A (en) 2023-08-21 2023-08-21 Internet of things platform testing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311057292.8A CN116991739A (en) 2023-08-21 2023-08-21 Internet of things platform testing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116991739A true CN116991739A (en) 2023-11-03

Family

ID=88530170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311057292.8A Pending CN116991739A (en) 2023-08-21 2023-08-21 Internet of things platform testing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116991739A (en)

Similar Documents

Publication Publication Date Title
CN111475298B (en) Task processing method, device, equipment and storage medium
CN111625473B (en) Interface test case generation method and device, storage medium and electronic equipment
CN111078539B (en) Test method, device, system and computer readable storage medium
CN111813641B (en) Method, device, medium and equipment for collecting crash information
CN112631590B (en) Component library generation method, device, electronic equipment and computer readable medium
CN112684968A (en) Page display method and device, electronic equipment and computer readable medium
CN111752834A (en) Automatic testing method and device
CN112306857A (en) Method and apparatus for testing applications
CN112882948A (en) Stability testing method, device and system for application and storage medium
CN117032573A (en) Micro-service execution method, electronic device and readable storage medium
WO2023160395A1 (en) Permission-based interactive interface publishing method and apparatus, and electronic device
CN115022328B (en) Server cluster, testing method and device of server cluster and electronic equipment
CN112306826A (en) Method and apparatus for processing information for terminal
CN116991739A (en) Internet of things platform testing method and device, electronic equipment and readable storage medium
CN107391354B (en) Method and system for automatically monitoring terminal performance and storage device
CN115509913A (en) Software automation test method, device, machine readable medium and equipment
CN111367791B (en) Method, device, medium and electronic equipment for generating test case
CN113642107A (en) Method and device for realizing pure digital simulation system of unmanned aerial vehicle
CN111273967A (en) Remote hook setting method and device suitable for Android system and electronic equipment
CN111382556B (en) Data conversion method, device, equipment and storage medium
CN116561015B (en) Map application testing method, electronic device and computer readable medium
WO2024001594A1 (en) Operator development method and apparatus, operator processing method and apparatus, and electronic device, system and storage medium
CN116701159A (en) Test case generation method and device, electronic equipment and storage medium
CN114461416A (en) Automatic test optimization method and device, electronic equipment and readable storage medium
CN117215961A (en) Automated Murex system, control method, electronic device and storage medium

Legal Events

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