CN117194221A - Test method, test device, computer equipment and storage medium - Google Patents

Test method, test device, computer equipment and storage medium Download PDF

Info

Publication number
CN117194221A
CN117194221A CN202310964535.XA CN202310964535A CN117194221A CN 117194221 A CN117194221 A CN 117194221A CN 202310964535 A CN202310964535 A CN 202310964535A CN 117194221 A CN117194221 A CN 117194221A
Authority
CN
China
Prior art keywords
flow
standard
result
tested
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310964535.XA
Other languages
Chinese (zh)
Inventor
吴滢
俞科峰
李嫚
胡颖茂
张利平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp 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 China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202310964535.XA priority Critical patent/CN117194221A/en
Publication of CN117194221A publication Critical patent/CN117194221A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The present application relates to a test method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a flow mark to be tested; according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result; executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested; and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result. By adopting the method, the test efficiency can be improved.

Description

Test method, test device, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technology, and in particular, to a test method, apparatus, computer device, storage medium, and computer program product.
Background
IVVR (Interactive Voice and Video Response ), is a brand new wireless voice and video response value-added service, and mobile phone users obtain required information or participate in interactive services, such as video on demand (including live broadcast), video mailbox, video click (optional), video short message (optional), video monitoring and video uploading by dialing a designated number.
Before the IVVR service flow is used on line, the IVVR service flow needs to be subjected to configuration, auditing, testing and other flows, wherein the testing of the IVVR service flow is an important work. In the traditional technology, each function is tested by manually making a call, the testing workload is huge, and the testing efficiency is lower.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve test efficiency.
In a first aspect, the present application provides a test method. The method comprises the following steps:
acquiring a flow mark to be tested;
according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested;
and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
In one embodiment, before the standard flow corresponding to the flow identifier to be tested in the test case library is obtained according to the flow identifier to be tested, the method further includes:
And responding to the trigger of completing the configuration of the target file, analyzing the flow chart in the target file to obtain the standard flow in the test case library and the standard result corresponding to the standard flow.
In one embodiment, the parsing the flowchart in the target file to obtain the standard flow in the test case library includes:
acquiring a start node and an end node in the flow chart;
searching the shortest path from the initial node to each end node to obtain a target flow path;
identifying the semantics corresponding to each node in each target flow path to obtain node semantics;
and determining a standard flow corresponding to the target flow path according to the node semantics.
In one embodiment, the determining, according to the node semantics, a standard flow corresponding to the target flow path includes:
converting the node semantics into corresponding description sentences according to preset sentence rules;
and combining the description sentences corresponding to each node in the target flow path according to the node sequence in the target flow path to obtain the standard flow corresponding to the target flow path.
In one embodiment, the updating the standard result corresponding to the standard flow in the test case library to obtain an updated standard result includes:
based on the interface configured by the standard flow, acquiring real-time data of a standard result corresponding to the standard flow from a server;
and updating the standard result through the real-time data to obtain an updated standard result.
In one embodiment, the determining, according to the target result and the updated standard result, a test result corresponding to the flow identifier to be tested includes:
matching the target result with the updated standard result;
under the condition that the target result is completely matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is passing;
and under the condition that at least one target result is not matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is not passed.
In one embodiment, the method further comprises:
under the condition that the target result is not matched with the updated standard result, matching the target result with an optimization use case in an optimization library;
If the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result.
In one embodiment, the standard flow corresponding to the identifier to be tested includes at least one sub-flow; the method further comprises the steps of:
and generating a test report and outputting according to the sub-test result corresponding to the sub-flow and the test result corresponding to the flow identification to be tested.
In a second aspect, the application further provides a testing device. The device comprises:
the identification acquisition module is used for acquiring the flow identification to be tested;
the data updating module is used for acquiring a standard flow corresponding to the flow identifier to be tested in a test case library according to the flow identifier to be tested, updating a standard result corresponding to the standard flow in the test case library, and obtaining an updated standard result;
the flow test module is used for executing the steps corresponding to the standard flow and obtaining a target result corresponding to the flow identifier to be tested;
and the test result module is used for determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a flow mark to be tested;
according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested;
and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a flow mark to be tested;
according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
Executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested;
and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring a flow mark to be tested;
according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested;
and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
According to the testing method, the device, the computer equipment, the storage medium and the computer program product, the standard flow corresponding to the flow identifier to be tested in the test case library is obtained according to the flow identifier to be tested, the standard result corresponding to the test flow in the test case library is updated to obtain the updated standard result, the operation corresponding to the standard flow is executed to obtain the target result corresponding to the flow identifier to be tested, and the testing result corresponding to the flow identifier to be tested is determined according to the target result and the updated standard result, so that the operation flow corresponding to the identifier to be tested is automatically tested, and the testing efficiency is improved; in addition, the standard flow in the test case library acquired based on the to-be-tested identifier is operated to obtain a target result, and the test result corresponding to the to-be-tested flow identifier can be accurately determined through the obtained target result and the standard result, so that the accuracy of the test result is improved.
Drawings
FIG. 1 is a diagram of an application environment for a test method in one embodiment;
FIG. 2 is a flow chart of a test method in one embodiment;
FIG. 3 is a schematic diagram of an analysis flow of a standard flow in one embodiment;
FIG. 4 is a flow chart of a testing method according to another embodiment;
FIG. 5 is a flow chart of a testing method according to another embodiment;
FIG. 6 is a block diagram of a test apparatus in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The test method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 acquires the flow identifier to be tested from the terminal 102, acquires a standard flow corresponding to the flow identifier to be tested in the test case library according to the flow identifier to be tested, and updates a standard result corresponding to the standard flow in the test case library to obtain an updated standard result; executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested; and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
It should be noted that, the embodiments of the present application may also be implemented directly by a server, which is not limited herein.
In one embodiment, as shown in fig. 2, a test method is provided, and the method is applied to the server in fig. 1, for example, and includes the following steps 202 to 208.
Step 202, obtaining a flow identifier to be tested.
The flow identifier to be tested is an identifier corresponding to the flow to be tested, and the flow to be tested can be a preset flow, or can be a test flow obtained through an interface or an interface, and the flow identifier to be tested can be a preset flow identifier or a test flow identifier input by a user. The flow identification to be tested is used for uniquely identifying the corresponding flow to be tested, and the flow identifications corresponding to different test flows are different.
Alternatively, the preset flow identifier may be obtained from a preset storage location of the server, and used as the flow identifier to be tested, for example, the preset flow identifier is a flow identifier corresponding to a flow that is relatively important in all the flow identifiers, or is a flow identifier corresponding to a flow that is relatively easy to make an error.
Alternatively, the to-be-tested process identifier input by the user may be obtained from the server interaction interface or the interaction interface, and the to-be-tested process identifier obtained each time may be different.
Step 204, according to the flow identifier to be tested, obtaining a standard flow corresponding to the flow identifier to be tested in the test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result.
The server acquires a standard flow corresponding to the flow identifier to be tested in the test case library according to the flow identifier to be tested, and updates a standard result corresponding to the standard flow in the test case library to obtain an updated standard result. The test case library comprises test flow identifiers, standard flows and standard results, wherein the test flow identifiers have one-to-one correspondence with the standard flows and the standard results. The test case library can be obtained through manual collection and arrangement, and also can be obtained through analysis of test files.
Illustratively, after the flow identifier to be tested is obtained, searching the test flow identifier which is the same as the flow identifier to be tested from the test case library, obtaining a standard flow and a standard result corresponding to the test flow identifier, and updating the standard result in the test case library to obtain an updated standard result. It will be appreciated that the value corresponding to the standard result corresponding to the standard flow may change, for example, the value of the telephone charge balance corresponding to the telephone number may change with time, so that the standard result needs to be updated to ensure that the value of the standard result is the actual value of the current standard result.
Alternatively, the actual data of the standard result corresponding to the standard flow may be obtained from the server based on the interface configured by the standard flow. In this embodiment, the actual data of the standard result in the server is the data updated in real time, and the data of the standard result in the test case library is not necessarily the data updated in real time.
And 206, executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested.
In this embodiment, the server performs a corresponding operation according to the standard flow simulation, so as to obtain a target result corresponding to the flow identifier to be tested. In an example, the flow identifier to be tested is a flow identifier in the IVVR, and the operation corresponding to the IVVR standard flow can be executed through the corresponding script to obtain a target result corresponding to the corresponding operation, for example, single-pass call simulation or concurrent call simulation is implemented by using the simulated incoming call script, single-pass call means that only one number triggers the IVVR at the same time, and concurrent call means that multiple numbers trigger the IVVR at the same time.
Optionally, one or more target results may be obtained for a standard flow corresponding to a flow identifier to be tested, where the target results include a staged result and a final result of the standard flow in the execution process. In one example, when each step is executed, the target standard procedure in the IVVR may obtain a corresponding sub-target result, and after the target standard procedure is executed, a final target result may be obtained, and the video broadcast result may be obtained, where the target result includes the sub-target result, the final target result, the broadcast result, and the like. The target result may include indicators of a flow execution duration, a response speed, an execution result, and the like.
And step 208, determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
Optionally, a test result corresponding to the flow identifier to be tested can be determined according to the matching condition between the target result and the updated standard result. Under the condition that the target result is matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is passing; and under the condition that the target result is not matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is that the test is not passed, namely that the test result is abnormal.
Optionally, after determining the test result corresponding to the flow identifier to be tested, outputting a test report corresponding to the flow identifier to be tested, where the test report may include the flow identifier and a target result corresponding to the flow identifier, a matching condition of the target result and the standard result, and an abnormal result.
In the test method, the process identification to be tested is obtained; according to the flow identification to be tested, acquiring a standard flow corresponding to the flow identification to be tested in the test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result; executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested; according to the target result and the updated standard result, determining a test result corresponding to the flow mark to be tested, so that automatic test can be realized, the test efficiency is improved, and the labor cost is reduced; in addition, the operation is performed based on the standard flow corresponding to the flow identification to be tested, the obtained target result can reflect the real operation result, the final test result is more accurate, and therefore the test accuracy is improved.
In some embodiments, obtaining a to-be-tested flow identifier at intervals of a preset duration, obtaining a standard flow corresponding to the to-be-tested flow identifier in a test case library according to the to-be-tested flow identifier, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result; executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested; and determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result, so as to realize the periodic test of the flow corresponding to the flow identifier to be tested, and ensure the accurate operation of the flow.
In one embodiment, before the standard flow corresponding to the flow identifier to be tested in the test case library is obtained according to the flow identifier to be tested, the method further includes: and responding to the trigger of completing the configuration of the target file, analyzing the flow chart in the target file to obtain the standard flow in the test case library and the standard result corresponding to the standard flow.
In this embodiment, when the configuration of the target file is completed, the target file is triggered to be parsed, so as to obtain a standard test flow in the test case library and a corresponding standard result. The object file may be understood as an executable program or a component corresponding to an object to be tested, such as an IVVR.
Optionally, the standard execution flow in the target file may be parsed to obtain a corresponding standard flow and a standard result corresponding to the standard flow, for example, the operation flow chart corresponding to the target file may be parsed to obtain one or more standard flows and a corresponding standard result.
In the above embodiment, in response to the trigger of completing the configuration of the target file, the flow chart in the target configuration file is parsed to obtain the standard flow in the test case library and the standard result corresponding to the standard flow, so that the target configuration file can be automatically parsed to obtain the standard flow and the standard result, the labor is saved, the labor cost is reduced, and the test efficiency is improved.
In one embodiment, a schematic diagram of the analysis flow of the standard flow is shown in fig. 3, and the flow chart in the target file is analyzed to obtain the standard flow in the test case library, which includes the following steps 302 to 308.
Step 302, a start node and an end node in the flowchart are acquired.
The flow chart comprises a starting node and a plurality of end nodes, wherein only child nodes are arranged in the starting node, no parent node is arranged in the starting node, and only parent nodes are arranged in the end nodes, and no child nodes are arranged in the end nodes, so that the starting node and the end nodes can be determined according to the child node condition and the parent node condition of each node in the flow chart.
Alternatively, each node in the flow chart may be identified, and after determining the start node and the end node, the start node identifier and the end node identifier may be obtained.
Step 304, searching the shortest path from the start node to each end node to obtain the target flow path.
From the start node, there may be multiple paths to each end node, and the shortest path is selected as the target flow path. Optionally, for a plurality of paths between the start node and a certain end node, counting the number of nodes passing through each path, and selecting a path with the minimum number of nodes as a target flow path.
And step 306, identifying the semantics corresponding to each node in each item label flow path to obtain the node semantics.
In this embodiment, the server identifies the semantics corresponding to each node in each target flow path, and obtains the node semantics. It will be appreciated that the semantics corresponding to the nodes may be identified using existing methods of semantic identification, which are not specifically limited herein.
Step 308, determining a standard flow corresponding to the target flow path according to the node semantics.
The server can determine the standard flow corresponding to the target flow path according to the node semantics. The node semantics of all the nodes in the target flow path are arranged according to the node sequence, so that the standard flow corresponding to the target flow path can be obtained, and each target flow path can correspond to one flow identifier.
In this embodiment, by acquiring the start node and the end node in the flowchart, searching the shortest path from the start node to each end node to obtain the target flow path, identifying the semantics corresponding to each node in each target flow path to obtain the node semantics, and determining the standard flow corresponding to the target flow path according to the node semantics, the standard flow corresponding to the target file can be automatically and accurately obtained, so that the test efficiency and the accuracy of the test result can be improved.
In some embodiments, determining the standard flow corresponding to the target flow path according to the node semantics includes: converting the node semantics into corresponding description sentences according to preset sentence rules; and combining the description sentences corresponding to each node in the target flow path according to the node sequence in the target flow path to obtain the standard flow corresponding to the target flow path.
In this embodiment, according to a preset statement rule, the node semantics are converted into corresponding description statements, and according to the node sequence in the target flow path, the description statements corresponding to each node in the target flow path are combined to obtain the standard flow corresponding to the target flow path. In one example, the semantics of the node 1 is "select sequence number, 1-function a, 2-function B, 3-function C", and then the conversion of the node 1 into the corresponding description sentence may be "function a please press 1, function B please press 2, function C please press 3".
And combining the description sentences corresponding to the nodes from the start node to the end node in the target flow path according to the node sequence of the target flow path, so that the standard flow corresponding to the target flow path can be obtained.
In the above embodiment, the node semantics are converted into the corresponding description sentences according to the preset sentence rules; according to the node sequence in the target flow path, combining the description sentences corresponding to each node in the target flow path to obtain the standard flow corresponding to the target flow path, so that the standard flow corresponding to the target flow path can be obtained quickly and accurately, and the test efficiency is improved.
In some embodiments, updating a standard result corresponding to a standard flow in a test case library to obtain an updated standard result includes: based on an interface configured by the standard flow, acquiring real-time data of a standard result corresponding to the standard flow from a server; and updating the standard result through real-time data to obtain an updated standard result.
In this embodiment, a plurality of interfaces are configured in the standard flow, and corresponding data can be obtained from the server through each interface, and meanwhile, the execution condition and the execution result of the standard flow corresponding to the interface can also be obtained from the interface. Based on the interface configured by the standard flow, the real-time data of the standard result corresponding to the standard flow is obtained from the server, which can be understood as the real-time data of the standard result obtained from the background server. And updating the standard result in the test case library through the acquired real-time data to obtain an updated standard result.
In the above embodiment, based on the interface configured by the standard flow, real-time data of the standard result corresponding to the standard flow is obtained from the server; the standard result is updated through the real-time data, the updated standard result is obtained, and the accuracy of the standard result in the test case library can be ensured, so that the accuracy of the test result is improved.
In one embodiment, determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result includes: matching the target result with the updated standard result; under the condition that the target result is completely matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is passing; and under the condition that at least one item mark result is not matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is not passed.
In this embodiment, the target result is matched with the updated standard result, where the target result may include an execution condition and an execution result of the corresponding standard flow, the execution condition includes, for example, whether the operation flow is running normally, whether an abnormal condition of stopping halfway occurs, the execution result includes whether the execution result exists, if the execution result exists, whether the execution result is accurate, whether the execution result has delay, and the execution result further includes a staged result in the execution process of the standard flow. The target results may also include interface performance conditions configured by the standard flow, such as interface anomalies, interface data acquisition delays, and so forth.
In this embodiment, the target result includes a plurality of updated standard results corresponding to the target result. Under the condition that the target result is completely matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is passing; under the condition that at least one item mark result is not matched with the updated standard result, determining that the test result corresponding to the to-be-tested flow mark is not passed, thereby improving the accuracy judgment requirement of the test result and improving the accuracy of the test.
In some embodiments, matching the target result with the optimization use cases in the optimization library in the case that the target result does not match the updated standard result; if the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result.
In this embodiment, an optimization policy is set to optimize a standard flow with an exception, and an optimization case and an optimization policy corresponding to the optimization case are stored in an optimization library. Under the condition that the target result is not matched with the updated standard result, matching the target result with an optimization use case in an optimization library; if the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result. Optionally, when the target result is the same as the optimization use case in the optimization library, confirming that the target result is matched with the optimization use case, and optimizing the standard flow by using an optimization strategy corresponding to the matched optimization use case.
In one example, the target result is that the execution duration of the standard flow is 10 seconds, the updated standard result is 5 seconds, the target result is not matched with the updated standard result, the execution duration is delayed too long, the target result is matched with an optimization use case in the optimization library, if the target result is matched with the optimization use case, the standard flow is optimized by using an optimization strategy corresponding to the optimization use case, and the corresponding optimization strategy can be to reduce the number of steps corresponding to the standard flow, so that the execution duration delay is reduced or avoided.
Optionally, in the case that the target result does not match the optimization use case, the reason for the mismatch with the standard result may be determined by performing machine learning algorithm analysis on the target result, determining a corresponding optimization direction, and giving a corresponding optimization suggestion according to the optimization direction.
In the above embodiment, when the target result does not match with the updated standard result, the target result is matched with the optimization case in the optimization library; if the target result is matched with the optimization use case, the standard flow is optimized by using an optimization strategy corresponding to the optimization use case to obtain an optimization result, and the standard flow corresponding to the target result which is not matched with the standard result can be automatically optimized, so that the condition that the target result is not matched with the standard result is reduced, and the test efficiency is improved.
In some embodiments, the standard flow corresponding to the identity to be tested includes at least one sub-flow; the method further comprises the steps of: and generating a test report and outputting according to the sub-test result corresponding to the sub-process and the test result corresponding to the process identification to be tested.
In this embodiment, the standard flow corresponding to the identifier to be tested includes at least one sub-flow, where each sub-flow corresponds to a sub-test result, and the sub-flow may be an operation step in the standard flow. And generating a test report and outputting according to the sub-test result corresponding to the sub-process and the test result corresponding to the process identification to be tested.
Optionally, the test report may include a test result corresponding to the standard flow, a subtest result corresponding to the sub-flow, and an interface performance condition configured by the standard flow. Optionally, the test report may further include an optimization result or an optimization suggestion for the standard flow.
In the above embodiment, according to the sub-test result corresponding to the sub-flow and the test result corresponding to the flow identifier to be tested, the test report is generated and output, so that the test report is more accurate and complete, and the interaction performance with the user is improved.
In one embodiment, as shown in FIG. 4, the test method includes the following steps 402 through 412.
And step 402, responding to the trigger of completing the configuration of the target file, analyzing the flow chart in the target file, and obtaining the standard flow in the test case library and the standard result corresponding to the standard flow.
Step 404, obtaining the flow identifier to be tested.
Step 406, according to the flow identifier to be tested, obtaining a standard flow corresponding to the flow identifier to be tested in the test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result.
And step 408, executing the operation corresponding to the standard flow to obtain the target result corresponding to the flow identifier to be tested.
Step 410, determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
And step 412, generating and outputting a test report according to the test result.
And generating a test report according to the test result by a preset report format, and outputting the test report.
In an example, a test method is described with reference to fig. 5, where the IVVR configuration module is configured to configure an IVVR procedure, and in response to a trigger of completion of IVVR procedure configuration, parse the IVVR procedure by using a test case parser to generate a test case in a test case library, where the test case includes a standard procedure and a standard result corresponding to the standard procedure, and in addition, the test case in the test case library may also be a standard procedure and a standard result that are manually imported; in this embodiment, the flow identifiers to be tested are all IVVR flow identifiers, and operations of standard flows corresponding to the flow identifiers are executed one by one based on the flow identifiers, specifically, artificial incoming call can be simulated by calling a simulated incoming call script of a script module, and user operation simulation script simulates user operations, such as control selection, to obtain target results corresponding to the flow identifiers, where the target results include standard flow operation results collected by an event collection module and interface performance conditions obtained by an interface monitoring module; matching the target result with the standard result, and determining that the test result corresponding to the flow mark to be tested passes the test under the condition that the target result is completely matched with the standard result; under the condition that at least one item mark result is not matched with the updated standard result, determining that the test result corresponding to the flow mark to be tested is that the test is not passed; under the condition that the target result is not matched with the updated standard result, matching the target result with an optimization use case in an optimization library; if the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result; and under the condition that the target result is not matched with the optimization use case, analyzing the reason that the target result is not matched with the standard result, determining the corresponding optimization direction, and giving out the corresponding optimization suggestion according to the optimization direction. Based on the test results, a test report is generated, the test report including the test results, the optimization results, and the optimization suggestions.
The testing method in the embodiment can automatically analyze the standard flow and the standard result in the target file, save the standard flow and the standard result in the test case library, automatically test the flow corresponding to the flow mark to be tested, thereby improving the testing efficiency, accurately determining the testing result corresponding to the flow mark to be tested according to the target result and the updated standard result, and improving the testing accuracy.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a testing device for realizing the testing method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitations of one or more embodiments of the testing device provided below may be referred to above for limitations of the testing method, and will not be repeated here.
In one embodiment, as shown in FIG. 6, there is provided a test apparatus comprising: an identification acquisition module 602, a data update module 604, a flow test module 606, and a test result module 608, wherein:
the identifier obtaining module 602 is configured to obtain a process identifier to be tested;
the data updating module 604 is configured to obtain a standard flow corresponding to the flow identifier to be tested in a test case library according to the flow identifier to be tested, and update a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
the flow test module 606 is configured to execute a step corresponding to the standard flow, and obtain a target result corresponding to the flow identifier to be tested;
and a test result module 608, configured to determine a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
In one embodiment, the testing device further comprises a flow analysis module for, before the standard flow corresponding to the flow identifier to be tested in the test case library is obtained according to the flow identifier to be tested,
and responding to the trigger of completing the configuration of the target file, analyzing the flow chart in the target file to obtain the standard flow in the test case library and the standard result corresponding to the standard flow.
In one embodiment, the flow parsing module is further configured to: acquiring a start node and an end node in the flow chart; searching the shortest path from the initial node to each end node to obtain a target flow path; identifying the semantics corresponding to each node in each target flow path to obtain node semantics; and determining a standard flow corresponding to the target flow path according to the node semantics.
In one embodiment, the flow parsing module is further configured to:
converting the node semantics into corresponding description sentences according to preset sentence rules; and combining the description sentences corresponding to each node in the target flow path according to the node sequence in the target flow path to obtain the standard flow corresponding to the target flow path.
In one embodiment, the data update module 604 is further configured to:
based on the interface configured by the standard flow, acquiring real-time data of a standard result corresponding to the standard flow from a server; and updating the standard result through the real-time data to obtain an updated standard result.
In one embodiment, test results module 608 is further configured to:
matching the target result with the updated standard result; under the condition that the target result is completely matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is passing; and under the condition that at least one target result is not matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is not passed.
In one embodiment, test results module 608 is further configured to: under the condition that the target result is not matched with the updated standard result, matching the target result with an optimization use case in an optimization library; if the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result.
In one embodiment, the standard flow corresponding to the identifier to be tested includes at least one sub-flow; the test apparatus further comprises a report generation module for: and generating a test report and outputting according to the sub-test result corresponding to the sub-flow and the test result corresponding to the flow identification to be tested.
The various modules in the test apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing test case library data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a test method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the test method of each of the embodiments described above when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the test method of the embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the test method in the above embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (12)

