CN115277486B - Automatic testing method, device and medium based on industrial Internet - Google Patents

Automatic testing method, device and medium based on industrial Internet Download PDF

Info

Publication number
CN115277486B
CN115277486B CN202210915929.1A CN202210915929A CN115277486B CN 115277486 B CN115277486 B CN 115277486B CN 202210915929 A CN202210915929 A CN 202210915929A CN 115277486 B CN115277486 B CN 115277486B
Authority
CN
China
Prior art keywords
data
test
application platform
actual
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210915929.1A
Other languages
Chinese (zh)
Other versions
CN115277486A (en
Inventor
王晓虎
肖启川
吴茂佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Guangyu Mingdao Digital Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Guangyu Mingdao Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Guangyu Mingdao Digital Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202210915929.1A priority Critical patent/CN115277486B/en
Publication of CN115277486A publication Critical patent/CN115277486A/en
Application granted granted Critical
Publication of CN115277486B publication Critical patent/CN115277486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/329Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the application layer [OSI layer 7]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The application discloses an automatic test method, device and medium based on industrial Internet, which relate to the field of industrial Internet and aim to solve the problem that the prior art lacks linkage verification of functions in an application layer and protocol layer message transmission, original expected data generated by industrial equipment to be tested is sent to an edge gateway through various protocols, the edge gateway is sent to an application platform, after service logic processing of the application platform, data output to a user is taken as actual data, and whether reporting is successful is judged by judging whether the original expected data is consistent after the service logic processing of the application. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.

Description

Automatic testing method, device and medium based on industrial Internet
Technical Field
The application relates to the field of industrial Internet, in particular to an automatic test method, device and medium for industrial Internet.
Background
With the maturity of industrial Internet application, gradually cover all kinds of industrial scenes, provide a large amount of facilities for industry intellectualization and digitalization, simplified the first line operating personnel's of mill operation step, promoted the utilization ratio of energy and material. However, as the market continues to expand, frequent and rapid deliveries are followed; as a tester, how to effectively ensure the product quality to achieve the purpose of quick delivery is a subject worthy of continuous thinking and exploration of all testers.
In the existing test method, the test verification of the message transmission of the protocol layer is basically carried out by manpower, namely the test verification of the message transmission from the industrial equipment end to the edge gateway, or the test verification of the application layer is carried out by the automatic test in the application, so as to ensure that the application function accords with the user expectation.
The test verification of the message transmission of the protocol layer is carried out by manpower, so that the human resources are wasted, only the message transmission verification of the protocol layer is solved, the test verification of the application layer is carried out by the automatic test in the application, only the message transmission verification of the application layer is solved, and the linkage verification of functions in the application layer and the message transmission of the protocol layer is lacking.
Therefore, the automatic test for realizing linkage verification of functions in an application layer and message transmission in a protocol layer is provided, and is a technical problem to be solved urgently by the person in the field.
Disclosure of Invention
The application aims to provide an industrial Internet-based automatic test method for realizing linkage verification of functions in an application layer and message transmission of a protocol layer.
In order to solve the technical problems, the application provides an automatic test method based on the industrial Internet, which comprises the following steps:
Acquiring original expected data generated by industrial equipment to be tested;
acquiring actual data output by an application platform, wherein the actual data is data which is output after the to-be-tested industrial equipment sends the to-be-tested industrial equipment to the edge gateway and the edge gateway sends the to-be-tested industrial equipment to the application platform and service logic of the application platform processes the to-be-tested industrial equipment;
Judging whether the original expected data is consistent with the actual data or not;
if the test results are consistent, outputting a test result of successful test;
If the test results are inconsistent, outputting the test results of the test failure.
Preferably, in the above automated industrial internet-based testing method, the determining whether the original expected data and the actual data are consistent includes:
acquiring an original key field of the original expected data and an actual key field of the actual data;
judging whether the original key field is consistent with the actual key field;
If yes, judging that the original expected data is consistent with the actual data;
If not, judging that the original expected data is inconsistent with the actual data.
Preferably, in the above automated testing method based on industrial internet, before the obtaining the original expected data generated by the industrial equipment to be tested, the method further includes:
creating a preset message queue, wherein the preset message queue comprises execution test time;
And setting a regression test task according to the execution test time so as to execute the corresponding regression test task when the execution test time arrives.
Preferably, in the above automated industrial internet-based testing method, after the determining whether the original expected data and the actual data are consistent, the method further includes:
generating a test report, the test report comprising the raw expected data and the actual data.
Preferably, the above automated testing method based on industrial internet further comprises:
Acquiring flow test data sent to the application platform by the edge gateway;
correspondingly, the test report includes: the raw expected data, the actual data, and the flow test data.
Preferably, in the above automated testing method based on industrial internet, the obtaining actual data output by the application platform includes:
sending an interface calling request to the application platform;
And receiving the return interface data of the application platform, and acquiring the actual data output by the application platform according to the return interface data.
Preferably, in the above automated testing method based on industrial internet, the obtaining actual data output by the application platform includes:
Sending a database query request to the application platform;
and after receiving the query permission instruction, acquiring the actual data output by the application platform from the database of the application platform.
In order to solve the technical problem, the application also provides an automatic testing device based on the industrial Internet, which comprises:
The first acquisition module is used for acquiring original expected data generated by the industrial equipment to be tested;
The second acquisition module is used for acquiring actual data output by the application platform, wherein the actual data is data which is output after the service logic processing of the application platform, is sent to the edge gateway by the industrial equipment to be tested and is sent to the application platform by the edge gateway;
The judging module is used for judging whether the original expected data are consistent with the actual data or not; if the first output module is consistent, triggering the first output module, and if the first output module is inconsistent, triggering the second output module;
the first output module is used for outputting a test result of successful test;
and the second output module is used for outputting a test result of the test failure.
In order to solve the technical problem, the application also provides an automatic testing device based on the industrial Internet, which comprises:
A memory for storing a computer program;
and the processor is used for realizing the steps of the automatic testing method based on the industrial Internet when executing the computer program.
In order to solve the technical problem, the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the automatic test method based on the industrial Internet when being executed by a processor.
The automatic test method based on the industrial Internet provided by the application comprises the following steps: acquiring original expected data generated by industrial equipment to be tested; acquiring actual data output by an application platform, wherein the actual data is data output after the business logic of the application platform is processed by the edge gateway and the to-be-tested industrial equipment is sent to the edge gateway; judging whether the original expected data is consistent with the actual data or not; if the test is consistent, judging that the test is successful; if the test fails, the test is judged to fail. The method comprises the steps that original expected data generated by industrial equipment to be tested are sent to an edge gateway through various protocols, the edge gateway sends the data to an application platform, the data output to a user are used as actual data after being processed through business logic of the application platform, whether the original expected data are consistent after being processed through the application business logic is judged, and whether reporting is successful is judged. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.
In addition, the application also provides an automatic testing device and medium based on the industrial Internet, which correspond to the method and have the same effects.
Drawings
For a clearer description of embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flow chart of an automated testing method based on the industrial Internet provided by an embodiment of the application;
Fig. 2 is a schematic diagram of an application scenario of an automated testing method based on an industrial internet according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an automated testing apparatus based on the industrial Internet according to an embodiment of the present application;
Fig. 4 is a block diagram of another automated testing apparatus based on the industrial internet according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
The application provides an automatic test method, device and medium based on industrial Internet.
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description.
The industrial Internet (Industrial Internet) is characterized in that equipment, production lines, factories, suppliers, products and clients are tightly connected and fused through an open and global industrial network platform, and various element resources in the industrial economy are efficiently shared, so that the cost is reduced, the efficiency is increased through an automatic and intelligent production mode, the industrial chain is prolonged, and the transformation development of the manufacturing industry is promoted.
With the maturity of industrial Internet application, gradually cover all kinds of industrial scenes, provide a large amount of facilities for industry intellectualization and digitalization, simplified the first line operating personnel's of mill operation step, promoted the utilization ratio of energy and material. However, as the function of the industrial internet application in the industrial field is increasingly greater, the calling relationship between applications and devices is more complex, and the regression test is very challenging. In the existing test method, the test verification of the message transmission of the protocol layer is basically carried out by manpower, namely the test verification of the message transmission from the industrial equipment end to the edge gateway, or the test verification of the application layer is carried out by the automatic test in the application, so as to ensure that the application function accords with the user expectation. The test verification of the message transmission of the protocol layer is carried out by manpower, so that the human resources are wasted, only the message transmission verification of the protocol layer is solved, the test verification of the application layer is carried out by the automatic test in the application, only the message transmission verification of the application layer is solved, and the linkage verification of functions in the application layer and the message transmission of the protocol layer is lacking.
In order to solve the above-mentioned problems, this embodiment provides an automated testing method based on the industrial internet, and fig. 1 is a flowchart of the automated testing method based on the industrial internet according to the embodiment of the present application, as shown in fig. 1, including:
s11: acquiring original expected data generated by industrial equipment to be tested;
S12: acquiring actual data output by an application platform, wherein the actual data is data output after the business logic of the application platform is processed by the edge gateway and the to-be-tested industrial equipment is sent to the edge gateway;
S13: judging whether the original expected data is consistent with the actual data or not;
If so, the process proceeds to step S14: outputting a test result of successful test;
if not, the process proceeds to step S15: and outputting a test result of the test failure.
The embodiment of the application is based on the industrial Internet, and the industrial Internet scene can be described as follows: the different devices communicate with the edge gateway through various industrial protocols, the edge gateway integrates data and forwards the data to each application platform of the industrial system through the industrial protocols, and the applications are called through interfaces and the data and the information are presented to users.
The edge gateway mentioned in the embodiment of the application refers to a gateway deployed at the edge side of a network, and is connected with the physical world and the digital world through functions such as network connection, protocol conversion and the like, so as to provide light connection management, real-time data analysis and application management functions.
Step S11 obtains the original expected data generated by the industrial device to be tested, where the original expected data may be generated by the industrial device to be tested in real time, may be historical data of the industrial device to be tested, or may be obtained by performing an expected process on the original data generated by the industrial device to be tested, and the data expected to be generated on the application platform side is obtained as the original expected data, which is not limited in this embodiment.
The original expected data generated by the industrial equipment to be tested is sent to the edge gateway through an industrial protocol, and it should be noted that the industrial equipment to be tested and the edge gateway can perform data communication through different industrial protocols, for example, various protocols such as a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP), a message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) protocol, a Modbus communication protocol and the like, and the data communication can be set according to the requirements of the actual industrial equipment.
After receiving the original expected data sent by the industrial equipment to be tested, the edge gateway sends the received original expected data to the application platform, and after receiving the data, the application platform processes the data which can be output to the user through the business logic of the application platform and is used as actual data, namely the data which is related to the output in the industrial Internet system.
Whether the original expected data is consistent with the actual data or not is judged, whether all the data of the original expected data is consistent with all the data of the actual data or not can be judged, whether the key data of the original expected data is consistent with the key data of the actual data or not can be judged, and the design is carried out according to actual needs. If the regression test is consistent, the regression test is successful, and if the regression test is inconsistent, the regression test is failed. Because industrial equipment is required to realize communication according to different industrial protocols according to different actual demands during production, the generated data is also based on different industrial protocol formats, and the automatic switching of different versions of industrial equipment and different industrial protocols is realized through a continuous integration technology, so that the testing of different industrial protocols of different industrial equipment is realized.
Specifically, according to the industrial Internet-based automatic test method provided by the application, the original expected data generated by the industrial equipment to be tested and the actual data output by the application platform are obtained, wherein the actual data is the data output after the business logic processing of the application platform, and the industrial equipment to be tested is sent to the edge gateway and the edge gateway is sent to the application platform; judging whether the original expected data is consistent with the actual data or not; if the test is consistent, judging that the test is successful; if the test fails, the test is judged to fail. The method comprises the steps that original expected data generated by industrial equipment to be tested are sent to an edge gateway through various protocols, the edge gateway sends the data to an application platform, the data output to a user are used as actual data after being processed through business logic of the application platform, whether the original expected data are consistent after being processed through the application business logic is judged, and whether reporting is successful is judged. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.
According to the above embodiment, the conversion of the partial expression form may be performed according to the specifications of different protocols during the transmission of the original expected data in the industrial interconnection, so that the actual data generated finally is not completely the same, and therefore, the embodiment of the present application provides a preferred implementation, and the step S13 of determining whether the original expected data and the actual data are consistent based on the automated testing method of the industrial internet includes:
acquiring an original key field of original expected data and an actual key field of actual data;
judging whether the original key field is consistent with the actual key field;
If yes, judging that the original expected data is consistent with the actual data;
If not, judging that the original expected data is inconsistent with the actual data.
The method comprises the steps of obtaining an original key field of original expected data and an actual key field of actual data, judging whether reporting is successful by judging whether the original key field is consistent with the actual key field, improving judging accuracy, realizing testing of logic correctness from different protocol data of an industrial equipment end to an application platform and data accuracy of the application platform, guaranteeing continuous testing of the data from the industrial equipment to the application platform, and realizing linkage verification of functions in the application layer and protocol layer message transmission.
According to the above embodiment, in the actual operation process, each link of the industrial internet may change, which results in failure of data transmission, so the embodiment of the present application provides a preferred solution, and an automatic testing method based on the industrial internet, before the obtaining of the original expected data generated by the industrial equipment to be tested, further includes:
creating a preset message queue, wherein the preset message queue comprises execution test time;
And setting a regression test task according to the execution test time so as to execute the corresponding regression test task when the execution test time arrives.
The preset message queue is established in advance, the preset message queue comprises execution test time, the execution test time can be customized according to the needs of a user, the test can be circulated periodically, the test frequency can be increased in the application peak period, and the preset message queue can be designed according to the actual needs. And setting a regression test task according to the execution test time so as to execute the corresponding regression test task when the execution test time arrives, thereby realizing continuous regression test.
According to the above embodiment, in order to analyze the result of each regression test, the present embodiment provides a preferred solution, and an automated testing method based on the industrial internet, after step S13 determines whether the original expected data and the actual data are consistent, the method further includes:
A test report is generated, the test report including the original expected data and the actual data.
Whether the judging result is consistent or not, the original expected data and the actual data are recorded into a test report so as to facilitate the subsequent problem analysis.
Preferably, in order to accurately analyze the cause of the error, the method further includes, based on the above embodiment:
Acquiring flow test data sent to an application platform by an edge gateway;
Correspondingly, the test report includes: raw expected data, actual data, and flow test data.
And the process test data sent to the application platform by the edge gateway is also recorded to a test report, and when the judgment result is that the test fails, the error in which link occurs can be obtained by analyzing the original expected data, the actual data and the process test data, so that the further improvement is facilitated.
According to the above embodiment, the present embodiment provides a preferred scheme for acquiring actual data output by an application platform, including:
sending an interface calling request to the application platform;
And receiving the return interface data of the application platform, and acquiring the actual data output by the application platform according to the return interface data.
In the actual working process, the application platform can send actual data to the user through the interface, so that an interface call request can be initiated to the application platform to acquire the output actual data of the application platform through the interface.
If the interface call request is not responsive, the embodiment provides another scheme, where the obtaining the actual data output by the application platform includes:
Sending a database query request to the application platform;
and after receiving the query permission instruction, acquiring the actual data output by the application platform from the database of the application platform.
And sending a database query request to the application platform, and directly acquiring the actual data output by the application platform from the database of the application platform. Of course, if the interface call request does not respond or the actual data is not queried in the database, the data reporting failure is indicated, and the regression test fails.
In order to enable those skilled in the art to better understand the present solution, the following further description is made in connection with the actual application scenario:
Fig. 2 is a schematic view of an application scenario of an automated testing method based on an industrial internet according to an embodiment of the present application, as shown in fig. 2, different industrial devices are connected to an edge gateway in a communication manner through different industrial protocols, the edge gateway is connected to an application platform through a unified industrial protocol, and the platform is used to send corresponding information to a user as required, and in this process, whether the information is sent accurately or not needs to be detected.
The method comprises the steps that an automation platform obtains original expected data generated by industrial equipment to be tested, wherein the original expected data can be generated by the industrial equipment to be tested in real time; the historical data of the industrial equipment to be tested can also be obtained; the method can also be that the original data generated by the equipment to be tested is subjected to expected processing, and the data which can be generated by an application platform side is obtained to be used as the original expected data; the automation platform mentioned in this embodiment realizes cross-platform data transmission through OPC unified architecture (OPC Unified Architecture, OPC-UA) protocol. Object linking and embedding process control (OLE for Process Control, OPC) Object linking and embedding (Object LINKING AND Embedding, OLE) for process control is an industry standard. Because industrial equipment is required to realize communication according to different industrial protocols according to different actual demands during production, the generated data is also based on different industrial protocol formats, and the automatic switching of different versions of industrial equipment and different industrial protocols is realized through the continuous integration technology of an automation platform, so that the testing of different industrial protocols of different industrial equipment is realized.
The method comprises the steps that an automation platform obtains actual data output by an application platform, an edge gateway sends the received original expected data to the application platform after receiving the original expected data sent by industrial equipment to be tested, and the application platform processes data which can be output to a user through business logic of the application platform after receiving the data and is used as actual data, namely the data which is output in an industrial Internet system.
The automatic platform judges whether the original expected data are consistent with the actual data, if so, a successful test result of the test is output; if the test results are inconsistent, outputting the test results of the test failure. Whether reporting is successful can also be judged by judging whether the original key field is consistent with the actual key field, the test is not limited to an independent protocol layer or an independent application layer any more, the test of logic correctness from different protocol data of an industrial equipment end to an application platform and the test of data accuracy of the application platform are realized, the continuity test of data from the industrial equipment to the application platform is ensured, and the linkage verification of functions in the application layer and message transmission of the protocol layer is realized.
In the above embodiments, the detailed description is given to the automated testing method based on the industrial internet, and the application further provides a corresponding embodiment of the automated testing device based on the industrial internet. It should be noted that the present application describes an embodiment of the device portion from two angles, one based on the angle of the functional module and the other based on the angle of the hardware.
Fig. 3 is a schematic diagram of an automated testing apparatus based on the industrial internet according to an embodiment of the present application, as shown in fig. 3, including:
A first obtaining module 31, configured to obtain original expected data generated by an industrial device to be tested;
The second obtaining module 32 is configured to obtain actual data output by the application platform, where the actual data is data output by the application platform after being processed by service logic of the application platform, where the to-be-tested industrial device sends the actual data to the edge gateway, and the actual data is sent by the edge gateway to the application platform;
a judging module 33, configured to judge whether the original expected data is consistent with the actual data; if the first output module 34 is consistent, the second output module 35 is triggered if the first output module 34 is inconsistent;
A first output module 34, configured to output a test result that the test is successful;
and a second output module 35, configured to output a test result of the test failure.
Specifically, the first acquiring module 31 acquires original expected data generated by the to-be-tested industrial equipment, the second acquiring module 32 acquires actual data output by the application platform, wherein the actual data is data output by the application platform after the to-be-tested industrial equipment is sent to the edge gateway and sent to the application platform by the edge gateway, and the judging module 33 judges whether the original expected data is consistent with the actual data or not after the data is processed by the service logic of the application platform; if the test results are consistent, the first output module 34 is triggered to output the test result of the test success, and if the test results are inconsistent, the second output module 35 is triggered to output the test result of the test failure. The method comprises the steps that original expected data generated by industrial equipment to be tested are sent to an edge gateway through various protocols, the edge gateway sends the data to an application platform, the data output to a user are used as actual data after being processed through business logic of the application platform, whether the original expected data are consistent after being processed through the application business logic is judged, and whether reporting is successful is judged. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.
In addition, the judgment module 33 includes: the first acquisition subunit is used for acquiring the original key field of the original expected data and the actual key field of the actual data;
and the first judging subunit is used for judging whether the original key field is consistent with the actual key field.
Further comprises:
The system comprises a creation module, a test module and a test module, wherein the creation module is used for creating a preset message queue, and the preset message queue comprises execution test time;
and the execution module is used for setting regression testing tasks according to the execution testing time so as to execute the corresponding regression testing tasks when the execution testing time arrives.
Further comprises:
And the generation module is used for generating a test report, and the test report comprises the original expected data and the actual data.
Further comprises:
the third acquisition module is used for acquiring flow test data sent to the application platform by the edge gateway;
correspondingly, the test report includes: the raw expected data, the actual data, and the flow test data.
The second acquisition module 32 includes:
the first sending subunit is used for sending an interface calling request to the application platform;
the first receiving subunit is used for receiving the return interface data of the application platform and acquiring the actual data output by the application platform according to the return interface data.
The second acquisition module 32 includes:
The second sending subunit is used for sending a database query request to the application platform;
and the second receiving subunit is used for acquiring the actual data output by the application platform from the database of the application platform after receiving the query permission instruction.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
Fig. 4 is a block diagram of another automated testing apparatus based on the industrial internet according to an embodiment of the present application, and as shown in fig. 4, the automated testing apparatus based on the industrial internet includes: a memory 40 for storing a computer program;
A processor 41 for implementing the steps of the method of acquiring user operation habit information according to the above-described embodiment (industrial internet-based automated test method) when executing a computer program.
The industrial internet-based automated testing device provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 41 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc., among others. The Processor 41 may be implemented in at least one hardware form of a digital signal Processor (DIGITAL SIGNAL Processor, DSP), a Field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a Programmable logic array (Programmable Logic Array, PLA). The processor 41 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 41 may be integrated with an image processor (Graphics Processing Unit, GPU) for rendering and rendering of content to be displayed by the display screen. In some embodiments, the processor 41 may also include an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor for processing computing operations related to machine learning.
Memory 40 may include one or more computer-readable storage media, which may be non-transitory. Memory 40 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 40 is at least used for storing a computer program 401, which, when loaded and executed by the processor 41, enables implementation of the relevant steps of the automated industrial internet-based testing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 40 may further include an operating system 402, data 403, and the like, where the storage manner may be transient storage or permanent storage. Operating system 402 may include Windows, unix, linux, among other things. The data 403 may include, but is not limited to, data related to implementing an automated industrial internet-based test method, and the like.
In some embodiments, the industrial internet-based automated test equipment may further include a display screen 42, an input-output interface 43, a communication interface 44, a power supply 45, and a communication bus 46.
Those skilled in the art will appreciate that the configuration shown in fig. 4 is not limiting of an industrial internet-based automated test equipment and may include more or fewer components than illustrated.
The automatic testing device based on the industrial Internet provided by the embodiment of the application comprises a memory and a processor, wherein the processor can realize the following method when executing a program stored in the memory: the method comprises the steps of acquiring original expected data generated by industrial equipment to be tested and actual data output by an application platform based on an automatic test method of the industrial Internet, wherein the actual data is data which is output after the industrial equipment to be tested sends the data to an edge gateway and the edge gateway sends the data to the application platform and service logic of the application platform processes the data; judging whether the original expected data is consistent with the actual data or not; if the test is consistent, judging that the test is successful; if the test fails, the test is judged to fail. The method comprises the steps that original expected data generated by industrial equipment to be tested are sent to an edge gateway through various protocols, the edge gateway sends the data to an application platform, the data output to a user are used as actual data after being processed through business logic of the application platform, whether the original expected data are consistent after being processed through the application business logic is judged, and whether reporting is successful is judged. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the above embodiments of the industrial internet-based automated test method.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The computer readable storage medium provided in this embodiment has a computer program stored thereon, which when executed by a processor, can implement the following method: the method comprises the steps of acquiring original expected data generated by industrial equipment to be tested and actual data output by an application platform based on an automatic test method of the industrial Internet, wherein the actual data is data which is output after the industrial equipment to be tested sends the data to an edge gateway and the edge gateway sends the data to the application platform and service logic of the application platform processes the data; judging whether the original expected data is consistent with the actual data or not; if the test is consistent, judging that the test is successful; if the test fails, the test is judged to fail. The method comprises the steps that original expected data generated by industrial equipment to be tested are sent to an edge gateway through various protocols, the edge gateway sends the data to an application platform, the data output to a user are used as actual data after being processed through business logic of the application platform, whether the original expected data are consistent after being processed through the application business logic is judged, and whether reporting is successful is judged. The test is not limited to an independent protocol layer or an independent application layer any more, so that the test of the logic correctness from different protocol data at the industrial equipment end to the application platform and the test of the data accuracy of the application platform are realized, the continuity test of the data from the industrial equipment to the application platform is ensured, and the linkage verification of the functions in the application layer and the message transmission of the protocol layer is realized.
The automatic test method, the automatic test device and the automatic test medium based on the industrial Internet are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (9)

