Scene verification-based burying point verification method and medium
Through the artificial intelligence model, the test cases are converted into Cucumber code, and combined with the dynamic positioning strategy of multimodal positioning feature set, the problems of inefficiency and ease of failure in existing buried point verification are solved, and the efficiency and robustness of automated buried point verification are achieved.
Patent Information
- Application Number
- CN202510619598.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-15
AI Technical Summary
The existing buried point verification method relies on manual operations, is inefficient and susceptible to UI element iteration, resulting in frequent failure of automated test scripts and consuming a lot of human resources.
Through the artificial intelligence model, the test cases are converted into Cucumber code, combined with the multimodal positioning feature set of UI elements, a dynamic positioning strategy is generated, automated buried point verification is realized, manual intervention is reduced, and the robustness of the positioning strategy is improved.
It realizes end-to-end automation from test requirements to script code, reduces manual recording operations, improves the efficiency of buried point verification, and reduces script maintenance requirements caused by UI iteration.
Smart Images

Figure CN120492347A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software technology, in particular to the field of data verification technology, and in particular to a scene-based verification method and medium for tracking verification. Background Art
[0002] In the era of big data, most web and app products utilize third-party or self-developed data systems to collect user behavior data and other information. Tracking is a crucial component of this process. Tracking involves collecting data from specific application processes to track usage, further optimize the product, and provide operational data support. Data such as visit counts, clicks, dwell time, page views, and bounce rates are crucial. Verification of tracking is crucial; accurate tracking is highly valuable for optimizing product design, selecting iteration paths, and achieving business goals.
[0003] Existing tracking and verification methods often involve manual tracking operations after communication with technical personnel, with manual verification of accuracy based on the data provided. Manual tracking verification requires numerous repeated clicks and one-to-one data comparisons, making it extremely labor-intensive and prone to errors. This not only involves a large amount of repetitive work but also occupies significant online resources.
[0004] Based on this, in order to achieve automated tracking verification, related technologies mainly generate automated test scripts through manual operation recording. Specifically, the tester manually performs page operations (such as clicking buttons and sliding lists), and then uses automated testing tools (such as Selenium IDE and Appium Recorder) to record the page operation behavior and generate automated test script code. When recording manual operations, the tool captures the UI element properties of the current operation in real time and generates an element locator. Therefore, the automated test script contains static positioning logic of UI elements based on the element locator.
[0005] However, the generation of the above test scripts requires manual operation as a prerequisite, which is labor-intensive and inefficient. In addition, the element locator generated by the tool directly depends on the Document Object Model (DOM) attributes during recording. When the DOM attributes (such as ID, hierarchy) change during the business iteration process, the element locator cannot dynamically change the UI positioning logic. At this time, the static positioning logic of the UI elements in the automated test script needs to be manually modified, otherwise the automated test script will become invalid due to the change of UI element attributes. As a result, a large amount of manual operation is involved in the development and maintenance of the automated test script, which directly affects the efficiency of the tracking verification. Summary of the Invention
[0006] In view of this, the embodiments of the present application provide a scenario-based verification method, device, equipment, medium and product, which can reduce manual intervention in the development and maintenance of automated test scripts, thereby improving the efficiency of verification.
[0007] In the first aspect, an embodiment of the present application provides a scene-based tracking verification method, the method comprising: when a test case associated with a test scenario is obtained, converting the test case into Cucumber code based on an artificial intelligence model, wherein the test scenario is used to test multiple tracking events in a target page, and the multiple tracking events are triggered by M target UI elements in each UI element of the target page; for each UI element, based on the element type to which the UI element belongs, screening matching target static positioning features for it from all static positioning features corresponding to the element locator, and combining the target static positioning features and visual features to form a multimodal positioning feature set of the UI element, wherein both the static positioning features and the visual features are positioning features; from the In the structured description information, the first feature value of all positioning features in the corresponding multimodal positioning feature set is extracted to obtain the dynamic positioning strategy of each UI element; the associated target UI element is matched for the Cucumber code from each UI element, and the test case code is generated by combining the Cucumber code and the dynamic positioning strategy of the target UI element; by executing the test case code, the M target UI elements in the target page are adaptively multimodally positioned based on the dynamic positioning strategy, and multiple tracking events are triggered through interactive operations with the M target UI elements; the tracking data corresponding to the multiple tracking events are obtained to obtain multiple tracking data, and based on the tracking verification rules associated with the test scenario, the multiple tracking data are scenario-verified to obtain scenario verification results.
[0008] In the second aspect, an embodiment of the present application provides a scene-based tracking verification device, which includes: a conversion module for converting the test case into Cucumber code based on an artificial intelligence model when a test case associated with the test scenario is obtained, wherein the test scenario is used to test multiple tracking events in the target page, and the multiple tracking events are triggered by M target UI elements in each UI element of the target page; a matching module for screening matching target static positioning features for each UI element from all static positioning features corresponding to the element locator based on the element type of the UI element, and combining the target static positioning features and visual features to form a multimodal positioning feature set of the UI element, wherein both the static positioning features and the visual features are positioning features; an extraction module for extracting the matching target static positioning features from the structure of each UI element The first feature value of all positioning features in the corresponding multimodal positioning feature set is extracted from the description information to obtain the dynamic positioning strategy of each UI element; the code generation module is used to match the associated target UI element for the Cucumber code from each UI element, and generate the test case code in combination with the Cucumber code and the dynamic positioning strategy of the target UI element; the execution module is used to perform adaptive multimodal positioning of the M target UI elements in the target page based on the dynamic positioning strategy by executing the test case code, and trigger multiple tracking events through interactive operations with the M target UI elements; the tracking verification module is used to obtain the tracking data corresponding to multiple tracking events, obtain multiple tracking data, and perform scenario verification on the multiple tracking data based on the tracking verification rules associated with the test scenario to obtain scenario verification results.
[0009] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the scene-verification-based point verification method of the first aspect are implemented.
[0010] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the steps of the scene-verification-based tracking verification method of the first aspect are implemented.
[0011] In a fifth aspect, an embodiment of the present application provides a computer program product, which is stored in a non-volatile storage medium. When the computer program product is executed by a processor, it implements the steps of the scene-based verification method for tracking points as in the first aspect.
[0012] In the sixth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the scene-verification-based tracking verification method as in the first aspect.
[0013] The present application provides a method, device, equipment, medium and product for scene verification based on embedded point verification. The test requirements are described in natural language, and the test requirements input by the user are automatically converted into Cucumber code through an artificial intelligence model. Then, the test case code can be generated by combining the Cucumber code and the dynamic positioning strategy of the target UI element, so as to achieve end-to-end automation from test requirements to script code. There is no need to manually perform page operations for recording, which effectively reduces human intervention. In addition, the multimodal positioning feature is composed of the static positioning feature and visual feature corresponding to the element locator. In this way, for a simple iteration of the UI element, if the static positioning feature cannot be used to locate the UI element, the visual feature can continue to be used to locate the UI element, which solves the positioning vulnerability problem caused by relying on a single document object model (DOM) attribute in the traditional embedded point verification, and improves the robustness of the positioning strategy. In addition, when performing simple iterations such as UI styles, there is no need to manually adjust the positioning logic of each UI element. The dynamic positioning strategy generated by the corresponding multimodal positioning feature set can maximize the success rate of UI element positioning, reduce script maintenance caused by UI iteration, and reduce dependence on manual maintenance. In this way, by reducing manual intervention in the development and maintenance of automated test scripts, the efficiency of point verification can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.
[0015] Figure 1 This is a flow chart of a method for verifying a tracking point based on scene verification provided by an embodiment of the present application;
[0016] Figure 2 This is an exemplary schematic diagram of the Cucumber code provided in one embodiment of the present application;
[0017] Figure 3 This is a flow chart of a method for verifying a tracking point based on scene verification provided by another embodiment of the present application;
[0018] Figure 4 This is a structural diagram of a scene-based verification device provided in an embodiment of the present application;
[0019] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirit of the present application clearer and more thorough, so that those skilled in the art can better understand and implement the principles and spirit of the present application. The exemplary embodiments provided herein are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments herein, all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of this application.
[0021] In this document, terms such as first, second, and third are only used to distinguish one entity (or operation) from another entity (or operation), and are not intended to require or imply any order or relationship between these entities (or operations).
[0022] The following is a brief description of the concepts, technical terms and other related contents that may be involved in the embodiments of this application.
[0023] Tracking data or tracking data analysis is a commonly used data collection method for website analysis. It refers to attaching data collection program code to the functional program code at the "operation node" where data needs to be collected, and capturing, processing and sending related technologies and implementation processes for user behaviors or events on the operation node.
[0024] Cucumber code is a test script based on behavior-driven development (BDD). It describes test scenarios through Feature files written in natural language (such as Gherkin syntax) and maps them to specific automated test codes, enabling highly readable and collaborative business process verification.
[0025] The following, in combination with the accompanying drawings, describes in detail the scene-check-based tracking verification method provided by the embodiment of the present application through specific embodiments and their application scenarios.
[0026] Figure 1 This is a flow chart of a scene-verification-based burial point verification method provided in one embodiment of the present application. The executor of the scene-verification-based burial point verification method may be an electronic device.
[0027] The following takes the execution subject of the scene-based verification method as an electronic device as an example to illustrate the scene-based verification method of the present application. It should be noted that the above execution subject and application scenario do not constitute a limitation of the present application.
[0028] like Figure 1 As shown, the scene verification-based tracking verification method provided in the embodiment of the present application may include steps 110 to 150.
[0029] Step 110 , when test cases associated with the test scenarios are obtained, convert the test cases into Cucumber code based on the artificial intelligence model;
[0030] Step 120: For each UI element, based on the element type of the UI element, a matching target static positioning feature is selected from all static positioning features corresponding to the element locator, and the target static positioning feature and the visual feature are combined to form a multimodal positioning feature set for the UI element.
[0031] Step 130: extracting the first feature values of all positioning features in the corresponding multimodal positioning feature set from the structured description information of each UI element, and obtaining a dynamic positioning strategy for each UI element;
[0032] Step 140 , matching the target UI element associated with the Cucumber code from each UI element, and generating test case code by combining the Cucumber code and the dynamic positioning strategy of the target UI element;
[0033] Step 150: By executing the test case code, adaptive multimodal positioning is performed on the M target UI elements in the target page based on the dynamic positioning strategy, and multiple tracking events are triggered through interactive operations with the M target UI elements;
[0034] Step 160, obtain the buried point data corresponding to the multiple buried point events, obtain multiple buried point data, and perform scene verification on the multiple buried point data based on the buried point verification rules associated with the test scene to obtain scene verification results.
[0035] The scenario-based tracking verification method provided by the embodiment of the present application describes the test requirements through natural language, automatically converts the test requirements input by the user into Cucumber code through an artificial intelligence model, and then generates test case code by combining the Cucumber code and the dynamic positioning strategy of the target UI element, thereby achieving end-to-end automation from test requirements to script code. There is no need for manual page operation recording, which effectively reduces manual intervention. In addition, the multimodal positioning feature is composed of static positioning features and visual features corresponding to the element locator. In this way, when the UI element is iterated, if the static positioning feature cannot be used to locate the UI element, the visual feature can continue to be used to locate the UI element, solving the positioning vulnerability problem caused by relying on a single DOM attribute in traditional tracking verification and improving the robustness of the positioning strategy. In addition, there is no need to manually adjust the positioning logic of each UI element during UI iteration. The dynamic positioning strategy generated by the corresponding multimodal positioning feature set is used to maximize the success rate of UI element positioning, reduce script maintenance caused by UI iteration, and reduce dependence on manual maintenance. In this way, by reducing manual intervention in the development and maintenance of automated test scripts, the efficiency of tracking verification can be improved.
[0036] The specific implementation of the above steps will be described in detail below with reference to specific embodiments.
[0037] In step 110 , when test cases associated with the test scenarios are obtained, the test cases are converted into Cucumber codes based on an artificial intelligence (AI) model.
[0038] In step 110, the test case is the test requirement related to the test scenario input by the user. By inputting the test case into the AI model, natural language processing (NLP) can be performed on the test case to automatically convert the test requirement input by the user into Cucumber code that conforms to the Gherkin syntax.
[0039] The test scenario is used to test multiple embedded events in a target page. These embedded events are triggered by M target UI elements in the target page. That is, the embedded events are triggered by page interactions with the M target UI elements, such as clicks, long presses, swipes, and browsing. M is a positive integer. The target page can contain at least one page. Different embedded events can be triggered by the same target UI element or by different target UI elements. This application does not impose specific restrictions on this.
[0040] For example, the test case for user input is: Test scenario: User login failure processing; Operation steps: Open the login page, enter the wrong username and password in the input box, click the login button; Expected result: Display the prompt "Username or password is incorrect" and the login button becomes disabled. The Cucumber code converted based on this test case can be as follows Figure 2 shown.
[0041] Based on the above example, multiple tracking events are "clicking the application icon to open the login page, entering an incorrect username and password in the input box, and clicking the login button." The input box and login button on the page are both target UI elements.
[0042] Involving step 120, for each UI element, based on the element type to which the UI element belongs, a matching target static positioning feature is screened from all static positioning features corresponding to the element locator, and the target static positioning feature and the visual feature are combined to form a multimodal positioning feature set of the UI element.
[0043] In step 120, different element types match different target static positioning features, and thus different element types correspond to different sets of multimodal positioning features. This application refers to visual features and static positioning features as positioning features. The target static positioning features contain at least one static positioning feature, plus one visual feature. This means that each multimodal positioning feature set contains at least two positioning features. This multimodal positioning feature set is used to dynamically locate UI elements on the target page.
[0044] Static positioning features are the DOM attributes and DOM structure used by the element locator to statically locate UI elements. Static positioning features can be divided into two categories: basic attribute features corresponding to DOM attributes, and hierarchical relationship features corresponding to the DOM structure. Basic attribute features include at least: ID, position, and control type. Hierarchical relationship features include at least: parent container path XPath.
[0045] Traditional methods in the past used fixed features (e.g., relying solely on IDs) for all UI elements. This resulted in positioning failures for elements like list items and multimedia due to a lack of stable IDs. Alternatively, a single static feature (e.g., ID alone) would become completely ineffective after attribute changes, necessitating manual re-recording of positioning logic. Furthermore, without distinguishing between element types, complex scenarios like dynamic lists and floating controls were difficult to handle, requiring the development of separate positioning rules for each scenario.
[0046] In some embodiments of the present application, element types may include basic interactive controls, composite container controls, dynamic list items, and multimedia controls. The target static positioning features corresponding to the basic interactive controls may include an identifier ID, text content Text, a parent container path Xpath, a position position, and a control type. The target static positioning features corresponding to the composite container control may include an ID, Xpath, and a position. The target static positioning features corresponding to the dynamic list items may include an Xpath index. The target static positioning features corresponding to the multimedia controls may include a position.
[0047] Exemplarily, basic interactive controls may include at least: buttons, links, labels, radio buttons, check boxes, tabs, breadcrumb navigation, and tooltips; composite container controls may include at least: modal boxes, toolbars, navigation menus, accordion panels, dialog boxes, cards, pagers, and accordion menus; dynamic list items may include at least: list items, drop-down menus, tree nodes, step bars, carousels, and table rows; multimedia / special components may include at least: pictures, video players, charts, maps, loading animations, and rich text editors.
[0048] In this way, for elements with different functions / structures (such as buttons, lists, and multimedia), their most stable and representative static features are screened (for example, buttons prioritize ID and Text, and list items use XPath indexes) to avoid interference from invalid features and improve the accuracy and specificity of element positioning.
[0049] In step 130 , first feature values of all positioning features in the corresponding multimodal positioning feature set are extracted from the structured description information of each UI element to obtain a dynamic positioning strategy for each UI element.
[0050] In step 130, structured description information of each UI element can be extracted from the screenshot of the target page. The first feature value is the feature value of the positioning feature in the structured description information. After combining the first feature values of all positioning features in the same multimodal positioning feature set, a dynamic positioning strategy is obtained.
[0051] Specifically, the screenshots of the target page are all UI element interfaces. By performing OCR recognition on them through the AI model, structured description information in json format of the UI elements can be extracted. The structured description information at least includes the basic attributes, hierarchical relationships and visual features of the UI elements. The basic attributes include at least: identification ID, control type (Button / TextBox / Dropdown, etc.), text content (text recognized by Optical Character Recognition), position (relative coordinates or absolute coordinates), size (width / height), visual features (color / transparency / shape, etc.). The hierarchical relationship includes at least: parent container path (XPath / CSS selector), child element relationship tree, and adjacent element features. Visual features are features recognized by the Computer Vision Model.
[0052] In step 140 , the target UI element associated with the Cucumber code is matched from each UI element, and the test case code is generated by combining the Cucumber code and the dynamic positioning strategy of the target UI element.
[0053] In step 140, a mapping engine is used to match the target UI elements associated with the Cucumber code based on matching schemes such as exact matching, alias matching, keyword fuzzy matching, and type matching. The Cucumber code and the dynamic positioning strategy of the target UI elements associated with it are combined to obtain the test code for each target UI element.
[0054] The above step 140 combines the Cucumber code and the dynamic positioning strategy of the target UI element to generate the test case code, which may specifically include: performing NLP semantic analysis on the Cucumber code to obtain an abstract syntax tree; converting the abstract syntax tree and the dynamic positioning strategy of the target UI element into Airtest code to obtain the test case code.
[0055] For example, the Cucumber code includes "When the user enters "test@example.com" in the "Username Input Box", then a "Login Successful" prompt should be displayed." After NLP semantic analysis, the following abstract syntax tree can be obtained:
[0056] {"type":"When",
[0057] "steps":[{"action":"set_text",
[0058] "element":{"ref":"username_field"},
[0059] "value":"test@example.com"}]};
[0060] Find the corresponding target UI element according to the "user name input box" in the Cucumber code above, and then inject the following dynamic positioning strategy information of the target UI element into the abstract syntax tree:
[0061] {"action":"click",
[0062] "element":{"type":"xpath",
[0063] "value":" / / *[@text='Login']"}};
[0064] Finally, by calling the code generator, combining the abstract syntax tree and the dynamic positioning strategy information of the target UI element to generate the Airtest code, the final executable test case code is obtained.
[0065] In an embodiment of the present application, Cucumber code is used to describe the execution behavior of the buried event, that is, "what to do", and the dynamic positioning strategy of the UI element is used to describe the execution object of the buried event, "where to do it". Therefore, by converting the Cucumber code into an abstract syntax tree and combining it with the dynamic positioning strategy, the Airtest code for executing the buried event (that is, "how to do it") can be generated to realize automatic code generation of test cases. This design eliminates errors in manually written scripts, such as XPath path errors, and ensures that the test logic (Cucumber steps) is seamlessly connected with the underlying positioning strategy (multimodal features). When the UI element style is simply iterated, there is no need to update the test case code. When the UI element is complexly iterated, only the feature set needs to be updated without rewriting the script, thereby improving the maintainability and cross-platform consistency of the buried verification (such as the same test case is adapted to the Web and mobile terminals).
[0066] As a specific example, Figure 3 As shown, Cucumber code can be generated by entering test cases, and structured description information of UI elements can be trained and generated based on screenshots of the target page. The two are combined to obtain the Airtest script. The feasibility of the process is verified by replaying the Airtest script, and a new automated task is created. The automated task is the scenario tracking task information of this application. The branch is judged by "whether to execute on schedule": if the path is configured, the cron expression is realized to achieve scheduled triggering; if the path is not, it goes directly to the subsequent process, that is, the "configure mock records, test scenarios" are uniformly executed to complete the test environment simulation, and finally the complete test process is executed. The process ends after the test report is output.
[0067] Involving step 150, by executing the test case code, adaptive multimodal positioning is performed on the M target UI elements in the target page based on the dynamic positioning strategy, and multiple tracking events are triggered through interactive operations with the M target UI elements.
[0068] In step 150, for each target UI element, the first feature value of the target static positioning feature in the dynamic positioning strategy corresponding to the target UI element is first used to locate the UI element that matches the first feature value from the front-end running code of the target page. If no match is found, it is determined that the attribute of the target UI element has been updated and the target UI element cannot be located. At this time, the first feature value of the visual feature in the dynamic positioning strategy corresponding to the target UI element is continued to be used to locate the UI element that matches the first feature value from the front-end running code of the target page, thereby achieving adaptive multimodal positioning.
[0069] In some embodiments of the present application, the dynamic positioning strategy of the UI element may further include the priorities of all positioning features in the corresponding multimodal positioning feature set. The above step 150 performs adaptive multimodal positioning on the M target UI elements in the target page based on the dynamic positioning strategy, and may specifically include the following steps:
[0070] For each target UI element, based on the priority and the first feature value of the positioning feature in the dynamic positioning strategy of the target UI element, UI elements are matched from the target page, and the matched UI element is determined as the target UI element.
[0071] Specifically, the priority is positively correlated with the accuracy of UI element positioning of the positioning feature. Except for the control type, the priority of most target static positioning features is higher than that of the visual feature. Therefore, based on the priority of the positioning feature in the dynamic positioning strategy of the target UI element, the first feature value corresponding to the target static positioning feature can be used to match the UI element from the target page. If no match is found, the first feature value corresponding to the visual feature can be used to match the UI element from the target page to achieve dynamic positioning of the UI element.
[0072] As a specific example, the priority order of different element types is as follows:
[0073] Basic interactive controls: ID > text content > XPath > position > visual features > control type;
[0074] Composite container control: ID > parent container positioning > position > visual characteristics;
[0075] Dynamic list items: Xpath index > visual features;
[0076] Multimedia components: position > visual characteristics.
[0077] In this way, a hierarchical positioning strategy is implemented by assigning a priority to each positioning feature in the multimodal positioning feature set (e.g., ID is used first, followed by Text). During positioning, the system attempts to match in order of priority, and terminates the match once a high-priority feature is successful, avoiding inefficient full feature calculations. This mechanism significantly reduces computing resource consumption (especially in highly dynamic pages) while ensuring the positioning success rate, and ensures the priority use of key features (such as unique IDs), thereby improving overall positioning efficiency.
[0078] In some embodiments of the present application, matching a UI element from a target page based on the priority and first feature value of the positioning feature in the dynamic positioning strategy of the target UI element may specifically include:
[0079] According to the order of priority of all positioning features in the dynamic positioning strategy from high to low, the first feature value of each positioning feature is used to match UI elements in the target page until the target UI element consistent with the first feature value is determined from the various UI elements on the target page. Matching is stopped and it is determined that the target UI element is successfully positioned.
[0080] For example, for the basic interactive control "prompt box", when the corresponding feature value of the highest priority "ID" is not matched, it is necessary to continue to match using the corresponding feature value of the next positioning feature "text content". If the target UI element is successfully matched in the code running on the front end of the target page, it is determined that the positioning is successful, and there is no need to continue matching using XPath, position, visual features and control types.
[0081] This design optimizes real-time location performance (especially for large-scale pages) while reducing the risk of conflicts caused by concurrent matching of multiple features (e.g., multiple elements partially matching different features), ensuring the uniqueness and certainty of location results.
[0082] In some embodiments of the present application, the multimodal positioning feature set of the target UI element includes N positioning features. Matching the UI element from the target page based on the priority and first feature value of the positioning features in the dynamic positioning strategy of the target UI element may specifically include the following steps:
[0083] Select the positioning feature with the highest priority from the multimodal positioning feature set to obtain the target positioning feature;
[0084] Matching UI elements from the target page using the first feature value of the target positioning feature;
[0085] If the first feature value of the target positioning feature cannot be matched, the second feature value of each UI element under N positioning features is obtained from the front-end running code of the target page;
[0086] Determine a first similarity between each UI element and the target UI element based on the N first feature values of the N positioning features and the N second feature values of each UI element under the N positioning features;
[0087] The UI element with the highest first similarity among the UI elements is determined as the target UI element.
[0088] Specifically, for each UI element in the target page, based on the first feature value and the second feature value under the same positioning feature, the similarity between the UI element and the target UI element under a single positioning feature is determined. Each UI element and the target UI element can correspond to N similarities under N positioning features. After averaging the N similarities, the comprehensive element similarity under multiple positioning features can be obtained.
[0089] In this way, when the high-priority feature matching fails, fault-tolerant positioning is achieved by comprehensively evaluating the similarity of all remaining positioning features (comparing the first feature value of the target UI element with the second feature value of the page element). Even if a single feature fails (such as an ID change), accurate positioning can still be achieved through the similarity of multiple positioning features (such as Text+XPath+Vision). This mechanism can improve the adaptability to dynamic UI (such as A / B test pages) and random attributes (such as temporary IDs generated by React), ensuring robustness when traditional locators completely fail.
[0090] In related technologies, if the target positioning feature is an ID, and the target UI element cannot be matched using the ID, it means that the ID of the UI element has changed. If the ID is introduced when calculating the similarity at this time, an error will be introduced, affecting the accuracy of the similarity result.
[0091] Based on this, in some embodiments of the present application, the above-mentioned determination of the first similarity between each UI element and the target UI element based on the N first feature values of the N positioning features and the N second feature values of each UI element under the N positioning features may include: when the target positioning feature is ID, determining the first similarity between each UI element and the target UI element based on the N-1 first feature values of the N-1 positioning features other than the ID and the N-1 second feature values of each UI element under the N-1 positioning features.
[0092] In this way, it is possible to avoid using an incorrect ID to calculate the first similarity between the UI element and the target UI element, thereby improving the accuracy of similarity calculation.
[0093] In some embodiments of the present application, the dynamic positioning strategy of the target UI element may further include N first weight values corresponding to N positioning features. Determining the first similarity between each UI element and the target UI element based on the N first feature values of the N positioning features and the N second feature values of each UI element under the N positioning features may specifically include the following steps:
[0094] For each UI element, based on the first feature value and the second feature value under the same positioning feature, determine the similarity between the UI element and the target UI element under the single positioning feature;
[0095] Based on the N similarities between each UI element and the target UI element under the N positioning features and the N first weight values, a first similarity between each UI element and the target UI element is determined.
[0096] Among them, in each multimodal positioning feature set, the first weight value is positively correlated with the priority. The higher the priority, the higher the first weight value corresponding to the positioning feature.
[0097] As a specific example, for basic interactive controls: weight = 'text': 0.4, 'xpath': 0.3, 'position': 0.2, 'visual': 0.08, 'type': 0.02; for composite container controls: weight = 'parent': 0.5, 'position': 0.3, 'visual': 0.2; for dynamic list items: weight = 'xpath': 0.7, 'visual': 0.3; for multimedia components: weight = 'position': 0.6, 'visual': 0.4.
[0098] In this way, after assigning a corresponding multimodal positioning feature set to each element type, the present application can continue to adaptively assign weight values to each positioning feature in the multimodal positioning feature set, reflecting the difference in importance of different positioning features in the same multimodal positioning feature set in the similarity calculation. For example, for button controls, the weights of ID and Text are higher than position, avoiding mismatches caused by layout fine-tuning (position changes). This design makes similarity evaluation more consistent with business logic and improves the semantic accuracy of positioning results, such as giving priority to matching features with strong functional semantics, while supporting dynamic adjustment of weights to better adapt to specific page scenarios, such as visual-based game interfaces.
[0099] In related technologies, when using a single static feature (such as XPath) for positioning, if there are multiple elements of the same type on the target page (such as multiple "Exposure" buttons), traditional solutions will fail to match due to repeated features (returning the first element in the list or directly reporting an error).
[0100] In some embodiments of the present application, after matching UI elements from the target page, the following steps may also be included:
[0101] When at least two UI elements are matched from the target page based on the first feature value of the same positioning feature, only the first feature value corresponding to the text content Text, position Positionion, and visual feature is extracted from the structured description information of the target UI element to obtain first matching information of the target UI element;
[0102] Extract only the three second feature values corresponding to the text, position, and visual features of each UI element in the target page from the front-end running code of the target page to obtain the second matching information of each UI element;
[0103] Determining a second similarity between the target UI element and each UI element based on the first matching information and the second matching information;
[0104] The UI element with the second highest similarity among the UI elements is determined as the target UI element, and it is determined that the target UI element is successfully located.
[0105] Specifically, the three similarities corresponding to the three positioning features in the first matching information and the second matching information are calculated, and the three similarities are weighted averaged to obtain the second similarity. In this scheme, since visual features and Position are more stable than text content and are less likely to be iteratively changed, the weight values of the three positioning features are ranked from high to low as follows: Visual Features > Position > Text. The corresponding weight values can be set to 0.6, 0.3, and 0.1, respectively, or to other values, which are not specifically limited in this application.
[0106] For example, on the target page, if you locate the poco based on xpath alone (xpath=" / / Button[@text="Promote Exposure"]"), there may be multiple identical buttons. For example, on a recruitment platform page, two "Promote Exposure" buttons may be located in the "Plan List" and "Unit List" areas, respectively. Their XPaths are the same, but their positions (Position) differ significantly (e.g., the Y coordinates differ by 300px). Therefore, by calculating position similarity (e.g., the target expected position Y = 500px, candidate element A's Y = 520px, and B's Y = 800px), the interference item B can be quickly eliminated, improving positioning accuracy.
[0107] In the embodiment of the present application, considering that among all the positioning features, Text is strongly bound to the business, Position is constrained by the page layout framework, and visual features are not easily changed due to high design costs, the three are more stable and less likely to change when locating target UI elements compared to other positioning features. Based on this, when more than one UI element is located from the target page based on a single positioning feature, stable feature screening (Text / Position / Vision) and multimodal similarity matching are used to improve the positioning success rate in high-frequency UI changes (such as Class name adjustments), resist the risk of failure of volatile features such as ID / XPath, provide precise backup capabilities, improve system availability in extreme scenarios (such as front-end framework upgrades that lead to drastic changes in DOM structure), and avoid interruptions in the verification process due to full changes in element attributes. At the same time, only retaining lightweight features of 3 core dimensions to participate in similarity calculations can effectively reduce computational complexity and meet real-time requirements.
[0108] Involving step 160, acquiring the buried point data corresponding to the multiple buried point events, obtaining multiple buried point data, and performing scene verification on the multiple buried point data based on the buried point verification rules associated with the test scene to obtain scene verification results.
[0109] In step 160, the burying point verification rules may include burying point attributes and burying point attribute values of multiple burying point events in a fixed execution order.
[0110] Before performing scenario verification on the plurality of tracking data based on the tracking verification rules associated with the test scenario in step 160, the following steps may also be included:
[0111] Create scenario tracking task information corresponding to the test scenario based on the tracking information of multiple tracking events, where the tracking information includes version information and page information of the multiple tracking events, as well as tracking attributes and tracking attribute values of the multiple tracking events in a fixed execution order;
[0112] Generate a tracking trigger script associated with the test scenario based on the tracking task information of the scenario. The tracking trigger script is used to obtain tracking data after the tracking event is triggered.
[0113] Based on the scenario tracking task information, tracking verification rules associated with the test scenario are generated to determine whether the tracking attributes and tracking attribute values in multiple tracking data meet the requirements based on the tracking verification rules. The tracking verification rules include the tracking attributes and tracking attribute values of multiple tracking events in a fixed execution order.
[0114] In this way, by pre-defining the tracking task information (version, page, execution order, attribute rules) for each scenario and generating the tracking trigger script, the tracking data can be traced throughout its entire lifecycle. For example, when verifying a shopping cart order scenario, the tracking attributes in the order of "add to cart → checkout → payment" are strictly verified to avoid out-of-order events or missing parameters. This mechanism implements standardization and automated assertions for tracking verification, resolving the subjectivity and missed detection issues of traditional manual verification. It is particularly suitable for compliance reviews of complex business processes (such as cross-page jumps).
[0115] Corresponding to the method embodiment of the present application, the present application also provides a scene-based verification point verification device.
[0116] Figure 4 This is a schematic diagram of the structure of a scene-based verification device provided by an embodiment of the present application. Figure 4 As shown, the scene-verification-based tracking verification device 400 may include: a conversion module 410, a matching module 420, an extraction module 430, a code generation module 440, an execution module 450 and a tracking verification module 460.
[0117] Among them, the conversion module 410 is used to convert the test case into Cucumber code based on the artificial intelligence model when the test case associated with the test scenario is obtained, wherein the test scenario is used to test multiple buried events in the target page, and the multiple buried events are triggered by M target UI elements in each UI element of the target page; the matching module 420 is used to screen the matching target static positioning features for each UI element from all static positioning features corresponding to the element locator based on the element type of the UI element, and combine the target static positioning features and visual features to form a multimodal positioning feature set of the UI element, wherein both the static positioning features and the visual features are positioning features; the extraction module 430 is used to extract the corresponding multimodal positioning features from the structured description information of each UI element. The first feature value of all positioning features in the feature set is used to obtain the dynamic positioning strategy of each UI element; the code generation module 440 is used to match the associated target UI element for the Cucumber code from each UI element, and generate the test case code in combination with the Cucumber code and the dynamic positioning strategy of the target UI element; the execution module 450 is used to perform adaptive multimodal positioning of the M target UI elements in the target page based on the dynamic positioning strategy by executing the test case code, and trigger multiple tracking events through interactive operations with the M target UI elements; the tracking verification module 460 is used to obtain the tracking data corresponding to multiple tracking events, obtain multiple tracking data, and perform scenario verification on the multiple tracking data based on the tracking verification rules associated with the test scenario to obtain scenario verification results.
[0118] The scene-based verification point verification device provided by the embodiment of the present application describes the test requirements through natural language, automatically converts the test requirements input by the user into Cucumber code through the artificial intelligence model, and then generates the test case code by combining the Cucumber code and the dynamic positioning strategy of the target UI element, thereby realizing end-to-end automation from test requirements to script code, without the need for manual page operation for recording, and effectively reducing human intervention. In addition, the multimodal positioning feature is composed of the static positioning feature and the visual feature corresponding to the element locator. In this way, for a simple iteration of the UI element, if the static positioning feature cannot be used to locate the UI element, the visual feature can be used to locate the UI element, solving the positioning vulnerability problem caused by relying on a single document object model (DOM) attribute in the traditional point verification, and improving the robustness of the positioning strategy. In addition, when performing simple iterations such as UI styles, there is no need to manually adjust the positioning logic of each UI element. The dynamic positioning strategy generated by the corresponding multimodal positioning feature set can maximize the success rate of UI element positioning, reduce script maintenance caused by UI iteration, and reduce dependence on manual maintenance. In this way, by reducing manual intervention in the development and maintenance of automated test scripts, the efficiency of point verification can be improved.
[0119] In some embodiments of the present application, different element types correspond to different target static positioning features. The element types include basic interactive controls, composite container controls, dynamic list items, and multimedia controls. The target static positioning features corresponding to basic interactive controls include identification ID, text content Text, parent container path Xpath, position, and control type. The target static positioning features corresponding to composite container controls include ID, Xpath, and position. The target static positioning features corresponding to dynamic list items include Xpath indexes. The target static positioning features corresponding to multimedia controls include position.
[0120] In some embodiments of the present application, the execution module includes: a matching unit, which is used to match UI elements from the target page for each target UI element based on the priority and first feature value of the positioning feature in the dynamic positioning strategy of the target UI element, and determine the matched UI element as the target UI element.
[0121] In some embodiments of the present application, the matching unit is specifically used to: match UI elements in the target page using the first feature value of each positioning feature in the order of priority of all positioning features in the dynamic positioning strategy from high to low, until the target UI element consistent with the first feature value is determined from the various UI elements on the target page, and then stop matching, and determine that the target UI element is successfully positioned.
[0122] In some embodiments of the present application, the multimodal positioning feature set of the target UI element includes N positioning features, and the matching unit includes: a selection unit, which is used to select the positioning feature with the highest priority from the multimodal positioning feature set to obtain the target positioning feature; a matching unit, which is used to match the UI element from the target page using the first feature value of the target positioning feature; an acquisition unit, which is used to obtain the second feature value of each UI element under the N positioning features from the front-end running code of the target page when no match can be made using the first feature value of the target positioning feature; a determination unit, which is used to determine the first similarity between each UI element and the target UI element based on the N first feature values of the N positioning features and the N second feature values of each UI element under the N positioning features; and a determination unit, which is used to determine the UI element with the highest first similarity among the UI elements as the target UI element.
[0123] In some embodiments of the present application, the dynamic positioning strategy of the target UI element also includes N first weight values corresponding to N positioning features, and the determination unit is specifically used to: for each UI element, based on the first feature value and the second feature value under the same positioning feature, determine the similarity between the UI element and the target UI element under a single positioning feature; based on the N similarities between each UI element and the target UI element under N positioning features and the N first weight values, determine the first similarity between each UI element and the target UI element.
[0124] In some embodiments of the present application, the execution module is also used to: after matching UI elements from the target page, when at least two UI elements are matched from the target page based on the first feature value of the same positioning feature, extract only the first feature value corresponding to the text content Text, position Positionion and visual feature from the structured description information of the target UI element to obtain the first matching information of the target UI element; extract only the three second feature values corresponding to the Text, Positionion and visual feature of each UI element in the target page from the front-end running code of the target page to obtain the second matching information of each UI element; determine the second similarity between the target UI element and each UI element based on the first matching information and the second matching information; determine the UI element with the highest second similarity among the UI elements as the target UI element, and determine that the target UI element is successfully positioned.
[0125] In some embodiments of the present application, the code generation module is specifically used to: perform NLP semantic analysis on the Cucumber code to obtain an abstract syntax tree; convert the abstract syntax tree and the dynamic positioning strategy of the target UI element into Airtest code to obtain test case code.
[0126] In some embodiments of the present application, it also includes: a creation module, which is used to create scenario burying task information corresponding to the test scenario based on the burying information of multiple burying events before performing scenario verification on multiple burying data based on the burying verification rules associated with the test scenario, wherein the burying information includes version information, page information, and burying attributes and burying attribute values of multiple burying events in a fixed execution order; a code generation module, which is also used to generate a burying trigger script associated with the test scenario based on the scenario burying task information, wherein the burying trigger script is used to obtain burying data after triggering the burying event; a rule generation module, which is used to generate a burying verification rule associated with the test scenario based on the scenario burying task information, so as to determine whether the burying attributes and burying attribute values in multiple burying data meet the requirements based on the burying verification rules, wherein the burying verification rules include the burying attributes and burying attribute values of multiple burying events in a fixed execution order.
[0127] The scene verification-based tracking verification device provided in the embodiment of the present application can achieve Figure 1-3 The various processes implemented by the service platform in the method embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.
[0128] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0129] like Figure 5 As shown, the electronic device 500 includes a memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .
[0130] In an example, the processor 502 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0131] The memory 501 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the scene-based verification method for burying point verification in the embodiment of the first aspect of the present application.
[0132] The processor 502 runs the computer program corresponding to the executable program code by reading the executable program code stored in the memory 501, so as to implement the scene verification-based point verification method in the embodiment of the first aspect mentioned above.
[0133] In some examples, the electronic device 500 may further include a communication interface 503 and a bus 510. Figure 5 As shown, the memory 501 , the processor 502 , and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0134] The communication interface 503 is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. Input devices and / or output devices can also be connected through the communication interface 503.
[0135] The bus 510 includes hardware, software, or both that couples the components of the electronic device 500 to each other. By way of example and not limitation, the bus 510 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of the above. Where appropriate, the bus 510 may include one or more buses. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.
[0136] The electronic device provided in the embodiment of the present application can realize Figure 1-3The various processes implemented by the electronic device in the method embodiment can achieve the same technical effect, so to avoid repetition, they will not be described here.
[0137] In conjunction with the scene-based tracking verification method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, they implement the steps of any of the scene-based tracking verification methods in the above embodiments.
[0138] In conjunction with the scene-based tracking verification method in the above embodiments, the present application embodiment can provide a computer program product for implementation. The (computer) program product is stored in a non-volatile storage medium, and when the program product is executed by at least one processor, it implements the steps of any one of the scene-based tracking verification methods in the above embodiments.
[0139] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, which are coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-mentioned scene-based verification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0140] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0141] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0142] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in unit, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0143] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0144] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0145] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for verifying tracking points based on scene verification, characterized in that: include: When a test case associated with a test scenario is obtained, convert the test case into Cucumber code based on the artificial intelligence model, wherein the test scenario is used to test multiple embedded events in the target page, and the multiple embedded events are triggered by M target UI elements among the UI elements of the target page; For each UI element, based on the element type of the UI element, a matching target static positioning feature is selected from all static positioning features corresponding to the element locator, and the target static positioning feature and visual features are combined to form a multimodal positioning feature set for the UI element, where both static positioning features and visual features are positioning features; Extracting the first feature values of all positioning features in the corresponding multimodal positioning feature set from the structured description information of each UI element to obtain a dynamic positioning strategy for each UI element; Match the target UI elements associated with the Cucumber code from each UI element, and generate test case code by combining the Cucumber code and the dynamic positioning strategy of the target UI element; By executing the test case code, adaptive multimodal positioning is performed on the M target UI elements in the target page based on the dynamic positioning strategy, and the multiple tracking events are triggered through interactive operations with the M target UI elements; Acquire the buried point data corresponding to the multiple buried point events to obtain multiple buried point data, and perform scene verification on the multiple buried point data based on the buried point verification rules associated with the test scene to obtain scene verification results.
2. The method according to claim 1, characterized in that Different element types have different target static positioning features. Element types include basic interactive controls, composite container controls, dynamic list items, and multimedia controls. The target static positioning features corresponding to basic interactive controls include ID, text content Text, parent container path Xpath, position, and control type. The target static positioning features corresponding to composite container controls include ID, Xpath, and position. The target static positioning features corresponding to dynamic list items include Xpath indexes. The target static positioning features corresponding to multimedia controls include position.
3. The method according to claim 1 or 2, characterized in that The dynamic positioning strategy of the UI element also includes the priorities of all positioning features in the corresponding multimodal positioning feature set, and adaptive multimodal positioning of the M target UI elements in the target page based on the dynamic positioning strategy includes: For each target UI element, based on the priority and first feature value of the positioning feature in the dynamic positioning strategy of the target UI element, UI elements are matched from the target page, and the matched UI element is determined as the target UI element.
4. The method according to claim 3, characterized in that Matching a UI element from the target page based on the priority and the first feature value of the positioning feature in the dynamic positioning strategy of the target UI element includes: According to the order of priority of all positioning features in the dynamic positioning strategy from high to low, the first feature value of each positioning feature is used to match UI elements in the target page until the target UI element consistent with the first feature value is determined from the various UI elements on the target page. Matching is stopped and it is determined that the target UI element is successfully positioned.
5. The method according to claim 3, characterized in that The multimodal positioning feature set of the target UI element includes N positioning features, and the UI element is matched from the target page based on the priority and first feature value of the positioning features in the dynamic positioning strategy of the target UI element, including: Selecting a positioning feature with the highest priority from the multimodal positioning feature set to obtain a target positioning feature; Matching a UI element from the target page using a first feature value of a target positioning feature; If no match can be found using the first feature value of the target positioning feature, obtaining the second feature values of each UI element under N-1 positioning features other than the target positioning feature from the front-end running code of the target page; Determine a first similarity between each UI element and the target UI element based on N-1 first feature values of the N-1 positioning features and N-1 second feature values of each UI element under the N-1 positioning features; The UI element with the highest first similarity among the UI elements is determined as the target UI element.
6. The method according to claim 5, characterized in that The dynamic positioning strategy of the target UI element further includes N first weight values corresponding to N positioning features, and determining a first similarity between each UI element and the target UI element based on the N first feature values of the N positioning features and the N second feature values of each UI element under the N positioning features, including: For each UI element, based on the first feature value and the second feature value under the same positioning feature, determine the similarity between the UI element and the target UI element under the single positioning feature; Based on N similarities between each UI element and the target UI element under N positioning features and N first weight values, a first similarity between each UI element and the target UI element is determined.
7. The method according to claim 3, characterized in that After matching UI elements from the target page, it also includes: When at least two UI elements are matched from the target page based on the first feature value of the same positioning feature, extract only the first feature value corresponding to the text content Text, position Positionion, and visual feature from the structured description information of the target UI element to obtain first matching information of the target UI element; Extracting only three second feature values corresponding to the text, position, and visual features of each UI element in the target page from the front-end running code of the target page to obtain second matching information of each UI element; Determining a second similarity between the target UI element and each UI element based on the first matching information and the second matching information; The UI element with the second highest similarity among the UI elements is determined as the target UI element, and it is determined that the target UI element is successfully located.
8. The method according to claim 1, characterized in that Combine Cucumber code with the dynamic positioning strategy of the target UI element to generate test case code, including: Perform NLP semantic analysis on Cucumber code to obtain an abstract syntax tree; Convert the abstract syntax tree and the dynamic positioning strategy of the target UI element into Airtest code to obtain the test case code.
9. The method according to claim 1, characterized in that Before performing scenario verification on multiple tracking data based on the tracking verification rules associated with the test scenario, the method further includes: Creating scenario tracing task information corresponding to the test scenario based on the tracing information of the multiple tracing events, wherein the tracing information includes version information and page information of the multiple tracing events, and tracing attributes and tracing attribute values of the multiple tracing events in a fixed execution order; Generate a tracking trigger script associated with the test scenario based on the scenario tracking task information, wherein the tracking trigger script is used to obtain tracking data after triggering the tracking event; Based on the scene burying task information, the burying point verification rules associated with the test scenario are generated to determine whether the burying point attributes and burying point attribute values in the multiple burying point data meet the requirements based on the burying point verification rules, wherein the burying point verification rules include the burying point attributes and burying point attribute values of the multiple burying point events in a fixed execution order.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which implement the method according to any one of claims 1 to 9 when executed by a processor.