1. A method of testing, the method comprising:
acquiring a flow mark to be tested;
according to the flow identifier to be tested, acquiring a standard flow corresponding to the flow identifier to be tested in a test case library, and updating a standard result corresponding to the standard flow in the test case library to obtain an updated standard result;
executing the operation corresponding to the standard flow to obtain a target result corresponding to the flow identifier to be tested;
And determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
2. The method according to claim 1, wherein before the standard flow corresponding to the flow identifier to be tested in the test case library is obtained according to the flow identifier to be tested, the method further comprises:
and responding to the trigger of completing the configuration of the target file, analyzing the flow chart in the target file to obtain the standard flow in the test case library and the standard result corresponding to the standard flow.
3. The method of claim 2, wherein the parsing the flow chart in the target file to obtain the standard flow in the test case library comprises:
acquiring a start node and an end node in the flow chart;
searching the shortest path from the initial node to each end node to obtain a target flow path;
identifying the semantics corresponding to each node in each target flow path to obtain node semantics;
and determining a standard flow corresponding to the target flow path according to the node semantics.
4. A method according to claim 3, wherein said determining, according to the node semantics, a standard flow corresponding to the target flow path comprises:
converting the node semantics into corresponding description sentences according to preset sentence rules;
and combining the description sentences corresponding to each node in the target flow path according to the node sequence in the target flow path to obtain the standard flow corresponding to the target flow path.
5. The method of claim 1, wherein updating the standard results corresponding to the standard flow in the test case library to obtain updated standard results comprises:
based on the interface configured by the standard flow, acquiring real-time data of a standard result corresponding to the standard flow from a server;
and updating the standard result through the real-time data to obtain an updated standard result.
6. The method according to claim 1, wherein the determining the test result corresponding to the flow identifier to be tested according to the target result and the updated standard result includes:
matching the target result with the updated standard result;
Under the condition that the target result is completely matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is passing;
and under the condition that at least one target result is not matched with the updated standard result, determining that the test result corresponding to the flow identifier to be tested is not passed.
7. The method of claim 6, wherein the method further comprises:
under the condition that the target result is not matched with the updated standard result, matching the target result with an optimization use case in an optimization library;
if the target result is matched with the optimization use case, optimizing the standard flow by using an optimization strategy corresponding to the optimization use case to obtain an optimization result.
8. The method according to any one of claims 1 to 7, wherein the standard flow corresponding to the identity to be tested comprises at least one sub-flow; the method further comprises the steps of:
and generating a test report and outputting according to the sub-test result corresponding to the sub-flow and the test result corresponding to the flow identification to be tested.
9. A test apparatus, the apparatus comprising:
The identification acquisition module is used for acquiring the flow identification to be tested;
the data updating module is used for acquiring a standard flow corresponding to the flow identifier to be tested in a test case library according to the flow identifier to be tested, updating a standard result corresponding to the standard flow in the test case library, and obtaining an updated standard result;
the flow test module is used for executing the steps corresponding to the standard flow and obtaining a target result corresponding to the flow identifier to be tested;
and the test result module is used for determining a test result corresponding to the flow identifier to be tested according to the target result and the updated standard result.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
CN202310964535.XA 2023-08-02 2023-08-02 Test method, test device, computer equipment and storage medium Pending CN117194221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310964535.XA CN117194221A (en) 2023-08-02 2023-08-02 Test method, test device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310964535.XA CN117194221A (en) 2023-08-02 2023-08-02 Test method, test device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117194221A true CN117194221A (en) 2023-12-08