1. An automated testing method based on the industrial internet is characterized by comprising the following steps:
acquiring original expected data generated by industrial equipment to be tested; the original expected data are historical data of the industrial equipment to be tested;
Acquiring actual data output by an application platform, wherein the actual data is data output after the to-be-tested industrial equipment transmits the original expected data to an edge gateway and the edge gateway transmits the original expected data to the application platform and service logic of the application platform processes the original expected data;
Judging whether the original expected data is consistent with the actual data or not;
if the test results are consistent, outputting a test result of successful test;
if the test results are inconsistent, outputting a test result of the test failure;
wherein the determining whether the original expected data is consistent with the actual data includes:
acquiring an original key field of the original expected data and an actual key field of the actual data;
judging whether the original key field is consistent with the actual key field;
If yes, judging that the original expected data is consistent with the actual data;
If not, judging that the original expected data is inconsistent with the actual data.
2. The automated industrial internet-based testing method of claim 1, wherein prior to obtaining the raw expected data generated by the industrial device to be tested, further comprising:
creating a preset message queue, wherein the preset message queue comprises execution test time;
And setting a regression test task according to the execution test time so as to execute the corresponding regression test task when the execution test time arrives.
3. The automated industrial internet-based testing method of claim 2, wherein after the determining whether the original expected data is consistent with the actual data, further comprising:
generating a test report, the test report comprising the raw expected data and the actual data.
4. The automated industrial internet-based testing method of claim 3, further comprising:
Acquiring flow test data sent to the application platform by the edge gateway;
correspondingly, the test report includes: the raw expected data, the actual data, and the flow test data.
5. An automated testing method based on the industrial internet according to any one of claims 1 to 3, wherein the obtaining actual data output by the application platform comprises:
sending an interface calling request to the application platform;
And receiving the return interface data of the application platform, and acquiring the actual data output by the application platform according to the return interface data.
6. An automated testing method based on the industrial internet according to any one of claims 1 to 3, wherein the obtaining actual data output by the application platform comprises:
Sending a database query request to the application platform;
and after receiving the query permission instruction, acquiring the actual data output by the application platform from the database of the application platform.
7. An automated testing device based on the industrial internet, comprising:
the first acquisition module is used for acquiring original expected data generated by the industrial equipment to be tested; the original expected data are historical data of the industrial equipment to be tested;
the second acquisition module is used for acquiring actual data output by the application platform, wherein the actual data is data output after the to-be-tested industrial equipment sends the original expected data to an edge gateway and the edge gateway sends the original expected data to the application platform and service logic of the application platform processes the original expected data;
The judging module is used for judging whether the original expected data are consistent with the actual data or not; if the first output module is consistent, triggering the first output module, and if the first output module is inconsistent, triggering the second output module;
the first output module is used for outputting a test result of successful test;
The second output module is used for outputting a test result of the test failure;
wherein the determining whether the original expected data is consistent with the actual data includes:
acquiring an original key field of the original expected data and an actual key field of the actual data;
judging whether the original key field is consistent with the actual key field;
If yes, judging that the original expected data is consistent with the actual data;
If not, judging that the original expected data is inconsistent with the actual data.
8. An automated testing device based on the industrial internet, comprising:
A memory for storing a computer program;
A processor for implementing the steps of the industrial internet-based automated testing method according to any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of the industrial internet-based automated test method according to any of claims 1 to 6.
CN202210915929.1A 2022-08-01 2022-08-01 Automatic testing method, device and medium based on industrial Internet Active CN115277486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210915929.1A CN115277486B (en) 2022-08-01 2022-08-01 Automatic testing method, device and medium based on industrial Internet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210915929.1A CN115277486B (en) 2022-08-01 2022-08-01 Automatic testing method, device and medium based on industrial Internet

