Search

CN-116204413-B - Multi-node interoperation flow test system and method based on state machine

CN116204413BCN 116204413 BCN116204413 BCN 116204413BCN-116204413-B

Abstract

The invention provides a multi-node interoperation flow test system based on a state machine and a multi-node interoperation flow test method based on the state machine. Aiming at the interoperation flow verification requirement of more interactive information among multiple nodes, the method solves the problem of interoperation verification among the multiple nodes through methods such as scene presetting, simulation, multi-role support and the like, overcomes the limitation of architecture and development language through a finite state machine model which is a basic model, expands application scenes, solves the problems of grammar layer testing and grammar layer error coverage in the verification process through extracting a general protocol analysis layer, and realizes test support and error coverage of a language layer by constructing a preset scene containing an error flow and a state machine conversion design in a mode of mapping an actual application flow and a preset flow model and displaying the difference between the actual flow and an expected result.

Inventors

  • Tang Suchun
  • Ji Xiangye
  • CHEN YING

Assignees

  • 中国舰船研究院(中国船舶集团有限公司第七研究院)

Dates

Publication Date
20260508
Application Date
20221227

Claims (7)

  1. 1. A state machine based multi-node interoperation flow test system, comprising: The data transceiver module is used for collecting test excitation information transmitted and received by each node in real time, wherein the test excitation information comprises man-machine interaction information and inter-operation information among the nodes; the data analysis module is connected with the data receiving and transmitting module and is used for carrying out grammar layer test and semantic layer test on the test excitation information, wherein the grammar layer test is used for detecting whether the format of the test excitation information meets the preset format requirement, and the semantic layer test is used for analyzing the test excitation information so as to acquire the data content, including scenes and roles, in the test excitation information; The state machine operation management module is connected with the data analysis module and is used for loading a scene library and a role library according to the analyzed data content, distributing scenes and roles for each node so that the node can execute tasks corresponding to the roles in different states and send corresponding interoperation information to other nodes; The system comprises a data analysis module, an application simulation module, a state machine operation management module and a state machine control module, wherein the data analysis module is used for acquiring test excitation information of a node, the application simulation module is connected with the data analysis module and used for carrying out language layer test on the test excitation information acquired by the node, the language layer test is used for judging whether the node can execute tasks of roles in the test excitation information in the current state; The test excitation generation module is connected with the application simulation module and the data receiving and transmitting module and is used for generating the interoperation information among the nodes according to the interoperation flow after passing the speech layer test and transmitting the interoperation information to the data receiving and transmitting module for exciting another node; and the user interface is connected with the application simulation module and used for updating and displaying the state switching condition, the grammar layer test result, the semantic layer test result and the language layer test result of each node in real time according to the execution sequence of the interoperation flow.
  2. 2. The state machine based multi-node interoperation flow test system according to claim 1, wherein, The data transceiver module is also used for formatting the test excitation information and unifying the test excitation information into a preset format.
  3. 3. The state machine based multi-node interoperation flow test system according to claim 1 or 2, wherein, The multi-node interoperation flow test system is configured as one of the multiple nodes, or the multi-node interoperation flow test system and the multiple nodes are deployed on the same physical machine.
  4. 4. A multi-node interoperation flow test method based on a state machine is characterized by comprising the following steps: Step S1, a scene library, a role library and a state machine model set are constructed and initialized, wherein the scene library is used for distributing task scenes for nodes, the role library is used for loading roles for executing tasks for the nodes, and the state machine model set is used for distributing state machines for the nodes so as to prevent the nodes from being simultaneously present in a plurality of interoperation flows and interfering with each other; step S2, receiving test excitation information, and taking a node receiving the test excitation information as a current node, wherein the test excitation information comprises man-machine interaction information and inter-operation information among the nodes; Step S3, carrying out grammar layer test and semantic layer test on the test excitation information, wherein the grammar layer test is used for detecting whether the format of the test excitation information meets the preset format requirement, the semantic layer test is used for analyzing the test excitation information to obtain data content in the test excitation information, the data content comprises scenes and roles, the scenes are used for determining interoperation flows, and the roles are used for determining executing tasks of the nodes; If the format of the test excitation information meets the preset format requirement, the step S4 is considered to be passed through the grammar layer test, if the format of the test excitation information does not meet the preset format requirement, the step S2 is considered to be failed to be returned to wait for receiving the test excitation information; Step S4, matching corresponding scenes from a scene library and matching corresponding roles from a role library for the current node according to the analyzed data content, carrying out language layer test on the data content, updating a state machine of the current node according to a language layer test result, driving the current node to execute corresponding tasks, updating the state of the current node, and sending interoperation information to other nodes; and S5, updating and displaying the state switching condition, the grammar layer test result, the semantic layer test result and the grammar layer test result of the current node.
  5. 5. The state machine based multi-node interoperation flow test method according to claim 4, wherein said step S4 comprises: According to the analyzed data content, matching corresponding scenes from a scene library and matching corresponding roles from a role library for the current node receiving the test excitation information, determining a current interoperation flow according to the scenes, and judging whether a state machine corresponding to the test excitation information exists in a state machine model set corresponding to the current interoperation flow; If the corresponding state machine does not exist, the data content is considered to belong to a new interoperation flow, the corresponding state machine is established according to the scene and the role of the current node, and the state of the current node is updated according to the established state machine; If the role of the current node in the current state is the role capable of executing the task, the current node is considered to execute the corresponding task, the state of the current node is updated according to the current interoperation flow, and the interoperation information is sent to other nodes; If the role of the current node in the current state is not the role capable of executing the task, the current node is considered to not pass the speech layer test, and the step S2 is returned to wait for receiving the test excitation information.
  6. 6. The state machine based multi-node interoperation flow test method according to claim 4 or 5, further comprising, after step S5: Step S6, judging whether the interoperation flow is finished, and if not, returning to the step S2.
  7. 7. The state machine based multi-node interoperation flow test method according to claim 4 or 5, wherein, The display content of the grammar layer test result comprises text prompt for the condition that the format of the test excitation information does not accord with the preset format requirement; The display content of the semantic layer test result comprises the step content of the interoperation flow corresponding to the scene; the display content of the language layer test result comprises the execution state of the current step in the interoperation flow, including execution completion, incomplete execution and error.

