Test method, device, computer equipment, storage medium
By using automated testing methods and leveraging standard processes and results from a test case library, the flowcharts are parsed and the standard results are updated, solving the problem of low efficiency in traditional IVVR service process testing and achieving efficient and accurate test results.
Patent Information
- Application Number
- CN202310964535.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-08-02
AI Technical Summary
Traditional IVVR service process testing relies on manual phone calls, which is labor-intensive and inefficient.
By obtaining the identifier of the process to be tested, automated testing is performed using standard processes and results in the test case library, including parsing the flowchart, updating standard results, executing operations, and matching target results to determine the test results.
Automated testing has been achieved, which has improved testing efficiency, reduced labor costs, and increased the accuracy and precision of test results.
Smart Images

Figure CN117194221B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a test method and device, computer equipment, a storage medium and a computer program product. BACKGROUND
[0002] IVVR (Interactive Voice and Video Response) is a new wireless voice and video response value-added service. Mobile phone users dial a specified number to obtain the required information or participate in interactive services, such as video on demand (including live broadcast), video mailbox, video point-to-send (optional), video short message (optional), video monitoring and video uploading.
[0003] Before the IVVR service process is put into use, it needs to go through configuration, review, testing and other processes. The testing of the IVVR service process is an important task. In the traditional technology, the testing of various functions is performed by manually dialing a phone, which is a huge workload and has a low testing efficiency. SUMMARY
[0004] Therefore, it is necessary to provide a test method, device, computer equipment, computer readable storage medium and computer program product capable of improving the testing efficiency.
[0005] In a first aspect, the present application provides a test method. The method comprises:
[0006] obtaining a to-be-tested process identifier;
[0007] According to the to-be-tested process identifier, a standard process corresponding to the to-be-tested process identifier in a test case library is obtained, and a standard result corresponding to the standard process in the test case library is updated to obtain an updated standard result;
[0008] performing an operation corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identifier;
[0009] According to the target result and the updated standard result, a test result corresponding to the to-be-tested process identifier is determined.
[0010] In one of the embodiments, before the standard process corresponding to the to-be-tested process identifier is obtained from the test case library according to the to-be-tested process identifier, the method further comprises:
[0011] In response to a trigger of completing configuration of a target file, a flowchart in the target file is parsed to obtain the standard process in the test case library and a standard result corresponding to the standard process.
[0012] In one of the embodiments, the parsing of the flowchart in the target file obtains the standard flow in the test case library, including:
[0013] Obtaining the starting node and the end node in the flowchart;
[0014] Searching for the shortest path between the starting node and each end node to obtain a target flow path;
[0015] Identifying the semantics corresponding to each node in each target flow path to obtain node semantics;
[0016] According to the node semantics, determining the standard flow corresponding to the target flow path.
[0017] In one of the embodiments, the determining of the standard flow corresponding to the target flow path according to the node semantics includes:
[0018] Converting the node semantics into corresponding description statements according to a preset statement rule;
[0019] According to the node order in the target flow path, combining the description statements corresponding to each node in the target flow path to obtain the standard flow corresponding to the target flow path.
[0020] In one of the embodiments, the updating of the standard result corresponding to the standard flow in the test case library to obtain an updated standard result includes:
[0021] Based on the interface configured by the standard flow, obtaining real-time data of the standard result corresponding to the standard flow from a server;
[0022] Updating the standard result by the real-time data to obtain an updated standard result.
[0023] In one of the embodiments, the determining of the test result corresponding to the to-be-tested flow identifier according to the target result and the updated standard result includes:
[0024] Matching the target result with the updated standard result;
[0025] In the case that the target result completely matches the updated standard result, determining that the test result corresponding to the to-be-tested flow identifier is test passed;
[0026] In the case that there is at least one item of the target result that does not match the updated standard result, determining that the test result corresponding to the to-be-tested flow identifier is test failed.
[0027] In one of the embodiments, the method further comprises:
[0028] In the case that the target result does not match the updated standard result, matching the target result with an optimization use case in an optimization library;
[0029] If the target result matches the optimization use case, optimizing the standard process using an optimization strategy corresponding to the optimization use case to obtain an optimization result.
[0030] In one of the embodiments, the standard process corresponding to the to-be-tested identification comprises at least one sub-process; the method further comprises:
[0031] According to the sub-test result corresponding to the sub-process and the test result corresponding to the to-be-tested process identification, generating a test report and outputting.
[0032] In a second aspect, the present application further provides a testing device. The device comprises:
[0033] An identification obtaining module, configured to obtain a to-be-tested process identification;
[0034] A data updating module, configured to obtain, according to the to-be-tested process identification, a standard process corresponding to the to-be-tested process identification in a test case library, and update a standard result corresponding to the standard process in the test case library to obtain an updated standard result;
[0035] A process testing module, configured to execute steps corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identification;
[0036] A test result module, configured to determine a test result corresponding to the to-be-tested process identification according to the target result and the updated standard result.
[0037] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor realizes the following steps when executing the computer program:
[0038] Obtaining a to-be-tested process identification;
[0039] According to the to-be-tested process identification, obtaining a standard process corresponding to the to-be-tested process identification in a test case library, and updating a standard result corresponding to the standard process in the test case library to obtain an updated standard result;
[0040] Executing operations corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identification;
[0041] According to the target result and the updated standard result, a test result corresponding to the to-be-tested process identifier is determined.
[0042] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program, when executed by a processor, implements the following steps:
[0043] A to-be-tested process identifier is acquired.
[0044] According to the to-be-tested process identifier, a standard process corresponding to the to-be-tested process identifier in a test case library is acquired, and a standard result corresponding to the standard process in the test case library is updated to obtain an updated standard result.
[0045] An operation corresponding to the standard process is executed to obtain a target result corresponding to the to-be-tested process identifier.
[0046] According to the target result and the updated standard result, a test result corresponding to the to-be-tested process identifier is determined.
[0047] In a fifth aspect, the present application provides a computer program product. The computer program product comprises a computer program, and the computer program, when executed by a processor, implements the following steps:
[0048] A to-be-tested process identifier is acquired.
[0049] According to the to-be-tested process identifier, a standard process corresponding to the to-be-tested process identifier in a test case library is acquired, and a standard result corresponding to the standard process in the test case library is updated to obtain an updated standard result.
[0050] An operation corresponding to the standard process is executed to obtain a target result corresponding to the to-be-tested process identifier.
[0051] According to the target result and the updated standard result, a test result corresponding to the to-be-tested process identifier is determined.
[0052] The test method, device, computer device, storage medium and computer program product can obtain the to-be-tested process identifier, obtain the standard process corresponding to the to-be-tested process identifier in the test case library according to the to-be-tested process identifier, update the standard result corresponding to the test process in the test case library to obtain an updated standard result, execute the operation corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identifier, and determine the test result corresponding to the to-be-tested process identifier according to the target result and the updated standard result, thereby realizing automatic testing on the operation process corresponding to the to-be-tested identifier and improving the test efficiency. In addition, the standard process in the test case library obtained based on the to-be-tested identifier is operated to obtain the target result, and the test result corresponding to the to-be-tested process identifier can be accurately determined according to the obtained target result and the standard result, thereby improving the accuracy of the test result. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 An application environment diagram of a test method in an embodiment;
[0054] Figure 2 A flowchart of a test method in an embodiment;
[0055] Figure 3 A flowchart of a standard process analysis process in an embodiment;
[0056] Figure 4 A flowchart of a test method in another embodiment;
[0057] Figure 5 A flowchart of a test method in another embodiment;
[0058] Figure 6 A structural block diagram of a test device in an embodiment;
[0059] Figure 7 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0060] To make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0061] The test method provided by the embodiments of the present application can be applied to, for example Figure 1The application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The server 104 obtains the to-be-tested process identifier from the terminal 102, obtains the standard process corresponding to the to-be-tested process identifier in the test case library according to the to-be-tested process identifier, and updates the standard result corresponding to the standard process in the test case library to obtain the updated standard result; execute the operation corresponding to the standard process to obtain the target result corresponding to the to-be-tested process identifier; according to the target result and the updated standard result, determine the test result corresponding to the to-be-tested process identifier. Among them, the terminal 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0062] It should be noted that the embodiments of the present application can also be directly implemented by a server, which is not limited here.
[0063] In one embodiment, as Figure 2 shown, a test method is provided, and the method is applied to the server in Figure 1 for example, including the following steps 202 to 208.
[0064] Step 202, obtaining a to-be-tested process identifier.
[0065] The to-be-tested process identifier is the identifier corresponding to the to-be-tested process. The to-be-tested process can be a preset process or a test process obtained through an interface or an interface. The to-be-tested process identifier can be a preset process identifier or a user input test process identifier. The to-be-tested process identifier is used to uniquely identify the corresponding to-be-tested process. Different test processes correspond to different process identifiers.
[0066] Optionally, the preset process identifier can be obtained from the preset storage location of the server as the to-be-tested process identifier, for example, the preset process identifier is the process identifier corresponding to the relatively important process among all process identifiers, or the process identifier corresponding to the relatively easy-to-error process.
[0067] Optionally, the user input to-be-tested process identifier can be obtained from the server interaction interface or the interaction interface. The to-be-tested process identifier obtained each time can be different.
[0068] At step 204, according to the to-be-tested process identifier, the standard process corresponding to the to-be-tested process identifier in the test case library is obtained, and the standard result corresponding to the standard process in the test case library is updated to obtain an updated standard result.
[0069] According to the to-be-tested process identifier, the server obtains the standard process corresponding to the to-be-tested process identifier in the test case library, and updates the standard result corresponding to the standard process in the test case library to obtain an updated standard result. The test case library includes a test process identifier, a standard process, and a standard result, wherein the test process identifier has a one-to-one correspondence with the standard process and the standard result. The test case library can be obtained by manual collection and arrangement, or by parsing a test file.
[0070] For example, after obtaining the to-be-tested process identifier, the same test process identifier as the to-be-tested process identifier is searched for in the test case library, the standard process corresponding to the test process identifier is obtained, and the standard result in the test case library is updated to obtain an updated standard result. Understandably, the value of the standard result corresponding to the standard process may change, for example, the value of the standard result corresponding to the phone number may change over time, therefore, the standard result needs to be updated to ensure that the value of the standard result is the actual value of the standard result at the moment.
[0071] Optionally, the actual data of the standard result corresponding to the standard process can be obtained from the server based on the interface configured by the standard process. In this embodiment, the actual data of the standard result in the server is real-time updated data, and the data of the standard result in the test instance library is not necessarily real-time updated data.
[0072] At step 206, the operation corresponding to the standard process is executed to obtain a target result corresponding to the to-be-tested process identifier.
[0073] In this embodiment, the server simulates the execution of the corresponding operation according to the standard process to obtain a target result corresponding to the to-be-tested process identifier. In one example, the to-be-tested process identifier is a process identifier in IVVR, and the operation corresponding to the standard process of IVVR can be executed by a corresponding script to obtain a target result corresponding to the operation, for example, a single-pass call simulation or a concurrent call simulation is realized by using a simulation incoming script. Single-pass call refers to only one number triggering IVVR at the same time, and concurrent call refers to multiple numbers triggering IVVR at the same time.
[0074] Optionally, the corresponding standard process of the to-be-tested process identifier is identified, and one or more target results are obtained, the target results including stage results and final results of the standard process during execution. In an example, the target standard process in the IVVR obtains corresponding sub-target results when each step is executed, obtains final target results when the target standard process is executed, and obtains video broadcast results. The target results include the sub-target results, the final target results, and the broadcast results.
[0075] In step 208, the target results and the updated standard results are used to determine the test results corresponding to the to-be-tested process identifier.
[0076] Optionally, the test results corresponding to the to-be-tested process identifier are determined according to the matching between the target results and the updated standard results. In the case where the target results match the updated standard results, the test results corresponding to the to-be-tested process identifier are determined as test passed. In the case where the target results do not match the updated standard results, the test results corresponding to the to-be-tested process identifier are determined as test failed, that is, the test results are abnormal.
[0077] Optionally, after the test results corresponding to the to-be-tested process identifier are determined, a test report corresponding to the to-be-tested process identifier is output. The test report can include the process identifier, the target results corresponding to the process identifier, the matching between the target results and the standard results, and abnormal results.
[0078] In the above test method, the to-be-tested process identifier is obtained. The standard process corresponding to the to-be-tested process identifier in the test case library is obtained according to the to-be-tested process identifier, and the standard results corresponding to the standard process in the test case library are updated to obtain updated standard results. The operation corresponding to the standard process is executed to obtain the target results corresponding to the to-be-tested process identifier. The target results and the updated standard results are used to determine the test results corresponding to the to-be-tested process identifier, which can realize automatic testing, improve test efficiency, and reduce labor costs. In addition, the target results obtained by operating the standard process corresponding to the to-be-tested process identifier can better reflect the real operation results, so that the final test results are more accurate, thereby improving the accuracy of the test.
[0079] In some embodiments, the interval preset duration is acquired, the to-be-tested process identifier is acquired, the standard process corresponding to the to-be-tested process identifier in the test case library is acquired according to the to-be-tested process identifier, and the standard result corresponding to the standard process in the test case library is updated to obtain an updated standard result; the operation corresponding to the standard process is executed to obtain a target result corresponding to the to-be-tested process identifier; and the test result corresponding to the to-be-tested process identifier is determined according to the target result and the updated standard result, so that the process corresponding to the to-be-tested process identifier is periodically tested to ensure the accurate operation of the process.
[0080] In one embodiment, before the standard process corresponding to the to-be-tested process identifier in the test case library is acquired according to the to-be-tested process identifier, the method further comprises: in response to a trigger that the target file is configured, the flowchart in the target file is parsed to obtain the standard process in the test case library and the standard result corresponding to the standard process.
[0081] In this embodiment, when the target file is configured, the target file is parsed to obtain the standard test process in the test case library and the corresponding standard result. The target file can be understood as an executable program or a component corresponding to an object to be tested, such as IVVR.
[0082] Optionally, the standard execution process in the target file can be parsed to obtain the corresponding standard process and the standard result corresponding to the standard process. For example, the operation flowchart corresponding to the target file can be parsed to obtain one or more standard processes and the corresponding standard results.
[0083] In the above embodiment, in response to the trigger that the target file is configured, the flowchart in the target configuration file is parsed to obtain the standard process in the test case library and the standard result corresponding to the standard process, which can automatically parse the target configuration file to obtain the standard process and the standard result, save manpower, reduce labor cost, and thus improve the test efficiency.
[0084] In one embodiment, the standard process parsing flowchart is as shown in Figure 3 The flowchart in the target file is parsed to obtain the standard process in the test case library, including the following steps 302 to 308.
[0085] Step 302, the starting node and the end node in the flowchart are acquired.
[0086] The flowchart includes a starting node and multiple end nodes. The starting node has only child nodes and no parent node, and the end node has only parent nodes and no child nodes. Therefore, the starting node and the end node can be determined according to the child node condition and the parent node condition of each node in the flowchart.
[0087] Optionally, the starting node identifier and the ending node identifier are obtained after identifying each node in the flowchart and determining the starting node and the ending node.
[0088] In step 304, the shortest path between the starting node and each ending node is searched to obtain a target flow path.
[0089] There can be multiple paths between the starting node and each ending node, and the shortest path is selected as the target flow path. Optionally, for multiple paths between the starting node and a certain ending node, the number of nodes passed through by each path is counted, and the path with the least number of nodes is selected as the target flow path.
[0090] In step 306, the semantics corresponding to each node in each target flow path are identified to obtain node semantics.
[0091] In this embodiment, the server identifies the semantics corresponding to each node in each target flow path to obtain node semantics. It can be understood that the semantics corresponding to the nodes can be identified using existing semantic identification methods, which are not limited here.
[0092] In step 308, the standard flow corresponding to the target flow path is determined according to the node semantics.
[0093] The server can determine the standard flow corresponding to the target flow path according to the node semantics. The node semantics of all nodes in the target flow path are arranged in order according to the node order to obtain the standard flow corresponding to the target flow path. It can be understood that each target flow path can correspond to a flow identifier.
[0094] In this embodiment, by obtaining the starting node and the ending node in the flowchart, searching the shortest path between the starting node and each ending 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 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, thereby improving the test efficiency and the accuracy of the test results.
[0095] 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 a preset sentence rule; and combining the description sentences corresponding to each node in the target flow path according to the node order in the target flow path to obtain the standard flow corresponding to the target flow path.
[0096] In the embodiment, the node semantics are converted into corresponding description statements according to preset statement rules, and the description statements corresponding to each node in the target flow path are combined according to the node order in the target flow path to obtain a standard flow corresponding to the target flow path. In an example, the semantics of node 1 is "select serial number, 1-function A, 2-function B, 3-function C", and the description statement corresponding to node 1 can be "function A, please press 1, function B, please press 2, function C, please press 3".
[0097] According to the node order of the target flow path, the description statements corresponding to each node from the starting node to the end node in the target flow path are combined to obtain a standard flow corresponding to the target flow path.
[0098] In the above embodiment, the node semantics are converted into corresponding description statements according to preset statement rules, and the description statements corresponding to each node in the target flow path are combined according to the node order in the target flow path to obtain a standard flow corresponding to the target flow path, which can quickly and accurately obtain a standard flow corresponding to the target flow path, and is beneficial to improve the test efficiency.
[0099] In some embodiments, updating the standard result corresponding to the standard flow in the test case library to obtain an updated standard result includes: based on the interfaces configured by the standard flow, obtaining real-time data of the standard result corresponding to the standard flow from a server; and updating the standard result by the real-time data to obtain the updated standard result.
[0100] In the embodiment, the standard flow is configured with multiple interfaces, and corresponding data can be obtained from the server through each interface, and the execution and the execution result of the standard flow corresponding to the interface can also be obtained from the interface. Based on the interfaces 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 obtaining the real-time data of the standard result from the background server. The standard result in the test case library is updated by the obtained real-time data to obtain the updated standard result.
[0101] In the above embodiment, based on the interfaces configured by the standard flow, the real-time data of the standard result corresponding to the standard flow is obtained from the server; and the standard result is updated by the real-time data to obtain the updated standard result, which can ensure the accuracy of the standard result in the test case library, thereby improving the accuracy of the test result.
[0102] In one embodiment, according to the target result and the updated standard result, the corresponding test result of the to-be-tested process identifier is determined, including: matching the target result with the updated standard result; in the case that the target result is completely matched with the updated standard result, determining that the corresponding test result of the to-be-tested process identifier is test passed; in the case that there is at least one target result that is not matched with the updated standard result, determining that the corresponding test result of the to-be-tested process identifier is test failed.
[0103] In the embodiment, the target result is matched with the updated standard result, wherein the target result can include execution situation and execution result of the corresponding standard process, the execution situation for example including whether the operation process is normally running, whether abnormal situation of stopping in the middle occurs, etc., the execution result including whether the execution result exists, in the case that the execution result exists, whether the execution result is accurate, whether the execution result appears delay, etc., the execution result further including the phased result in the process of the standard process. The target result can further include interface performance situation configured by the standard process, for example, interface abnormality, interface data acquisition delay, etc.
[0104] In the embodiment, the target result includes multiple, and the updated standard result corresponds to the target result. In the case that the target result is completely matched with the updated standard result, it is determined that the corresponding test result of the to-be-tested process identifier is test passed; in the case that there is at least one target result that is not matched with the updated standard result, it is determined that the corresponding test result of the to-be-tested process identifier is test failed, thereby improving the accuracy of the test result and the accuracy of the test.
[0105] In some embodiments, in the case that the target result is not matched 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 case, the standard process is optimized by using the optimization strategy corresponding to the optimization case to obtain the optimization result.
[0106] In the embodiment, the standard process with abnormality is optimized by setting the optimization strategy, and the optimization library saves the optimization case and the optimization strategy corresponding to the optimization case. In the case that the target result is not matched 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 case, the standard process is optimized by using the optimization strategy corresponding to the optimization case to obtain the optimization result. Optionally, when the target result is the same as the optimization case in the optimization library, it is confirmed that the target result is matched with the optimization case, and the standard process is optimized by using the optimization strategy corresponding to the matched optimization case.
[0107] In one example, the target result is 10 seconds of execution duration of the standard process, and the updated standard result is 5 seconds. The target result does not match the updated standard result, and the execution duration is delayed too long. The target result is matched with the optimization case in the optimization library. If the target result matches the optimization case, the standard process is optimized using the optimization strategy corresponding to the optimization case. The optimization strategy can be to reduce the number of steps corresponding to the standard process, thereby reducing or avoiding the execution duration delay.
[0108] Optionally, in the case where the target result does not match the optimization case, the reason for not matching the standard result can be determined by machine learning algorithm analysis on the target result, the corresponding optimization direction is determined, and the corresponding optimization suggestion is given according to the optimization direction.
[0109] In the above embodiment, in the case where the target result does not match the updated standard result, the target result is matched with the optimization case in the optimization library. If the target result matches the optimization case, the standard process is optimized using the optimization strategy corresponding to the optimization case to obtain the optimization result. The standard process corresponding to the target result that does not match the standard result can be automatically optimized to reduce the case where the target result does not match the standard result, thereby improving the test efficiency.
[0110] In some embodiments, the standard process corresponding to the to-be-tested identification includes at least one sub-process; the method further includes: generating a test report and outputting according to the sub-test result corresponding to the sub-process and the test result corresponding to the to-be-tested process identification.
[0111] In the embodiment, the standard process corresponding to the to-be-tested identification includes at least one sub-process, each sub-process corresponds to a sub-test result, and the sub-process can be an operation step in the standard process. The test report is generated and outputted according to the sub-test result corresponding to the sub-process and the test result corresponding to the to-be-tested process identification.
[0112] Optionally, the test report can include the test result corresponding to the standard process, the sub-test result corresponding to the sub-process, and the interface performance of the standard process configured. Optionally, the test report can also include the optimization result or optimization suggestion of the standard process.
[0113] In the above embodiment, the test report is generated and outputted according to the sub-test result corresponding to the sub-process and the test result corresponding to the to-be-tested process identification, which can make the test report more accurate and complete, and improve the interaction performance with the user.
[0114] In one embodiment, as shown in Figure 4 the test method includes the following steps 402 to step 412.
[0115] At step 402, in response to a trigger of completion of configuration of the target file, a flowchart in the target file is parsed to obtain a standard flow in the test case library and a standard result corresponding to the standard flow.
[0116] At step 404, an identification of a flow to be tested is obtained.
[0117] At step 406, according to the identification of the flow to be tested, a standard flow corresponding to the identification of the flow to be tested in the test case library is obtained, and a standard result corresponding to the standard flow in the test case library is updated to obtain an updated standard result.
[0118] At step 408, an operation corresponding to the standard flow is executed to obtain a target result corresponding to the identification of the flow to be tested.
[0119] At step 410, according to the target result and the updated standard result, a test result corresponding to the identification of the flow to be tested is determined.
[0120] At step 412, according to the test result, a test report is generated and output.
[0121] According to the test result, the test report is generated through a preset report format, and the test report is output.
[0122] In one example, the test method combines Figure 5To illustrate, the IVVR configuration module is configured to configure the IVVR process, in response to the trigger of the completion of the IVVR process configuration, the IVVR process is parsed by the test case parser to generate the test case in the test case library, the test case includes the standard process, and the standard result corresponding to the standard process, in addition, the test case in the test case library can also be the standard process and the standard result imported by manual; In this embodiment, the to-be-tested process identifier is the IVVR process identifier, the operation of the standard process corresponding to the process identifier is executed one by one based on the process identifier, the target result corresponding to each process identifier can be obtained by calling the simulation incoming script of the script module to simulate manual incoming and the user operation simulation script to simulate user operation, such as control selection, etc., the target result includes the standard process operation result collected by the event collection module and the interface performance obtained by the interface monitoring module; The target result is matched with the standard result, in the case that the target result and the standard result are completely matched, it is determined that the test result corresponding to the to-be-tested process identifier is test passed; In the case that there is at least one target result and the updated standard result do not match, it is determined that the test result corresponding to the to-be-tested process identifier is test failed; In the case that the target result and the updated standard result do not match, the target result is matched with the optimization case in the optimization library; If the target result and the optimization case match, the optimization strategy corresponding to the optimization case is used to optimize the standard process to obtain the optimization result; In the case that the target result and the optimization case do not match, the reason why the standard result does not match is analyzed, the corresponding optimization direction is determined, and the corresponding optimization suggestion is given according to the optimization direction. Based on the test result, a test report is generated, the test report includes the test result, the optimization result and the optimization suggestion.
[0123] The test method in the above embodiment can automatically parse the standard process and the standard result in the target file, save to the test case library, and automatically test the process corresponding to the to-be-tested process identifier, thereby improving the test efficiency, the test result corresponding to the to-be-tested process identifier can be accurately determined according to the target result and the updated standard result, and the test accuracy is improved.
[0124] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.
[0125] Based on the same inventive concept, the embodiments of the present application also provide a test device for implementing the test method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more test device embodiments provided below can refer to the limitations of the test method described above, which will not be repeated here.
[0126] In one embodiment, as shown in Figure 6 a test device is provided, comprising: an identification acquisition module 602, a data update module 604, a process test module 606 and a test result module 608, wherein:
[0127] The identification acquisition module 602 is configured to acquire a to-be-tested process identification;
[0128] The data update module 604 is configured to acquire a standard process corresponding to the to-be-tested process identification in a test case library according to the to-be-tested process identification, and update a standard result corresponding to the standard process in the test case library to obtain an updated standard result;
[0129] The process test module 606 is configured to execute steps corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identification;
[0130] The test result module 608 is configured to determine a test result corresponding to the to-be-tested process identification according to the target result and the updated standard result.
[0131] In one embodiment, the test device further comprises a process analysis module, configured to, before the acquiring of the standard process corresponding to the to-be-tested process identification in the test case library according to the to-be-tested process identification,
[0132] In response to a trigger of completion of configuration of the target file, the flowchart in the target file is parsed to obtain a standard flow in the test case library and a standard result corresponding to the standard flow.
[0133] In one embodiment, the flow parsing module is further configured to: obtain a start node and an end node in the flowchart; search for a shortest path between the start node and each end node to obtain a target flow path; identify semantics corresponding to each node in each target flow path to obtain node semantics; and determine a standard flow corresponding to the target flow path according to the node semantics.
[0134] In one embodiment, the flow parsing module is further configured to:
[0135] The node semantics are converted into corresponding description statements according to a preset statement rule, and the description statements corresponding to each node in the target flow path are combined according to a node order in the target flow path to obtain a standard flow corresponding to the target flow path.
[0136] In one embodiment, the data updating module 604 is further configured to:
[0137] Real-time data of the standard result corresponding to the standard flow is obtained from a server based on an interface configured by the standard flow, and the standard result is updated by the real-time data to obtain an updated standard result.
[0138] In one embodiment, the test result module 608 is further configured to:
[0139] The target result is matched with the updated standard result, and in a case where the target result completely matches the updated standard result, it is determined that a test result corresponding to the to-be-tested flow identifier is test passed, and in a case where there is at least one item of the target result that does not match the updated standard result, it is determined that the test result corresponding to the to-be-tested flow identifier is test failed.
[0140] In one embodiment, the test result module 608 is further configured to, in a case where the target result does not match the updated standard result, match the target result with an optimization case in an optimization library, and if the target result matches the optimization case, use an optimization strategy corresponding to the optimization case to optimize the standard flow to obtain an optimization result.
[0141] In one embodiment, the standard flow corresponding to the to-be-tested identifier includes at least one sub-flow, and the testing device further includes a report generation module configured to generate a test report and output according to a sub-test result corresponding to the sub-flow and a test result corresponding to the to-be-tested flow identifier.
[0142] Each module in the test device described above can be implemented wholly or partially by software, hardware and a combination thereof. Each module described above can be embedded in a processor in a computer device in hardware form or independent of the processor in the computer device, or stored in a memory in the computer device in software form so as to be invoked by the processor to perform the operations corresponding to each module.
[0143] In one embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 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. 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, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store test case library data. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with terminals outside through a network connection. The computer program is executed by the processor to implement a test method.
[0144] Those skilled in the art can understand that Figure 7 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0145] In one embodiment, a computer device is provided, which includes a memory and a processor, and the memory stores a computer program. The processor executes the computer program to implement the steps of the test method in each of the above embodiments.
[0146] In one embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps of the test method in each of the above embodiments.
[0147] In one embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps of the test method in each of the above embodiments.
[0148] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.
[0149] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. In the embodiments provided in the present application, any reference to memory, database or other medium can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0150] The technical features of the above embodiments can be combined in any way. In order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0151] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A test method characterized by, The method comprises: acquiring a to-be-tested process identifier; in response to a trigger of completion of configuration of a target file, acquiring a starting node and an ending node in a flowchart; searching for a shortest path between the starting node and each of the ending nodes to obtain a target process path; identifying semantics corresponding to each node in each of the target process paths to obtain node semantics; converting the node semantics into corresponding description statements according to a preset statement rule; combining the description statements corresponding to each node in the target process path according to an order of the nodes in the target process path to obtain a standard process corresponding to the target process path, and determining a standard result corresponding to the standard process; acquiring a standard process corresponding to the to-be-tested process identifier in a test case library, and acquiring real-time data of the standard result corresponding to the standard process from a server based on an interface configured for the standard process; updating the standard result by using the real-time data to obtain an updated standard result; performing an operation corresponding to the standard process to obtain a target result corresponding to the to-be-tested process identifier; determining a test result corresponding to the to-be-tested process identifier according to the target result and the updated standard result.
2. The method of claim 1, wherein, The determining of the test result corresponding to the to-be-tested process identifier according to the target result and the updated standard result comprises: matching the target result with the updated standard result; in a case where the target result completely matches the updated standard result, determining that the test result corresponding to the to-be-tested process identifier is test passed; in a case where there is at least one item of the target result that does not match the updated standard result, determining that the test result corresponding to the to-be-tested process identifier is test failed.
3. The method of claim 2, wherein, The method further comprises: in a case where the target result does not match the updated standard result, matching the target result with an optimization case in an optimization library; if the target result matches the optimization case, optimizing the standard process by using an optimization strategy corresponding to the optimization case to obtain an optimization result.
4. The method of claim 1, wherein, The acquiring of the to-be-tested process identifier comprises: acquiring a preset process identifier from a preset storage location of a server, and taking the preset process identifier as the to-be-tested process identifier.
5. The method of claim 1, wherein, The acquiring of the to-be-tested process identifier comprises: acquiring a to-be-tested process identifier input by a user from a server interaction interface or an interaction interface.
6. The method of claim 1, wherein, The acquiring of the to-be-tested process identifier comprises: acquiring a to-be-tested process identifier at intervals of a preset time length.
7. The method according to any one of claims 1 to 6, characterized in that, The standard process corresponding to the to-be-tested process identifier comprises at least one sub-process; the method further comprises: generating a test report and outputting according to a sub-test result corresponding to the sub-process and a test result corresponding to the to-be-tested process identifier.
8. A test device, characterized by The apparatus comprises: an identifier acquisition module configured to acquire a to-be-tested process identifier; The flow analysis module is configured to, in response to a trigger of completion of configuration of a target file, acquire a starting node and an ending node in a flowchart; search for a shortest path between the starting node and each ending node to obtain a target flow path; identify semantics corresponding to each node in each target flow path to obtain node semantics; convert the node semantics into corresponding description statements according to a preset statement rule; combine the description statements corresponding to each node in the target flow path according to an order of nodes in the target flow path to obtain a standard flow corresponding to the target flow path, and determine a standard result corresponding to the standard flow; The data updating module is configured to, according to the to-be-tested flow identifier, acquire a standard flow corresponding to the to-be-tested flow identifier in a test case library, and based on an interface configured by the standard flow, acquire real-time data of a standard result corresponding to the standard flow from a server; update the standard result by using the real-time data to obtain an updated standard result; The flow testing module is configured to execute steps corresponding to the standard flow to obtain a target result corresponding to the to-be-tested flow identifier. The test result module is configured to determine a test result corresponding to the to-be-tested flow identifier according to the target result and the updated standard result. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.
Citation Information
Patent Citations
System testing method and device, computer equipment and storage medium
CN110399293A
Service testing method and device, computer equipment and storage medium
CN112433944A