Publications (2)

Publication Number Publication Date
CN115277486A CN115277486A (en) 2022-11-01
CN115277486B true CN115277486B (en) 2024-05-07

Family

ID=83746258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210915929.1A Active CN115277486B (en) 2022-08-01 2022-08-01 Automatic testing method, device and medium based on industrial Internet

Country Status (1)

Country Link
CN (1) CN115277486B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
WO2017156645A1 (en) * 2016-03-14 2017-09-21 Tecnologías De Aplicación Industrial Y Cia. Limitada System for testing consistency transmitters
CN108322356A (en) * 2017-01-18 2018-07-24 重庆邮电大学 A kind of industrial network gateway compatibility test method based on MQTT
CN110825632A (en) * 2019-11-01 2020-02-21 北京金山云网络技术有限公司 Method, system and device for testing cloud computing resource metering data and electronic equipment
CN112367223A (en) * 2020-10-29 2021-02-12 中国第一汽车股份有限公司 Ethernet test method, device, equipment and medium for gateway controller
CN113542058A (en) * 2021-06-25 2021-10-22 网宿科技股份有限公司 Data source returning method, server and storage medium
WO2022016847A1 (en) * 2020-07-21 2022-01-27 国云科技股份有限公司 Automatic test method and device applied to cloud platform

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10129102B2 (en) * 2016-05-11 2018-11-13 Spirent Communications, Inc. Service based testing
US10764319B2 (en) * 2017-10-05 2020-09-01 Honeywell International Inc. Intelligent automated security vulnerability detection and analysis for industrial internet of things (IIOT) devices

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707608A (en) * 2009-11-27 2010-05-12 成都市华为赛门铁克科技有限公司 Method and device for automatically testing application layer protocol
WO2017156645A1 (en) * 2016-03-14 2017-09-21 Tecnologías De Aplicación Industrial Y Cia. Limitada System for testing consistency transmitters
CN108322356A (en) * 2017-01-18 2018-07-24 重庆邮电大学 A kind of industrial network gateway compatibility test method based on MQTT
CN110825632A (en) * 2019-11-01 2020-02-21 北京金山云网络技术有限公司 Method, system and device for testing cloud computing resource metering data and electronic equipment
WO2022016847A1 (en) * 2020-07-21 2022-01-27 国云科技股份有限公司 Automatic test method and device applied to cloud platform
CN112367223A (en) * 2020-10-29 2021-02-12 中国第一汽车股份有限公司 Ethernet test method, device, equipment and medium for gateway controller
CN113542058A (en) * 2021-06-25 2021-10-22 网宿科技股份有限公司 Data source returning method, server and storage medium