Family

ID=89002504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310964535.XA Pending CN117194221A (en) 2023-08-02 2023-08-02 Test method, test device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117194221A (en)

Similar Documents

Publication Publication Date Title
CN111159049B (en) Automatic interface testing method and system
CN108829584B (en) Service logic interface mock test method and system
CN109800258B (en) Data file deployment method, device, computer equipment and storage medium
CN108459951B (en) Test method and device
CN110348219A (en) Version comparison method, system, computer equipment and readable storage medium storing program for executing
CN111026670B (en) Test case generation method, test case generation device and storage medium
CN110737594A (en) Database standard conformance testing method and device for automatically generating test cases
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN110532184B (en) Method, device, computer equipment and storage medium for multi-scene simulation response
CN113157904A (en) Sensitive word filtering method and system based on DFA algorithm
CN117290236A (en) Software testing method, device, computer equipment and computer readable storage medium
CN117194221A (en) Test method, test device, computer equipment and storage medium
CN113238901B (en) Multi-device automatic testing method and device, storage medium and computer device
CN116466930A (en) Construction method, message processing method and device of intelligent customer service model and electronic equipment
CN113886221B (en) Test script generation method and device, storage medium and electronic equipment
CN115080401A (en) Automatic testing method and related device
CN110647314B (en) Skill generation method and device and electronic equipment
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN113504912B (en) Real-time task processing method and device, storage medium and electronic device
CN111339093B (en) Method, device, equipment and storage medium for acquiring user behavior data
CN111414330B (en) Data editing method and system, data processing device and storage medium
CN117234525B (en) Robot building method and device, electronic equipment and storage medium
CN117724986B (en) Method and device for automatically operating kafka in use case execution
CN113190236B (en) HQL script verification method and device

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