Automatic testing method and device
By using automated testing methods, chip module logs are acquired and converted into business events, path graphs are constructed and matched with standard trajectory templates for anomaly detection. This solves the problem of low efficiency in manual log analysis and achieves efficient and accurate test results.
Patent Information
- Application Number
- CN202511471423.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-02-06
AI Technical Summary
In existing technologies, the functional verification of chip modules relies on manual log analysis, which is difficult to meet the testing requirements of high concurrency, large scale and high precision, especially when the number and format of logs are diverse.
An automated testing approach is adopted, which involves acquiring business operation logs and converting them into business events, constructing a business operation path map, matching the path with a standard behavior trajectory template, and using the isolated forest algorithm for anomaly detection to locate the cause and time period of the anomaly.
It significantly improves testing efficiency and accuracy, enables intelligent and structured verification of business behaviors, supports process visualization and structured analysis, and adapts to changes in the testing environment.
Smart Images

Figure CN121476891A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, and in particular to an automatic testing method and device. BACKGROUND
[0002] Chip modules are widely used in various intelligent products, and must be verified for functionality and business correctness before being shipped to ensure stable operation. A large amount of log information is generated during the functional verification of the chip module, which is used to record various business operations performed by the chip module. In related technologies, module verification still mainly relies on manual checking of logs one by one to determine whether the operation behavior meets the expectations.
[0003] However, as the complexity of the module function increases, the number and format of logs also become increasingly diverse, and the manual analysis of logs has been difficult to meet the testing requirements of high concurrency, large scale and high precision. SUMMARY
[0004] The purpose of the present application is to provide an automatic testing method and device, which greatly improves the testing efficiency and accuracy by comparing the behavior trajectory to determine whether there is an abnormality in the testing process.
[0005] The present application provides an automatic testing method, comprising: obtaining a business operation log generated by a chip module during functional verification, and converting the business operation log into corresponding business events; constructing a business operation path graph based on the obtained business events, and performing trajectory matching between the business operation path graph and a standard behavior trajectory template to generate a trajectory matching result; in the case that the trajectory matching result indicates that the trajectories are inconsistent, performing abnormality detection, and generating a final testing result based on the abnormality detection result; wherein the abnormality detection is used to locate the abnormality triggering reason and the abnormality time period.
[0006] Optionally, the conversion of the business operation log into corresponding business events comprises: performing text analysis and business meaning recognition on the business operation log by using a semantic recognition model, and converting the business operation log into structured business events.
[0007] Optionally, the construction of the business operation path graph based on the obtained business events comprises: analyzing the obtained business events to determine the execution order and logical dependency between each business event, and constructing a behavior trajectory graph by taking the business events as nodes, the execution order and the logical dependency as edges, to obtain the business operation path graph.
[0008] Optionally, the trajectory matching of the business operation path graph with the standard behavior trajectory template to generate a trajectory matching result comprises: obtaining a standard behavior trajectory template generated based on an expected business process in a test case, and using a graph comparison algorithm to perform trajectory matching of the business operation path graph with the standard behavior trajectory template to generate a trajectory matching result; wherein the trajectory matching result is used to represent whether any of the following exists in the business operation path graph: event missing, sequence error, and path deviation.
[0009] Optionally, in the case where the trajectory matching result indicates trajectory inconsistency, performing anomaly detection comprises: if the trajectory matching result indicates trajectory inconsistency, using an isolation forest algorithm to determine whether a current behavior trajectory indicated by the business operation path graph deviates from a historical normal behavior trajectory; if the determination result indicates that the current behavior trajectory deviates from the historical normal behavior trajectory, determining that an anomaly exists, and locating an anomaly trigger cause and an anomaly time period based on context information; wherein the context information is used to represent events occurring before and after an anomaly event.
[0010] Optionally, the method further comprises: based on the anomaly detection result and the trajectory matching result, generating a final test result; wherein the test result comprises: target result information and verification report information generated based on the target result information; and the target result information comprises: business operation logs and result information of each stage.
[0011] Optionally, the method further comprises: in the case where a test environment is changed, updating the semantic recognition model and the standard behavior trajectory template through incremental learning, and performing automatic test based on the updated semantic recognition model and the standard behavior trajectory template; wherein the test environment change comprises any of the following: chip module update, log format adjustment, and business process change.
[0012] The present application also provides an automatic test device, comprising: a log conversion module configured to obtain business operation logs generated by a chip module in a functional verification process, and convert the business operation logs into corresponding business events; a trajectory matching module configured to construct a business operation path graph based on the obtained business events, and perform trajectory matching of the business operation path graph with a standard behavior trajectory template to generate a trajectory matching result; and an anomaly detection module configured to, in the case where the trajectory matching result indicates trajectory inconsistency, perform anomaly detection, and generate a final test result based on the anomaly detection result; wherein the anomaly detection is used to locate an anomaly trigger cause and an anomaly time period.
[0013] Optionally, the log conversion module is specifically configured to convert the business operation log into a structured business event by using a semantic recognition model to perform text analysis and business meaning recognition on the business operation log.
[0014] Optionally, the trajectory matching module is specifically configured to analyze the obtained business event, determine the execution order and logical dependency between each business event, and construct a behavior trajectory graph by taking the business event as a node, the execution order and the logical dependency as edges, to obtain the business operation path graph.
[0015] Optionally, the trajectory matching module is specifically configured to obtain a standard behavior trajectory template generated based on an expected business process in a test case, and perform trajectory matching between the business operation path graph and the standard behavior trajectory template by using a graph comparison algorithm to generate a trajectory matching result; wherein the trajectory matching result is used to represent whether any of the following exists in the business operation path graph: event missing, order error, and path deviation.
[0016] Optionally, the anomaly detection module is specifically configured to, if the trajectory matching result indicates that the trajectories do not match, determine whether a current behavior trajectory indicated by the business operation path graph deviates from a historical normal behavior trajectory by using an isolation forest algorithm; and the anomaly detection module is specifically further configured to, if a determination result indicates that the current behavior trajectory deviates from the historical normal behavior trajectory, determine that an anomaly exists, and locate an abnormal triggering cause and an abnormal time period based on context information; wherein the context information is used to represent events occurring before and after an abnormal event.
[0017] Optionally, the anomaly detection module is specifically configured to generate a final test result based on the anomaly detection result and the trajectory matching result; wherein the test result includes: target result information and verification report information generated based on the target result information; and the target result information includes: the business operation log and result information of each stage.
[0018] Optionally, the device further includes an adjustment module; the adjustment module is configured to, in the case of a test environment change, update the semantic recognition model and the standard behavior trajectory template by incremental learning, and perform automatic test based on the updated semantic recognition model and the standard behavior trajectory template; wherein the test environment change includes any of the following: chip module update, log format adjustment, and business process change.
[0019] The application also provides a computer program product, including computer programs / instructions, which, when executed by a processor, implement the steps of the automatic test method according to any of the above.
[0020] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the automatic test method according to any one of the above when executing the program.
[0021] The application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the steps of the automatic test method according to any one of the above.
[0022] The automatic test method and device provided by the application first acquire a service operation log generated in a functional verification process of a chip module, and convert the service operation log into corresponding service events; then, a service operation path graph is constructed based on the obtained service events, and the service operation path graph is subjected to trajectory matching with a standard behavior trajectory template to generate a trajectory matching result; finally, in a case where the trajectory matching result indicates that the trajectories are inconsistent, abnormality detection is performed, and a final test result is generated based on an abnormality detection result; wherein the abnormality detection is used to locate an abnormality triggering cause and an abnormality time period. In this way, whether there is an abnormality in a test process is determined by performing behavior trajectory comparison, which greatly improves test efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the application or the prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0024] Figure 1 Fig. 1 is a hardware environment schematic diagram of an interaction method of an intelligent device according to an embodiment of the application; Figure 2 Fig. 2 is a flow schematic diagram of an automatic test method provided by the application; Figure 3 Fig. 3 is another flow schematic diagram of an automatic test method provided by the application; Figure 4 Fig. 4 is a structure schematic diagram of an automatic test device provided by the application; Figure 5 Fig. 5 is a structure schematic diagram of an electronic device provided by the application. DETAILED DESCRIPTION
[0025] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application, so that those skilled in the art can better understand the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of the present application.
[0026] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] According to an aspect of the embodiments of the present application, an automatic test method for verifying business correctness in a chip module test process is provided. The automatic test method is widely applied to smart home, smart home, smart home device ecology, intelligence house ecology and other whole-house intelligent digital control application scenarios. Optionally, in the present embodiment, the automatic test method can be applied to the hardware environment composed of a terminal device 102 and a server 104 as shown in Figure 2 As shown in Figure 2 The server 104 is connected with the terminal device 102 through a network, which can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal, a database can be set on the server or independently of the server, which is used to provide data storage services for the server 104, cloud computing and / or edge computing services can be configured on the server or independently of the server, which is used to provide data operation services for the server 104.
[0028] The network can include, but is not limited to, at least one of the following: a wired network, a wireless network. The wired network can include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The wireless network can include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 can be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart oven, a smart refrigerator, a smart oven, a smart oven, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart television, a smart clothesline, a smart curtain, a smart audio and video, a smart socket, a smart sound, a smart sound box, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0029] Chip modules are widely used in various intelligent products. Before being shipped, they must be verified for functionality and business correctness to ensure stable operation. As the complexity of module functions increases, the number and format of logs also become more diverse. Traditional methods that rely on manual analysis of logs have been unable to meet the testing needs of high concurrency, large scale, and high precision.
[0030] To address the above technical problems in the related art, the embodiments of the present application provide an automatic testing method. The method fuses natural language processing (NLP), graph structure modeling, and anomaly detection technologies to form an intelligent and structured business behavior automatic verification mechanism. The system can collect logs in real time, understand operation semantics, automatically construct behavior trajectories, and compare and verify, significantly improving testing efficiency and problem discovery capabilities.
[0031] The automatic testing method provided by the embodiments of the present application will be described in detail below in conjunction with the drawings, specific embodiments, and application scenarios.
[0032] As shown in Figure 2 The automatic testing method provided by the embodiments of the present application can include the following steps 201 to 203: Step 201, obtaining a business operation log generated by a chip module in a functional verification process, and converting the business operation log into a corresponding business event.
[0033] Exemplarily, as shown in Figure 3As shown, after the automatic test system is started, the test program can establish a real-time communication connection through the serial port or the debugging interface of the module, and stably receive log data. After receiving the log data, the log can be standardized and a system timestamp can be added to ensure that logs from different sources can be aligned for analysis, and the required business operation log can be obtained.
[0034] As shown, after the automatic test system is started, the test program can establish a real-time communication connection through the serial port or the debugging interface of the module, and stably receive log data. After receiving the log data, the log can be standardized and a system timestamp can be added to ensure that logs from different sources can be aligned for analysis, and the required business operation log can be obtained.
[0035] Specifically, in step 201, the step of converting the business operation log into a corresponding business event can further include the following step 201a: Step 201a, text analysis and business meaning recognition of the business operation log are performed by using a semantic recognition model, and the business operation log is converted into a structured business event.
[0036] As shown, after the automatic test system is started, the test program can establish a real-time communication connection through the serial port or the debugging interface of the module, and stably receive log data. After receiving the log data, the log can be standardized and a system timestamp can be added to ensure that logs from different sources can be aligned for analysis, and the required business operation log can be obtained. Figure 3 As shown, the system is built-in with a semantic recognition model based on BERT and the like, which can perform text analysis and business meaning recognition on the log content, and automatically convert the business operation log into a structured business event. The above business event can include events such as "start connection", "send control", "feedback reception", and "state change".
[0037] Step 202, constructing a business operation path graph based on the obtained business event, and performing trajectory matching between the business operation path graph and a standard behavior trajectory template to generate a trajectory matching result.
[0038] As shown, after the automatic test system is started, the test program can establish a real-time communication connection through the serial port or the debugging interface of the module, and stably receive log data. After receiving the log data, the log can be standardized and a system timestamp can be added to ensure that logs from different sources can be aligned for analysis, and the required business operation log can be obtained.
[0039] Specifically, in step 201, the step of converting the business operation log into a corresponding business event can further include the following step 201a: Step 202a, analyzing the obtained business event to determine the execution order and logical dependency between each business event, and constructing a behavior trajectory graph with the business event as a node, the execution order and the logical dependency as an edge, to obtain the business operation path graph.
[0040] As shown, after the automatic test system is started, the test program can establish a real-time communication connection through the serial port or the debugging interface of the module, and stably receive log data. After receiving the log data, the log can be standardized and a system timestamp can be added to ensure that logs from different sources can be aligned for analysis, and the required business operation log can be obtained. Figure 3 As shown, by time sequence and semantic dependency, the system converts the recognized business event into a graph structure node to construct a complete business operation path graph (used to represent the behavior trajectory in the module test process). The node in the graph represents the event, and the edge represents the order and logical dependency, and also supports multi-branch and multi-cycle structure.
[0041] Exemplarily, after obtaining the service operation path graph, trajectory matching can be performed with the pre-generated standard behavior trajectory template, and it is determined whether there is an error in the test process.
[0042] Specifically, in step 202, the step of performing trajectory matching between the service operation path graph and the standard behavior trajectory template to generate a trajectory matching result can further include the following step 202b: In step 202b, a standard behavior trajectory template generated based on an expected service flow in a test case is obtained, and a graph comparison algorithm is used to perform trajectory matching between the service operation path graph and the standard behavior trajectory template to generate a trajectory matching result.
[0043] The trajectory matching result is used to represent whether any of the following exists in the service operation path graph: event missing, sequence error, and path deviation.
[0044] Exemplarily, in the embodiments of the present application, as shown in Figure 3 The standard behavior trajectory template can be automatically generated according to an expected service flow defined in a test case, and a VF2 graph comparison algorithm can be used to perform structural matching and consistency checking with an actual trajectory to identify whether there is event missing, sequence error, or path deviation.
[0045] In step 203, if the trajectory matching result indicates that the trajectories are inconsistent, abnormality detection is performed, and a final test result is generated based on the abnormality detection result.
[0046] The abnormality detection is used to locate an abnormality trigger cause and an abnormality time period.
[0047] Exemplarily, if the trajectory matching result indicates that the trajectories are inconsistent, abnormality detection can be performed, otherwise, it indicates that there is no problem in the module test process.
[0048] Specifically, in step 203, the step of performing abnormality detection can further include the following steps 203a1 and 203a2: In step 203a1, if the trajectory matching result indicates that the trajectories are inconsistent, an isolation forest algorithm is used to determine whether a current behavior trajectory indicated by the service operation path graph deviates from a historical normal behavior trajectory.
[0049] In step 203a2, if the determination result indicates that the current behavior trajectory deviates from the historical normal behavior trajectory, it is determined that there is an abnormality, and an abnormality trigger cause and an abnormality time period are located based on context information.
[0050] The context information is used to represent events occurring before and after an abnormal event.
[0051] Exemplarily, as shown in Figure 3As shown, in the embodiment of the present application, the Isolation Forest algorithm can be used to model the historical normal behavior trajectory, and identify whether the current execution deviates from the regular mode. If there is an anomaly, the system automatically locates the trigger cause and the abnormal time period in combination with the context information, and outputs a detailed analysis.
[0052] Specifically, in step 203, the step of generating a final test result based on the anomaly detection result can further include the following step 203b: Step 203b, generating a final test result based on the anomaly detection result and the trajectory matching result.
[0053] The test result includes target result information and verification report information generated based on the target result information. The target result information includes business operation logs and result information of each stage.
[0054] As an example, Figure 3 As shown, after the test is completed, the system outputs all verification results as a structured test report, including complete logs, behavior recognition records, trajectory graph comparison details, anomaly explanations, and verification reports containing suggested conclusions, for test personnel to review and archive.
[0055] Optionally, in the embodiment of the present application, if the test environment changes, the system can also cope with it through dynamic adaptation and learning.
[0056] As an example, the automated testing method provided by the embodiment of the present application can further include the following step 204: Step 204, in the case of test environment changes, updating the semantic recognition model and the standard behavior trajectory template through incremental learning, and automatically testing based on the updated semantic recognition model and the standard behavior trajectory template.
[0057] The test environment changes include any of the following: chip module update, log format adjustment, and business process change.
[0058] As an example, in the face of module version update, log format adjustment or business process change, the system can update the semantic recognition model and the behavior template through the incremental learning mechanism, without the need to recompile the rules, thereby improving the long-term adaptability of the system.
[0059] It should be noted that the automated testing method provided by the embodiment of the present application uses a semantic model to intelligently identify and classify unstructured logs; constructs a business behavior graph model to support process visualization and structured analysis; uses a graph matching algorithm for path comparison to realize operation consistency verification; introduces unsupervised learning to realize abnormal path detection and trace positioning; and supports dynamic updating and self-adaptation of behavior templates and semantic rules.
[0060] The automatic testing method provided in the embodiments of the present application first acquires the service operation log generated in the functional verification process of the chip module, and converts the service operation log into corresponding service events; then, a service operation path graph is constructed based on the obtained service events, and the service operation path graph is matched with a standard behavior trajectory template to generate a trajectory matching result; finally, in the case that the trajectory matching result indicates that the trajectories are inconsistent, abnormality detection is performed, and a final test result is generated based on the abnormality detection result; wherein the abnormality detection is used to locate the abnormal trigger cause and the abnormal time period. In this way, whether there is an abnormality in the test process is determined by comparing the behavior trajectories, which greatly improves the test efficiency and accuracy.
[0061] It should be noted that the execution subject of the automatic testing method provided in the embodiments of the present application can be an automatic testing device, or a control module in the automatic testing device for executing the automatic testing method. The automatic testing device provided in the embodiments of the present application is described by taking the automatic testing device executing the automatic testing method as an example.
[0062] It should be noted that the automatic testing method shown in each method figure described above in the embodiments of the present application is described by taking one of the figures in the embodiments of the present application as an example. In the specific implementation, the automatic testing method shown in each method figure can also be implemented in combination with any other figure that can be combined as described above, and details are not described herein.
[0063] The automatic testing device provided in the present application is described below, and the automatic testing method described below can be correspondingly referred to the automatic testing method described above.
[0064] Figure 4 The structure diagram of the automatic testing device provided in the embodiments of the present application is shown in FIG. 4, and specifically includes: Figure 4 The log conversion module 401 is configured to acquire the service operation log generated in the functional verification process of the chip module, and convert the service operation log into corresponding service events; the trajectory matching module 402 is configured to construct a service operation path graph based on the obtained service events, and perform trajectory matching between the service operation path graph and a standard behavior trajectory template to generate a trajectory matching result; the abnormality detection module 403 is configured to perform abnormality detection in the case that the trajectory matching result indicates that the trajectories are inconsistent, and generate a final test result based on the abnormality detection result; wherein the abnormality detection is used to locate the abnormal trigger cause and the abnormal time period.
[0065] Optionally, the log conversion module 401 is specifically configured to convert the business operation log into a structured business event by using a semantic recognition model to perform text analysis and business meaning recognition on the business operation log.
[0066] Optionally, the trajectory matching module 402 is specifically configured to analyze the obtained business event, determine the execution order and logical dependency between each business event, and construct a behavior trajectory graph by taking the business event as a node, the execution order and the logical dependency as edges, to obtain the business operation path graph.
[0067] Optionally, the trajectory matching module 402 is specifically configured to obtain a standard behavior trajectory template generated based on an expected business process in a test case, and perform trajectory matching between the business operation path graph and the standard behavior trajectory template by using a graph comparison algorithm to generate a trajectory matching result; wherein the trajectory matching result is used to represent whether any of the following exists in the business operation path graph: event missing, order error, and path deviation.
[0068] Optionally, the anomaly detection module 403 is specifically configured to, if the trajectory matching result indicates that the trajectories do not match, determine whether a current behavior trajectory indicated by the business operation path graph deviates from a historical normal behavior trajectory by using an isolation forest algorithm; and the anomaly detection module 403 is specifically further configured to, if a determination result indicates that the current behavior trajectory deviates from the historical normal behavior trajectory, determine that an anomaly exists, and locate an abnormal triggering cause and an abnormal time period based on context information; wherein the context information is used to represent events occurring before and after an abnormal event.
[0069] Optionally, the anomaly detection module 403 is specifically configured to generate a final test result based on the anomaly detection result and the trajectory matching result; wherein the test result includes target result information and verification report information generated based on the target result information; and the target result information includes the business operation log and result information of each stage.
[0070] Optionally, the device further includes an adjustment module; the adjustment module is configured to, in the case of a test environment change, update the semantic recognition model and the standard behavior trajectory template by incremental learning, and perform automatic mechanical energy testing based on the updated semantic recognition model and the standard behavior trajectory template; wherein the test environment change includes any of the following: chip module update, log format adjustment, and business process change.
[0071] The automatic testing device provided in the application first acquires a service operation log generated in a functional verification process of a chip module, and converts the service operation log into corresponding service events; then, a service operation path graph is constructed based on the obtained service events, and the service operation path graph is matched with a standard behavior track template to generate a track matching result; finally, in a case where the track matching result indicates that the tracks are inconsistent, abnormality detection is performed, and a final test result is generated based on an abnormality detection result; wherein the abnormality detection is used to locate an abnormality triggering cause and an abnormality time period. In this way, whether there is an abnormality in a test process is determined by performing behavior track comparison, which greatly improves test efficiency and accuracy.
[0072] Figure 5 An example of a schematic diagram of a physical structure of an electronic device is shown in Figure 5 The electronic device can include a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 complete mutual communication through the communications bus 540. The processor 510 can invoke a logical instruction in the memory 530 to execute an automatic testing method, which includes: first, acquiring a service operation log generated in a functional verification process of a chip module, and converting the service operation log into corresponding service events; then, constructing a service operation path graph based on the obtained service events, and matching the service operation path graph with a standard behavior track template to generate a track matching result; finally, in a case where the track matching result indicates that the tracks are inconsistent, performing abnormality detection, and generating a final test result based on an abnormality detection result; wherein the abnormality detection is used to locate an abnormality triggering cause and an abnormality time period. In this way, whether there is an abnormality in a test process is determined by performing behavior track comparison, which greatly improves test efficiency and accuracy.
[0073] Further, the logic instructions in the memory 530 described above can be implemented in the form of software functional units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0074] In another aspect, the present application also provides a computer program product, which includes a computer program stored on a computer readable storage medium, and the computer program includes program instructions, when the program instructions are executed by a computer, the computer can execute the automatic test method provided by the above-mentioned methods, and the method includes the following steps: first, obtaining a business operation log generated in a functional verification process of a chip module, and converting the business operation log into corresponding business events; then, constructing a business operation path graph based on the obtained business events, and performing trajectory matching between the business operation path graph and a standard behavior trajectory template to generate a trajectory matching result; finally, in the case that the trajectory matching result indicates that the trajectories are inconsistent, performing abnormality detection, and generating a final test result based on the abnormality detection result; wherein the abnormality detection is used to locate an abnormality trigger cause and an abnormality time period. In this way, whether there is an abnormality in the test process is judged by performing behavior trajectory comparison, which greatly improves the test efficiency and accuracy.
[0075] In another aspect, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the automatic test method provided by the above-mentioned methods, and the method includes the following steps: first, obtaining a business operation log generated in a functional verification process of a chip module, and converting the business operation log into corresponding business events; then, constructing a business operation path graph based on the obtained business events, and performing trajectory matching between the business operation path graph and a standard behavior trajectory template to generate a trajectory matching result; finally, in the case that the trajectory matching result indicates that the trajectories are inconsistent, performing abnormality detection, and generating a final test result based on the abnormality detection result; wherein the abnormality detection is used to locate an abnormality trigger cause and an abnormality time period. In this way, whether there is an abnormality in the test process is judged by performing behavior trajectory comparison, which greatly improves the test efficiency and accuracy.
[0076] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0077] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0078] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An automated testing method, characterized in that, include: Obtain the business operation logs generated by the chip module during the functional verification process, and convert the business operation logs into corresponding business events; Based on the obtained business events, a business operation path diagram is constructed, and the business operation path diagram is matched with a standard behavior trajectory template to generate a trajectory matching result. If the trajectory matching result indicates a mismatch, anomaly detection is performed, and a final test result is generated based on the anomaly detection result. The anomaly detection is used to locate the cause of the anomaly and the time period of the anomaly.
2. The automated testing method according to claim 1, characterized in that, The step of converting the business operation log into corresponding business events includes: The business operation logs are analyzed using a semantic recognition model to identify their textual meaning and business implications, and then converted into structured business events.
3. The automated testing method according to claim 1 or 2, characterized in that, The construction of the business operation path diagram based on the obtained business events includes: The obtained business events are analyzed to determine the execution order and logical dependencies between each business event. The business events are used as nodes, and the execution order and logical dependencies are used as edges to construct a behavior trajectory graph, thus obtaining the business operation path graph.
4. The automated testing method according to claim 3, characterized in that, The step of matching the business operation path map with a standard behavior trajectory template to generate a trajectory matching result includes: Obtain a standard behavior trajectory template generated based on the expected business process in the test case, and use a graph comparison algorithm to match the business operation path graph with the standard behavior trajectory template to generate trajectory matching results; The trajectory matching result is used to characterize whether any of the following exists in the business operation path diagram: missing events, incorrect sequence, and path deviation.
5. The automated testing method according to claim 4, characterized in that, The anomaly detection, performed when the trajectory matching result indicates a mismatch, includes: If the trajectory matching result indicates a mismatch, the isolated forest algorithm is used to determine whether the current behavior trajectory indicated by the business operation path map deviates from the historical normal behavior trajectory. If the judgment result indicates that the current behavior trajectory deviates from the historical normal behavior trajectory, then an anomaly is determined to exist, and the cause of the anomaly and the time period of the anomaly are located based on the context information; The context information is used to characterize events that occur before and after the abnormal event.
6. The automated testing method according to claim 5, characterized in that, The generation of the final test result based on the anomaly detection results includes: Based on the anomaly detection results and the trajectory matching results, the final test results are generated; The test results include: target result information and verification report information generated based on the target result information; the target result information includes: business operation logs and result information of each stage.
7. The automated testing method according to claim 1, characterized in that, The method further includes: In the event of a change in the testing environment, the semantic recognition model and standard behavior trajectory template are updated through incremental learning, and the mechanical energy is automatically tested based on the updated semantic recognition model and standard behavior trajectory template. The changes to the test environment include any of the following: chip module updates, log format adjustments, and changes to business processes.
8. An automated testing device, characterized in that, The device includes: The log conversion module is used to acquire the business operation logs generated by the chip module during the functional verification process, and convert the business operation logs into corresponding business events. The trajectory matching module is used to construct a business operation path map based on the obtained business events, and to perform trajectory matching between the business operation path map and a standard behavior trajectory template to generate trajectory matching results. An anomaly detection module is used to perform anomaly detection when the trajectory matching result indicates that the trajectory does not match, and to generate a final test result based on the anomaly detection result; The anomaly detection is used to locate the cause of the anomaly and the time period of the anomaly.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the automated testing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the automated testing method as described in any one of claims 1 to 7.