Description

Multi-node interoperation flow test system and method based on state machine Technical Field The invention relates to the technical field of interoperation test, in particular to a multi-node interoperation flow test system based on a state machine and a multi-node interoperation flow test method based on the state machine. Background Currently, there are many business process modeling languages and standards in terms of business process management and verification, with BPMN and BPEL being more widely used. BPMN is a graphical business flow representation tool which supports the configuration of a model by providing a visual interface and graphical symbols, and becomes a formal standard of OMG organization, and BPEL is an XML-based programming language for describing business processes and is mainly used for describing communication processes among Web services and combined application of the services. Meanwhile, in the aspect of the interoperation test of the business flow, the interoperation test based on the formalization method is an important field. The current common idea is to build a formalized model of the system under test using a finite state machine, perform a global state reachability analysis on it, and then generate a test sequence. However, the interoperability test is concentrated on the simple condition of one-to-one verification, and multi-node interaction test cannot be realized, so that the current business process management and verification can only aim at a single process, and is not suitable for process verification with more interactions between businesses. Disclosure of Invention In order to improve at least one of the above technical problems, an object of the present invention is to provide a multi-node interoperability flow test system based on a state machine, which is called a test system for short, for satisfying the requirement of interoperability flow verification of more interaction information among multiple nodes. In order to achieve the above objective, a multi-node interoperation flow test system based on a state machine according to a first aspect of the present invention includes a data transceiver module, a data parsing module, a state machine operation management module, an application simulation module, a test excitation generation module, and a user interface. Specifically, the data transceiver module is used for collecting test excitation information transmitted and received by each node in real time; the test excitation information comprises man-machine interaction information and inter-operation information among nodes, a data analysis module connected with the data transceiver module and used for carrying out grammar layer test and semantic layer test on the test excitation information, wherein the grammar layer test is used for detecting whether the format of the test excitation information accords with the preset format requirement or not, the semantic layer test is used for analyzing the test excitation information so as to acquire data content in the test excitation information and comprises scenes and roles, a state machine operation management module is connected with the data analysis module and used for loading a scene library and a role library according to the analyzed data content and distributing scenes and roles for each node so that the node can execute tasks corresponding to the roles under different states and send corresponding inter-operation information to other nodes, an application simulation module is connected with the data analysis module and used for carrying out layer test on the test excitation information acquired by the node, the grammar layer test is used for judging whether the roles in the test excitation information can be executed under the current state, the application simulation module is connected with a state machine operation management module and used for determining the inter-operation flow according to the scenes, and driving the state machine operation management module to carry out state switching of each node according to the state machine according to the inter-operation flow, so that the state machine operation management module can execute tasks corresponding to the roles under the state switching operation mode and realize the operation of the test excitation module under the state can be switched by the corresponding to the state machine operation management module, the system comprises an application simulation module, a test excitation generation module, a data receiving and transmitting module, a user interface and a user interface, wherein the application simulation module is used for generating a state switching condition, the test excitation generation module is connected with the application simulation module and the data receiving and transmitting module and is used for generating inter-operation information among nodes according to an inter-operation flow after passing a semantic layer test and tra