Interaction system test method and device, storage medium and computer equipment
By obtaining scene flowcharts and automated testing branches in the interactive system, the problem of low testing efficiency of interactive system in the existing technology is solved, and comprehensive coverage and efficient testing of interactive systems are achieved.
Patent Information
- Application Number
- CN202411200542.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-11-22
AI Technical Summary
The existing interactive system testing methods are difficult to fully cover business scenarios, and the testing efficiency is low, so it cannot effectively ensure the correctness and integrity of the interactive process.
By obtaining the scene flowchart of the interactive system, selecting the target message and sending it to the interactive system, determining the target node based on the target reply, forming a test branch, and using the trigger information of the test branch for automated testing until the number of iterations reaches the preset threshold. Get the test results.
A comprehensive business scenario testing of the interactive system is realized, which reduces the participation of manual testing, improves the testing efficiency and quality, and ensures the correctness and integrity of the interactive system.
Smart Images

Figure CN119003365A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing technology, and in particular to an interactive system testing method, device, storage medium and computer equipment. Background Art
[0002] With the rapid development of artificial intelligence technology, conversational interaction scenarios have been widely used in various fields. For example, intelligent customer service, intelligent shopping guides, smart homes, etc., conversational interaction systems are gradually becoming an indispensable part of people's daily lives. However, since the interactive system needs to handle various complex interaction scenarios, it is necessary to ensure the correctness and integrity of the interaction process to provide users with a high-quality service experience.
[0003] However, currently, the testing of interactive systems is generally completed by testers directly interacting with the interactive systems. This testing method is difficult to fully cover the business scenarios of the interactive system, and the testing efficiency is low. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical deficiencies, especially the technical deficiencies of interactive system testing in the prior art.
[0005] In a first aspect, the present application provides an interactive system testing method, the method comprising:
[0006] Determine an interactive system to be tested, and obtain a scenario flow chart of the interactive system;
[0007] Selecting a target message from a preset message pool, and sending the target message to the interactive system;
[0008] Obtaining a target response of the interactive system to the target message, and determining a target node in the scenario flow chart according to the target response;
[0009] Determine a test branch in the scenario flow chart according to the target node;
[0010] Acquire the trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and return to the step of selecting the target message from the preset message pool to continue executing until the number of iterations reaches a preset threshold, and obtain the test result of the test branch determined in each iteration.
[0011] In one of the embodiments, the step of determining a test branch in the scenario flow chart according to the target node includes:
[0012] According to the position of the target node in the scenario flow chart, determining each flow node corresponding to the target node; wherein the flow node is the next node pointed to by the target node in the scenario flow chart;
[0013] Determine a test node among each flow node corresponding to the target node;
[0014] The test node is determined as the next target node, and the step of returning to determine the flow nodes corresponding to the target node according to the position of the target node in the scene flow chart is continued until the currently determined test node is a leaf node in the scene flow chart, and the branch formed by the target node corresponding to each round in the scene flow chart is determined as the test branch.
[0015] In one embodiment, the step of determining a test node in each flow node corresponding to the target node includes:
[0016] Obtain the test times of each flow node corresponding to the target node;
[0017] Determine the flow node with the lowest number of tests among the flow nodes corresponding to the target node as the test node;
[0018] If there are multiple flow nodes with the lowest number of tests, a flow node is randomly selected from the flow nodes with the lowest number of tests to be determined as the test node.
[0019] In one embodiment, the step of determining a test node in each flow node corresponding to the target node includes:
[0020] A flow node is randomly selected from each flow node corresponding to the target node, and the flow node is determined as a test node.
[0021] In one of the embodiments, the step of testing the test branch using the trigger information of each node corresponding to the test branch in the interactive system includes:
[0022] Determining a node currently under test in the test branch;
[0023] Transmitting the trigger information of the previous node of the node in the test branch to the interactive system, and determining the test result of the node according to the received reply;
[0024] When the test of each node in the test branch is completed, the test result of the test branch is generated according to the test result of each node.
[0025] In one embodiment, the step of determining the target node in the scenario flow chart according to the target reply includes:
[0026] Obtain parameter information of the target response;
[0027] A node matching the parameter information of the target reply is determined in the scenario flow chart, and the node is determined as the target node.
[0028] In one embodiment, the process of creating the scenario flow chart includes:
[0029] Determining multiple business scenarios corresponding to the interactive system based on the interactive system;
[0030] For each business scenario corresponding to the interactive system, determining at least one node according to the business scenario;
[0031] According to the logical relationship of the business scenario in the interactive system, a pointing relationship between the corresponding nodes is formed;
[0032] When determining the directional relationship between each node corresponding to each business scenario of the interactive system, the interaction relationship of each business scenario in the interactive system is obtained, and combined with the directional relationship between each node corresponding to each business scenario, a scenario flow chart of the interactive system is generated.
[0033] In a second aspect, the present application provides an interactive system testing device, the device comprising:
[0034] A flowchart acquisition module is used to determine the interactive system to be tested and obtain a scenario flowchart of the interactive system;
[0035] A message determination module, used to select a target message from a preset message pool and send the target message to the interactive system;
[0036] A node determination module, used to obtain a target reply of the interactive system to the target message, and determine a target node in the scenario flow chart according to the target reply;
[0037] A branch determination module, used to determine a test branch in the scenario flow chart according to the target node;
[0038] A branch test module is used to obtain the trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and return to the step of selecting a target message from a preset message pool to continue execution until the number of iterations reaches a preset threshold, thereby obtaining the test result of the test branch determined in each iteration.
[0039] In a third aspect, the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the interactive system testing method described in any of the above embodiments.
[0040] In a fourth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0041] The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, the steps of the interactive system testing method described in any one of the above embodiments are performed.
[0042] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0043] The interactive system testing method, device, storage medium and computer equipment provided by the present application include: obtaining a scenario flowchart of the interactive system, and selecting a target message from a preset message pool, then sending the target message to the interactive system, and then obtaining a target reply of the interactive system to the target message, and determining the target node in the scenario flowchart through the target reply. Then, the test branch is determined in the scenario flowchart according to the target node, and the trigger information of each node corresponding to the test branch is obtained, so as to test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and obtain the test result of the test branch determined in each iteration when the iteration is completed. An automated testing process is set based on the scenario flowchart of the interactive system to test the test branches involved in the scenario flowchart, so that the test of the interactive system can fully cover the business scenarios of the interactive system, and the participation of manual testing can be minimized during the test process, thereby improving the efficiency and quality of the interactive system test. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 A flowchart of an interactive system testing method provided in an embodiment of the present application;
[0046] Figure 2 A schematic flow chart of the steps of determining a test branch in a scenario flow chart according to a target node provided in an embodiment of the present application;
[0047] Figure 3 A flowchart of the steps of testing a test branch using trigger information of each node corresponding to the test branch in an interactive system provided by an embodiment of the present application;
[0048] Figure 4 A schematic diagram of the process of creating a scenario flowchart provided in an embodiment of the present application;
[0049] Figure 5 An example diagram of a scenario flow chart provided for an embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of an interactive system testing device provided in an embodiment of the present application;
[0051] Figure 7 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] In one embodiment, the present application provides an interactive system testing method, and the following embodiment is described by applying the method to a server. It can be understood that the interactive system testing method can be executed by a single server or a server cluster composed of multiple servers, and the present application does not make specific restrictions on this.
[0054] like Figure 1 As shown, the present application provides an interactive system testing method, the method comprising:
[0055] Step S101: determine the interactive system to be tested, and obtain a scenario flow chart of the interactive system.
[0056] Among them, the interactive system refers to a system for interaction and communication between users and computers or other devices. The scenario flowchart is a flowchart composed of the interaction logic of the interactive system in various business scenarios. The scenario flowchart is expressed as a directed graph, in which each node represents a function or step belonging to the business scenario of the interactive system.
[0057] In this step, when an interactive system test is to be performed, the interactive system to be tested must first be determined. This process can be selected or input by the user through the client, and then the client transmits the user input information to the server. When the server receives the information, it determines the interactive system to be tested based on the information, and then obtains the scenario flow chart of the determined interactive system.
[0058] Understandably, the scene flow Figure 1 It is generally created when the interactive system is developed and gradually improved during the interactive system development process. Therefore, when testing the interactive system, the pre-set scenario flow chart can be directly obtained, and then the interactive system can be tested based on the obtained scenario flow chart.
[0059] Step S102: Select a target message from a preset message pool, and send the target message to the interactive system.
[0060] The message pool refers to a database for storing messages. The target message refers to a message used to trigger the interactive system for interaction. It can be understood that the messages stored in the message pool are problem messages pre-collected or designed by testers for the interactive system. Testers can design multiple problem messages for various business scenarios of the interactive system and store them in the message pool in advance, or they can collect questions from users received by the interactive system in the past and store the collected questions in the message pool in advance.
[0061] In this step, when testing the interactive system, it is first necessary to trigger the interactive system so that the interactive system gives feedback and allows the test to proceed. Therefore, the target message is selected from the message pool, and then the target message is sent to the interactive system to obtain the interactive system's response to the target message.
[0062] Furthermore, when selecting a target message from the message pool, a random selection strategy can be adopted, or the selected target message can be determined based on parameter information of the message in the message pool, such as the cumulative number of message selections, etc. This application does not impose any specific restrictions on this.
[0063] It is understandable that a message in the message pool can trigger one of the nodes in the scene flow chart of the interactive system, but there can be many messages in the message pool that trigger a certain node in the scene flow chart of the interactive system.
[0064] Step S103: Obtain a target response of the interactive system to the target message, and determine a target node in the scenario flow chart according to the target response.
[0065] The target node refers to the node triggered by the target message in the scenario flow chart, and the target node can be understood as the node where the current test is located. The target reply refers to the feedback information of the interactive system to the target message. It can be understood that the feedback information of the interactive system can be displayed in the form of an interactive card in the interactive system.
[0066] In this step, when the target reply of the interactive system to the target message is received, the component information and content information of the target reply can be obtained to analyze the target reply, and then determine the node (target node) triggered by the target message based on the analysis results.
[0067] Specifically, since there can be many messages in the message pool that trigger a certain node in the scene flow chart of the interactive system, and the messages in the message pool have lower requirements on the format range, but the feedback information of the interactive system is more standardized than the target message, and the difficulty of determining the target node is relatively low, therefore, the target reply of the interactive system is used in this application to determine the target node.
[0068] Step S104: Determine a test branch in the scenario flow chart according to the target node.
[0069] The test branch refers to a branch consisting of multiple nodes in the scenario flow chart. In addition, there is no fork in the test branch, that is, there is no node pointing to multiple nodes in the test branch.
[0070] In this step, the target node can be understood as the starting node of this test, that is, the target node is the first node of the test branch. After the target node is determined, the test branch is determined in the scenario flow chart with the target node as the starting point.
[0071] Step S105: Acquire trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch.
[0072] Among them, trigger information refers to the information used by the corresponding node to trigger its next node, and also refers to the information that provides feedback on the response of the interactive system. For example, after sending the target message, the target response of the interactive system is received. When an option is selected in the interactive card corresponding to the target response, a feedback information representing the option will be generated. The feedback information is used to trigger the next node of the current node, which is the trigger information of the current node.
[0073] In this step, when the test branch is determined, the configuration information corresponding to the scene flow chart can be obtained, and then the trigger information of each node corresponding to the test branch can be obtained from the configuration information of the scene flow chart, and then the test branch can be tested in the interactive system using the trigger information of each node in the test branch.
[0074] Step S106: Determine whether the number of iterations reaches a preset threshold.
[0075] The preset threshold may be determined according to the complexity of the scene flow chart of the interactive system. In one example, the preset threshold may be set to 15 by default. In this embodiment, one iteration refers to the process from step S102 to step S105.
[0076] It is understandable that a timed task can be set for the execution of this method, that is, the method is executed once every certain period of time. In this way, the process of testing the interactive system can be completed automatically, and each business scenario of the interactive system can be systematically and comprehensively tested to ensure the depth and breadth of the test, thereby improving the coverage of the test, and at the same time improving the efficiency and quality of the interactive system test.
[0077] Step S107: If not reached, return to the step of selecting a target message from a preset message pool and continue to execute.
[0078] Step S108: If reached, the test result of the test branch determined in each iteration is obtained.
[0079] The test results include passed and failed.
[0080] In this step, when the number of iterations reaches a preset threshold, the iteration is stopped, and the test results of the test branches in each iteration are obtained to complete the test of the interactive system.
[0081] The interactive system testing method, device, storage medium and computer equipment provided by the present application include: obtaining a scenario flowchart of the interactive system, and selecting a target message from a preset message pool, then sending the target message to the interactive system, and then obtaining a target reply of the interactive system to the target message, and determining the target node in the scenario flowchart through the target reply. Then, the test branch is determined in the scenario flowchart according to the target node, and the trigger information of each node corresponding to the test branch is obtained, so as to test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and obtain the test result of the test branch determined in each iteration when the iteration is completed. An automated testing process is set based on the scenario flowchart of the interactive system to test the test branches involved in the scenario flowchart, so that the test of the interactive system can fully cover the business scenarios of the interactive system, and the participation of manual testing can be minimized during the test process, thereby improving the efficiency and quality of the interactive system test.
[0082] like Figure 2As shown, in one embodiment, the step of determining the test branch in the scenario flow chart according to the target node includes:
[0083] Step S201: Determine each flow node corresponding to the target node according to the position of the target node in the scene flow chart.
[0084] The transfer node is the next node pointed to by the target node in the scene flow chart.
[0085] In this step, based on the scenario flow chart, the various flow nodes corresponding to the target node can be determined. For example, when node a in the scenario flow chart points to node b and node c, then node b and node c are the flow nodes of node a. It should be noted that the pointing here refers to direct pointing, that is, there are no other nodes on the path from node a to node b.
[0086] Step S202: determining a test node in each flow node corresponding to the target node.
[0087] In this step, it is necessary to select a flow node from each flow node corresponding to the target node, and determine the selected flow node as a test node.
[0088] Step S203: Determine whether the currently determined test node is a leaf node in the scenario flow chart.
[0089] It is understandable that when the currently determined test node is a leaf node in the scene flow chart, it means that the currently determined test node does not have the next node it points to in the scene flow chart, and this also means that the last node of the test branch is the test node. Therefore, it is necessary to judge whether the currently determined test is a leaf node in the scene flow chart.
[0090] Step S204: If not, the test node is determined as the next target node, and the process returns to the step of determining each flow node corresponding to the target node according to the position of the target node in the scenario flow chart to continue execution.
[0091] When the currently determined test node is not a leaf node in the scenario flow chart, the currently determined test node is determined as the next target node, that is, when returning to the step of determining the flow nodes corresponding to the target node according to the position of the target node in the scenario flow chart and continuing to execute, the target node at this time is the test node determined in the previous round, and then the corresponding flow nodes are determined according to this new target node.
[0092] Step S205: If yes, determine the branch formed by the target node corresponding to each round in the scenario flow chart as a test branch.
[0093] When the currently determined test node is a leaf node in the scene flow chart, it means that the currently determined test node does not point to the next node in the scene flow chart. At this time, the branch formed by the target node corresponding to each round in the scene flow chart is determined as the test branch.
[0094] It can be understood that by determining the test branch through the scenario flow chart and the target node determined at the beginning, the testing process of the interactive system can be simplified and systematized, so that the interactive system can be tested comprehensively to improve the coverage and quality of the test, and the entire testing process adopts automated testing to reduce manual participation, thereby improving the efficiency of the test.
[0095] In another embodiment, the test branch may also be determined according to a test path specified by a user, so as to implement a customized test task, thereby improving the flexibility of testing the interactive system.
[0096] In one embodiment, the step of determining the test node in each flow node corresponding to the target node includes:
[0097] Get the test times of each flow node corresponding to the target node;
[0098] Determine the flow node with the lowest number of tests among the flow nodes corresponding to the target node as the test node;
[0099] If there are multiple flow nodes with the lowest number of tests, a flow node is randomly selected from the flow nodes with the lowest number of tests to be determined as the test node.
[0100] Specifically, each node in the scenario flow chart has a corresponding test number. When a node is selected as one of the nodes in the test branch, the test number of the node is increased by one.
[0101] In this embodiment, the test times of each flow node corresponding to the target node are obtained, and then the test node is determined in each flow node according to the test times. In addition, the process node with the lowest test times is determined as the test node. This process can balance the test weight of each business scenario in the interactive system, comprehensively and evenly test each business scenario of the interactive system, and also help to reasonably allocate test resources, thereby improving the overall test efficiency.
[0102] In one embodiment, the step of determining the test node in each flow node corresponding to the target node includes:
[0103] A flow node is randomly selected from each flow node corresponding to the target node, and the flow node is determined as a test node.
[0104] In this embodiment, determining the test nodes by random selection can improve the objectivity of determining the test branches, and can cover as much as possible the parts that are easily overlooked in the traditional test method, thereby improving the reliability of the test.
[0105] like Figure 3 As shown, in one embodiment, the step of testing the test branch using the trigger information of each node corresponding to the test branch in the interactive system includes:
[0106] Step S301: determine the node currently being tested in the test branch.
[0107] It is understandable that, since the test branch is a branch composed of multiple nodes having a directional relationship, each node of the test branch can be tested in sequence according to the order of the directional relationship. In this step, the node to be tested in the test branch needs to be determined.
[0108] Step S302: Transmit the trigger information of the previous node of the node in the test branch to the interactive system, and determine the test result of the node according to the received reply.
[0109] In this step, the trigger information of the previous node of the node currently under test in the test branch is transmitted to the interactive system, thereby triggering the node currently under test, and then determining the test result of the node based on the feedback of the interactive system to the trigger information. In this process, the first node of the test branch is triggered by the target message, and the other nodes are triggered by the trigger information of their previous node.
[0110] Specifically, each node is pre-set with an expected response, and the test result of the node is determined by comparing the feedback of the interactive system with the expected response of the node.
[0111] Step S303: When the test of each node in the test branch is completed, the test result of the test branch is generated according to the test result of each node.
[0112] In this step, after each node in the test branch is tested, the test result of the test branch is generated according to the test result of each node.
[0113] It is understandable that by testing each node of the test branch one by one, the test of the interactive system can be abstracted into a test branch, thereby testing a single interactive logic in the interactive system, simplifying the test process to improve the efficiency of testing the interactive system.
[0114] In one embodiment, the step of determining the target node in the scenario flow chart according to the target response includes:
[0115] Get the parameter information of the target reply;
[0116] A node matching the parameter information of the target reply is determined in the scenario flow chart, and the node is determined as the target node.
[0117] The parameter information refers to the settings used to control the display or behavior of the target reply, including but not limited to content data, style and layout information, interaction information, etc.
[0118] In this embodiment, the parameter information of the target reply is obtained to match each node in the scene flow chart, and then the node that successfully matches is determined as the target node. Specifically, the parameter information can be semantically matched with the information of each node in the scene flow chart to determine the node in the scene flow chart that matches the parameter information.
[0119] It can be understood that the current node is determined by the parameter information replied by the target, and then the test branch to be tested this time can be determined according to the node to complete the test of the test branch in the interactive system.
[0120] like Figure 4 As shown, in one embodiment, the process of creating a scene flow chart includes:
[0121] Step S401: Determine multiple business scenarios corresponding to the interactive system based on the interactive system.
[0122] The business scenario is used to describe the applied scenario and the functions or steps completed in the scenario.
[0123] Step S402: for each business scenario corresponding to the interactive system, determine at least one node according to the business scenario.
[0124] Among them, the nodes represent the functional modules divided by business scenarios.
[0125] In this step, for a certain business scenario, its functions can be analyzed to determine at least one functional module to form at least one node.
[0126] Step S403: forming a pointing relationship between corresponding nodes according to the logical relationship of the business scenario in the interactive system.
[0127] Among them, the logical relationship refers to the sequential relationship between functional steps in a business scenario.
[0128] For example, assuming that business scenario A is a product comparison scenario, business scenario A is divided into three nodes, namely, a product adding node, a dimension selection node and a product comparison result node. At this time, according to the logical relationship of business scenario A (first add the product, then select the dimension to be compared, and finally obtain the comparison result of the added product on the selected dimension), it can be determined that the product adding node points to the dimension selection node, and the dimension selection node points to the product comparison result node.
[0129] Step S404: When determining the pointing relationship between the nodes corresponding to each business scenario of the interactive system, obtain the interactive relationship of each business scenario in the interactive system, and generate a scenario flow chart of the interactive system in combination with the pointing relationship between the nodes corresponding to each business scenario.
[0130] Among them, the interactive relationship refers to the data dependency relationship between different business scenarios.
[0131] In this step, when determining the pointing relationship between each node of each business scenario, it is also necessary to connect the nodes contained in each business scenario together, thereby obtaining the interaction relationship of each business scenario in the interactive system, and then combining the pointing relationship between each node corresponding to each business scenario to generate a scenario flow chart of the interactive system.
[0132] It can be understood that by analyzing the various business scenarios involved in the interactive system and then creating its corresponding scenario flowchart, the interactive system can be tested in a systematic and visual manner based on the scenario flowchart, so that the test can cover all scenarios of the interactive system as much as possible, thereby improving the quality and efficiency of the test.
[0133] In one embodiment, the interactive system testing method further includes:
[0134] The test results of the test branches determined in each iteration are visualized.
[0135] In this embodiment, the test results are sent to the client so that the client can visualize the test results of each test branch, which can enable the tester to intuitively understand the test results of the interactive system and improve the intelligence level of the interactive system test.
[0136] In one example, if Figure 5 As shown, Figure 5 This is an example diagram of a scenario flow chart provided in an embodiment of the present application. Each block in the diagram corresponds to a node, where a hot question can generate trigger information by clicking on it to trigger the next node. Demand drill-down means that after the user's trigger information is fed back, some related interactive information will be automatically generated.
[0137] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0138] The interactive system testing device provided in an embodiment of the present application is described below. The interactive system testing device described below and the interactive system testing method described above can refer to each other.
[0139] like Figure 6 As shown, the present application provides an interactive system testing device 500, the device comprising:
[0140] A flowchart acquisition module 501 is used to determine the interactive system to be tested and acquire a scenario flowchart of the interactive system;
[0141] A message determination module 502, configured to select a target message from a preset message pool and send the target message to the interactive system;
[0142] The node determination module 503 is used to obtain a target reply of the interactive system to the target message, and determine a target node in the scenario flow chart according to the target reply;
[0143] A branch determination module 504, used to determine a test branch in the scenario flow chart according to a target node;
[0144] The branch test module 505 is used to obtain the trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and return to the step of selecting the target message from the preset message pool to continue execution until the number of iterations reaches a preset threshold, and obtain the test result of the test branch determined in each iteration.
[0145] In one embodiment, the branch determination module includes:
[0146] The first determination submodule is used to determine each flow node corresponding to the target node according to the position of the target node in the scene flow diagram; wherein the flow node is the next node pointed to by the target node in the scene flow diagram;
[0147] A second determination submodule is used to determine a test node among each flow node corresponding to the target node;
[0148] The branch determination submodule is used to determine the test node as the next target node, and return to the step of determining the flow nodes corresponding to the target node according to the position of the target node in the scene flow chart to continue execution until the currently determined test node is a leaf node in the scene flow chart, and the branch formed by the target node corresponding to each round in the scene flow chart is determined as the test branch.
[0149] In one embodiment, the second determining submodule includes:
[0150] A times acquisition unit, used to acquire the test times of each flow node corresponding to the target node;
[0151] A first determining unit is used to determine the flow node with the lowest number of tests among the flow nodes corresponding to the target node as a test node;
[0152] The second determining unit is used to randomly select a flow node from the flow nodes with the lowest test times as a test node if there are multiple flow nodes with the lowest test times.
[0153] In one embodiment, the second determining submodule includes:
[0154] The third determination unit is used to randomly select a flow node from each flow node corresponding to the target node, and determine the flow node as a test node.
[0155] In one embodiment, the branch circuit testing module includes:
[0156] A test node determination submodule is used to determine the node currently being tested in the test branch;
[0157] A result determination submodule, used to transmit the trigger information of the previous node of the node in the test branch to the interactive system, and determine the test result of the node according to the received reply;
[0158] The result generating submodule is used to generate the test result of the test branch according to the test result of each node when the test on each node in the test branch is completed.
[0159] In one embodiment, the node determination module includes:
[0160] The information acquisition submodule is used to obtain parameter information of the target reply;
[0161] The target node determination submodule is used to determine a node in the scenario flow chart that matches the parameter information of the target reply, and determine the node as the target node.
[0162] In one embodiment, the interactive system testing device further includes:
[0163] A scenario determination module, used to determine multiple business scenarios corresponding to the interactive system based on the interactive system;
[0164] A determination module, configured to determine at least one node for each business scenario corresponding to the interactive system according to the business scenario;
[0165] A relationship generation module is used to form a directional relationship between the corresponding nodes according to the logical relationship of the business scenario in the interactive system;
[0166] The flowchart generation module is used to obtain the interaction relationship of each business scenario in the interactive system when determining the directional relationship between the nodes corresponding to each business scenario of the interactive system, and generate a scenario flowchart of the interactive system in combination with the directional relationship between the nodes corresponding to each business scenario.
[0167] The division of each module in the above interactive system test device is only for illustration. In other embodiments, the interactive system test device can be divided into different modules as needed to complete all or part of the functions of the above interactive system test device. Each module in the above interactive system test device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0168] In one embodiment, the present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the interactive system testing method described in any of the above embodiments.
[0169] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the interactive system testing method as described in any one of the above embodiments.
[0170] Indicatively, if Figure 7 As shown, Figure 7 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 600 may be provided as a server. Figure 7The computer device 600 includes a processing component 602, which further includes one or more processors, and a memory resource represented by a memory 601 for storing instructions executable by the processing component 602, such as an application. The application stored in the memory 601 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 602 is configured to execute the instructions to perform the interactive system testing method of any of the above embodiments.
[0171] The computer device 600 may further include a power supply component 603 configured to perform power management of the computer device 600, a wired or wireless network interface 604 configured to connect the computer device 600 to a network, and an input / output (I / O) interface 605. The computer device 600 may operate based on an operating system stored in the memory 601, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0172] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0173] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, the singular "one", "one" and "described / the" may also include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "include / comprise" or "have" etc. specify the existence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the existence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.
[0174] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0175] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An interactive system testing method, characterized in that: The method comprises: Determine an interactive system to be tested, and obtain a scenario flow chart of the interactive system; Selecting a target message from a preset message pool, and sending the target message to the interactive system; Obtaining a target response of the interactive system to the target message, and determining a target node in the scenario flow chart according to the target response; Determine a test branch in the scenario flow chart according to the target node; Acquire the trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and return to the step of selecting the target message from the preset message pool to continue executing until the number of iterations reaches a preset threshold, and obtain the test result of the test branch determined in each iteration.
2. The interactive system testing method according to claim 1, characterized in that: The step of determining a test branch in the scenario flow chart according to the target node comprises: According to the position of the target node in the scenario flow chart, determining each flow node corresponding to the target node; wherein the flow node is the next node pointed to by the target node in the scenario flow chart; Determine a test node among each flow node corresponding to the target node; The test node is determined as the next target node, and the step of returning to determine the flow nodes corresponding to the target node according to the position of the target node in the scene flow chart is continued until the currently determined test node is a leaf node in the scene flow chart, and the branch formed by the target node corresponding to each round in the scene flow chart is determined as the test branch.
3. The interactive system testing method according to claim 2, characterized in that: The step of determining a test node in each flow node corresponding to the target node includes: Obtain the test times of each flow node corresponding to the target node; Determine the flow node with the lowest number of tests among the flow nodes corresponding to the target node as the test node; If there are multiple flow nodes with the lowest number of tests, a flow node is randomly selected from the flow nodes with the lowest number of tests to be determined as the test node.
4. The interactive system testing method according to claim 2, characterized in that: The step of determining a test node in each flow node corresponding to the target node includes: A flow node is randomly selected from each flow node corresponding to the target node, and the flow node is determined as a test node.
5. The interactive system testing method according to claim 1, characterized in that: The step of testing the test branch by using the trigger information of each node corresponding to the test branch in the interactive system includes: Determining a node currently under test in the test branch; Transmitting the trigger information of the previous node of the node in the test branch to the interactive system, and determining the test result of the node according to the received reply; When the test of each node in the test branch is completed, the test result of the test branch is generated according to the test result of each node.
6. The interactive system testing method according to claim 1, characterized in that: The step of determining the target node in the scenario flow chart according to the target reply comprises: Obtain parameter information of the target response; A node matching the parameter information of the target reply is determined in the scenario flow chart, and the node is determined as the target node.
7. The interactive system testing method according to any one of claims 1 to 6, characterized in that: The process of creating the scenario flow chart includes: Determining multiple business scenarios corresponding to the interactive system based on the interactive system; For each business scenario corresponding to the interactive system, determining at least one node according to the business scenario; According to the logical relationship of the business scenario in the interactive system, a pointing relationship between the corresponding nodes is formed; When determining the directional relationship between each node corresponding to each business scenario of the interactive system, the interaction relationship of each business scenario in the interactive system is obtained, and combined with the directional relationship between each node corresponding to each business scenario, a scenario flow chart of the interactive system is generated.
8. An interactive system testing device, characterized in that: The device comprises: A flowchart acquisition module is used to determine the interactive system to be tested and obtain a scenario flowchart of the interactive system; A message determination module, used to select a target message from a preset message pool and send the target message to the interactive system; A node determination module, used to obtain a target reply of the interactive system to the target message, and determine a target node in the scenario flow chart according to the target reply; A branch determination module, used to determine a test branch in the scenario flow chart according to the target node; A branch test module is used to obtain the trigger information of each node corresponding to the test branch, and test the test branch in the interactive system using the trigger information of each node corresponding to the test branch, and return to the step of selecting a target message from a preset message pool to continue execution until the number of iterations reaches a preset threshold, thereby obtaining the test result of the test branch determined in each iteration.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the interactive system testing method as described in any one of claims 1 to 7.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the interactive system testing method according to any one of claims 1 to 7 are performed.