Also Published As

Publication number Publication date
CN115277486A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN108647141B (en) Automatic test method, device, computer readable medium and electronic equipment
CN109685089B (en) System and method for evaluating model performance
CN107608901B (en) Jmeter-based testing method and device, storage medium and electronic equipment
CN111190596A (en) Joint debugging method and device, computer equipment and readable storage medium
CN107229566B (en) Method and system for maintaining functional consistency of SOA service conversion language
CN110347389B (en) Method, device and system for processing algorithm file
CN113485880A (en) Test method and device
CN111475412B (en) Software testing method, device, electronic equipment and computer readable storage medium
CN114594984A (en) Inspection method, inspection device, computer equipment and storage medium
CN115277486B (en) Automatic testing method, device and medium based on industrial Internet
CN113672497B (en) Method, device and equipment for generating non-buried point event and storage medium
CN114691486A (en) Program debugging method and device and computer equipment
CN111638905A (en) Version number generation method and device, electronic equipment and readable storage medium
CN112650815A (en) Method and device for synchronizing environmental data, storage medium and electronic device
CN110618881A (en) Method and system for simulating message queue
CN116627682B (en) Remote industrial information detection method and device based on shared memory
CN117252188B (en) Software image monitoring method and system based on artificial intelligence
CN111061636B (en) Automatic software testing method and device, computer equipment and storage medium
CN109445964B (en) Method and device for data transmission with SAP system in external system
CN116149272A (en) Cloud-edge cooperative production line monitoring method, device and system
CN115080979A (en) Security vulnerability management and control platform and method
CN114416585A (en) Automatic testing method and device
CN115766697A (en) File downloading method, device, equipment and storage medium
CN114840435A (en) Method, device, equipment, storage medium and program product for determining data flow direction
CN116955161A (en) Multi-terminal service testing method and device, storage medium and computer equipment

Legal Events

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