Test script updating method and device, related equipment, storage medium and computer program product

By marking key operations and related information in the test script, and automatically analyzing and updating the test script, the problem of test script failure in automated tests is solved, improving test stability and efficiency.

CN119441027APending Publication Date: 2025-02-14CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411426777.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the communication network, there may be a problem of test script failure during the automated testing process, which will lead to the inability to carry out automation testing normally, affecting business quality and operator testing efficiency.

Method used

By marking the location and relevant information of the key operations in the test script, when the test script executes an exception, determine the target key operations associated with the exception, determine the analysis strategy and analysis results based on the relevant information of the target key operations, and determine the test based on the analysis results. The script update strategy to realize the adaptive update of the test script.

Benefits of technology

Implement adaptive updates of automated test scripts, avoiding the problem of test script failure, reducing the risk of automated tests not being carried out normally, significantly improving the stability and efficiency of automated tests, and enhancing the comprehensiveness and robustness of test scripts Sex and scene coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441027A_ABST
    Figure CN119441027A_ABST
Patent Text Reader

Abstract

The invention discloses a test script updating method and device, a terminal, cloud equipment, a storage medium and a computer program product. The method comprises the steps that in a test script of an application program, the terminal marks the positions of one or more key operations of the application program and marks relevant information of each key operation; under the condition that the execution of the test script is abnormal, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on related information of the target key operation, and determining an analysis result corresponding to the analysis strategy; and under the condition of determining that the test script needs to be updated based on the analysis result, determining an updating strategy of the test script, and updating the test script by utilizing the updating strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing, and in particular to a test script updating method, apparatus, related equipment, storage medium and computer program product. Background Art

[0002] With the rapid development of communication networks, data services are emerging in an endless stream. How to professionally evaluate the quality of data services under high-speed networks (such as gigabit bandwidth, fourth-generation mobile communication technology (4G) networks, fifth-generation mobile communication technology (5G) networks, etc.) and provide users with the best services has become a major issue for operators to improve service quality. In order to improve service quality, operators can test various indicators in multiple dimensions such as product functions and product performance of data services on commercial terminals in the market.

[0003] However, the automated testing process of the related technology may have the problem of test script failure, and thus there may be a risk that the automated testing cannot be carried out normally. Summary of the invention

[0004] To solve related technical problems, embodiments of the present application provide a test script updating method, apparatus, related equipment, storage medium and computer program product.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application embodiment provides a test script updating method, which is applied to a terminal and includes:

[0007] In the test script of the application, mark the location of one or more key operations of the application and mark the relevant information of each key operation;

[0008] In the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy;

[0009] In the case where it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

[0010] In the above solution, the determining of the analysis strategy for performing abnormal analysis based on the relevant information of the target key operation includes:

[0011] Based on the relevant information of the target key operation, a target analysis template is determined from a plurality of analysis templates contained in the first database, and the analysis strategy is determined using the target analysis template; the first database stores the association relationship between the analysis template and the relevant information of the key operation, and the analysis template is used to indicate the content contained in the corresponding analysis strategy; wherein,

[0012] The analysis strategy includes one or more of the following:

[0013] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation;

[0014] one or more candidate causes of the anomaly;

[0015] One or more candidate buttons of the application, the buttons being used to resolve the exception.

[0016] In the above solution, the determining of the analysis result corresponding to the analysis strategy includes:

[0017] Sending an analysis request to a cloud device, wherein the analysis request includes the analysis strategy and is used to request obtaining the analysis result;

[0018] receiving the analysis result sent by the cloud device; wherein,

[0019] The analysis results include one or more of the following:

[0020] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0021] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0022] The third information indicates whether the test script needs to be updated.

[0023] In the above scheme, the analysis result also includes the update strategy;

[0024] or,

[0025] The relevant information of the target key operation also includes the update strategy;

[0026] or,

[0027] The update strategy is generated based on the relevant information of the target key operation and / or the analysis result.

[0028] In the above scheme, when the target abnormality cause includes an update of a resource file associated with the execution code of the target key operation, the updating of the test script by using the update strategy includes:

[0029] Determining an updated resource file based on the execution picture and / or execution video of the target key operation;

[0030] Replace the resource file in the test script with the updated resource file.

[0031] In the above solution, when the analysis result includes the second information, using the update strategy to update the test script includes:

[0032] Determining a resource file corresponding to the target button based on the execution picture and / or execution video of the target key operation;

[0033] Based on the position of the target button and the resource file corresponding to the target button, a function of clicking the target button is added to the test script.

[0034] The embodiment of the present application also provides a test script update method, which is applied to a cloud device, including:

[0035] An analysis request sent by a receiving terminal when a test script of an application is executed abnormally, the analysis request including an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0036] Determine the analysis result and send the analysis result to the terminal; wherein,

[0037] The analysis strategy includes one or more of the following:

[0038] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0039] one or more candidate causes of the anomaly;

[0040] one or more candidate buttons of the application, the buttons being used to resolve the exception;

[0041] The analysis results include one or more of the following:

[0042] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0043] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0044] The third information indicates whether the test script needs to be updated.

[0045] In the above solution, determining the analysis result includes:

[0046] Sending the analysis request to the visual big model;

[0047] The analysis result sent by the visual big model is received.

[0048] The present application also provides a test script updating device, including:

[0049] A marking unit, used to mark the location of one or more key operations of the application in the test script of the application, and mark the relevant information of each key operation;

[0050] A first analysis unit is used to determine, when the test script is executed abnormally, a target key operation associated with the abnormality from the one or more key operations, determine an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determine an analysis result corresponding to the analysis strategy;

[0051] An updating unit is used to determine an update strategy for the test script when it is determined based on the analysis result that the test script needs to be updated, and to update the test script using the update strategy.

[0052] The present application also provides a test script updating device, including:

[0053] A receiving unit, configured to receive an analysis request sent by a terminal when a test script of an application is executed abnormally, wherein the analysis request includes an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0054] The second analysis unit is used to determine the analysis result and send the analysis result to the terminal; wherein,

[0055] The analysis strategy includes one or more of the following:

[0056] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0057] one or more candidate causes of the anomaly;

[0058] one or more candidate buttons of the application, the buttons being used to resolve the exception;

[0059] The analysis results include one or more of the following:

[0060] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0061] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0062] The third information indicates whether the test script needs to be updated.

[0063] The embodiment of the present application also provides a terminal, comprising: a first communication interface and a first processor; wherein,

[0064] The first processor is configured to:

[0065] In the test script of the application, mark the location of one or more key operations of the application and mark the relevant information of each key operation;

[0066] In the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy;

[0067] In the case where it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

[0068] The embodiment of the present application further provides a cloud device, comprising: a second communication interface and a second processor; wherein:

[0069] The second processor is configured to:

[0070] Receiving, through the second communication interface, an analysis request sent by the terminal when a test script of the application is executed abnormally, the analysis request including an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0071] Determine the analysis result, and send the analysis result to the terminal through the second communication interface; wherein,

[0072] The analysis strategy includes one or more of the following:

[0073] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0074] one or more candidate causes of the anomaly;

[0075] one or more candidate buttons of the application, the buttons being used to resolve the exception;

[0076] The analysis results include one or more of the following:

[0077] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0078] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0079] The third information indicates whether the test script needs to be updated.

[0080] The embodiment of the present application further provides a terminal, comprising: a first processor and a first memory for storing a computer program that can be run on the processor,

[0081] Wherein, the first processor is used to execute the steps of any of the above-mentioned terminal side methods when running the computer program.

[0082] The embodiment of the present application further provides a cloud device, comprising: a second processor and a second memory for storing a computer program that can be run on the processor,

[0083] Wherein, the second processor is used to execute the steps of any of the above-mentioned methods on the cloud device side when running the computer program.

[0084] An embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned terminal side methods are implemented, or the steps of any of the above-mentioned cloud device side methods are implemented.

[0085] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned terminal-side methods, or implements the steps of any of the above-mentioned cloud device-side methods.

[0086] The test script updating method, apparatus, related equipment, storage medium and computer program product provided in the embodiments of the present application, wherein the terminal marks the location of one or more key operations of the application in the test script of the application, and marks the relevant information of each key operation; in the case of an exception in the execution of the test script, the target key operation associated with the exception is determined from the one or more key operations, and based on the relevant information of the target key operation, an analysis strategy for performing the exception analysis is determined, and an analysis result corresponding to the analysis strategy is determined; in the case of determining that the test script needs to be updated based on the analysis result, an update strategy for the test script is determined, and the test script is updated using the update strategy. The solution provided by the embodiment of the present application is that the terminal marks the position and related information of the key operation in the test script of the application, determines the target key operation associated with the exception when the test script is executed abnormally, determines the analysis strategy for performing abnormal analysis based on the related information of the target key operation, and determines the need to update the test script based on the analysis result corresponding to the analysis strategy. In this way, the terminal can automatically perform abnormal analysis when the test script of the application is executed abnormally, and can realize the adaptive update of the test script, so as to avoid the problem of test script failure during the automated test, reduce the risk that the automated test cannot be carried out normally, and significantly improve the stability and test efficiency of the automated test. In addition, by marking the position and related information of the key operation in the test script, the automated test can cover the operation branches and abnormal situations that are difficult to foresee in the test script production process. For example, by marking the version upgrade prompt box (which can also be understood as the application upgrade reminder pop-up window), advertising pop-up window, other special reminder information pop-up window, specific button click and other key operations in the test script, the automated test can cover the corresponding situation, so as to enhance the comprehensiveness, robustness and scenario coverage of the test script. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] Figure 1 It is a schematic diagram of a test script in the related art;

[0088] Figure 2 A flowchart of a test script updating method according to an embodiment of the present application;

[0089] Figure 3 A flowchart of another test script updating method according to an embodiment of the present application;

[0090] Figure 4 This is a schematic diagram of the architecture of the end-cloud combined intelligent testing system for this application example;

[0091] Figure 5A schematic diagram of a scenario for updating the home button image in a test script for this application example;

[0092] Figure 6 A schematic diagram of a scenario in which a close ad button is added to the test script for this application example;

[0093] Figure 7 This is a schematic diagram of the structure of a test script updating device according to an embodiment of the present application;

[0094] Figure 8 This is a schematic diagram of the structure of another test script updating device according to an embodiment of the present application;

[0095] Fig. 9 This is a schematic diagram of the terminal structure of an embodiment of the present application;

[0096] Fig.10 This is a schematic diagram of the cloud device structure of an embodiment of the present application;

[0097] Fig.11 This is a schematic diagram of the test script update system structure of an embodiment of the present application. DETAILED DESCRIPTION

[0098] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0099] In the related technologies, operators can adopt the following three solutions in the field of client and cloud testing:

[0100] Solution 1: A test mode based on a user interface (UI) automated test framework. This mode usually relies on pre-written test scripts, and uses the execution and analysis capabilities provided by the test framework and physical robotic arm tools to automatically execute test cases and record and identify test results.

[0101] Solution 2: Image recognition test mode based on artificial intelligence technology; this mode is usually used to identify interface elements and specific operations. It can identify user-defined targets through pre-trained artificial intelligence (AI) image recognition models, simulate user's actual operation steps, and automatically execute application function test tasks;

[0102] Solution 3, rule-based test mode; this mode is usually used for test scenarios with relatively uniform test data structures, such as network performance, tag recognition and other fields. Testers can automatically judge the test results through standard rule definitions and use data capture analysis and other methods to analyze the test results.

[0103] In actual application, many companies in the industry have developed cloud-based testing platform tools for smart terminals. Such tools can integrate the above three testing modes, thereby providing users with automated testing services for terminal applications (Application in English, abbreviated as APP).

[0104] The following describes possible problems in the above three test modes with examples.

[0105] First, for the above-mentioned solutions 1 and 2, the mainstream testing tools in the industry can already combine the technologies of solutions 1 and 2. Taking Android mobile phone testing as an example, you can connect to the Android device through the Android Debug Bridge (ADB), use the generated instructions to interact with the device, simulate user input (such as clicks, slides, keys, etc.), and perform operations (such as installing applications, running applications, UI interface operations, etc.); usually you need to record and debug the test script in advance, and locate the UI elements through image recognition or UI control identification (ID) technology. However, affected by the frequent version updates of applications in the existing network, the related UI control IDs, interface icons and other contents may change frequently, resulting in the possibility that the scripts recorded in the early stage may not run normally; in addition, since it is difficult to traverse some uncommon operation branches (such as irregular advertisements, abnormal operation failures, version upgrades, etc.) during the script recording process, the script robustness is not high, affecting the efficiency of automated testing.

[0106] For example, take AirTest, a typical UI automation evaluation tool in the industry, as an example. This tool mainly supports image recognition and control recognition technology to carry out testing, and can provide a visual AirtetsIDE interface for users to quickly generate scripts. The generated script usually contains a piece of Python code and related resource files containing location information (such as interface screenshots, etc.); for example, Figure 1 The meaning of the test script shown is: identify a text edit box through the control, enter the specified text, wait for 1 second, find the position of the control image with a gray circle and white arrow on the current terminal interface on the mobile phone screen, and simulate clicking the control. However, due to the frequent updates of applications, there may be problems such as the control of the android.widget.EditText type cannot be clicked to enter text, the icon of the gray circle and white arrow on the interface changes color, etc., which may cause Figure 1 The test script shown cannot run normally. In addition, some version upgrade prompt boxes, advertising pop-ups, other special reminder pop-ups, specific button clicks, etc. that were not encountered during the test script production process may cause the test script to fail to run and fail to obtain correct test results.

[0107] As for the above-mentioned solution 3, when the solution is implemented using technologies such as Internet Protocol (IP) packet analysis, it may be affected by the quality of the client application, the interface rendering mechanism, etc., and there may be certain differences in the interface display, making it impossible to fully and truly evaluate the user experience.

[0108] To sum up, the automated testing process of related technologies may have the problem of test script failure, which may lead to the risk that automated testing cannot be carried out normally; in addition, the comprehensiveness, robustness and scenario coverage of test scripts also need to be enhanced.

[0109] Based on this, in various embodiments of the present application, the terminal marks the location and related information of the key operation in the test script of the application, determines the target key operation associated with the exception when the test script is executed abnormally, determines the analysis strategy for performing abnormal analysis based on the related information of the target key operation, and determines the need to update the test script based on the analysis result corresponding to the analysis strategy. In this way, the terminal can automatically perform abnormal analysis when the test script of the application is executed abnormally, and can realize the adaptive update of the test script, thereby avoiding the problem of test script failure during automated testing, reducing the risk of automated testing not being able to proceed normally, and significantly improving the stability and test efficiency of automated testing. In addition, by marking the location and related information of the key operation in the test script, the automated test can cover the operation branches and abnormal situations that are difficult to foresee during the test script production process. For example, by marking the version upgrade prompt box, advertising pop-up window, other special reminder information pop-up window, specific button click and other key operations in the test script, the automated test can cover the corresponding situation, thereby enhancing the comprehensiveness, robustness and scenario coverage of the test script.

[0110] Specifically, the present application embodiment provides a test script update method, which is applied to a terminal, such as Figure 2 As shown, the method includes:

[0111] Step 201: in a test script of an application, mark the location of at least one key operation (i.e., one or more key operations) of the application, and mark relevant information of each key operation;

[0112] Step 202: in the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy;

[0113] Step 203: When it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

[0114] In actual application, the terminal can also be called a smart terminal, a test terminal, a client, a test client, etc. The embodiment of the present application does not limit the specific name of the terminal, as long as its function is realized; it can be understood that the terminal is at least used to test the application and update the test script.

[0115] In actual application, the key operation may include an application version upgrade prompt box (which can also be understood as an application upgrade reminder pop-up window), an advertising pop-up window, other special reminder information pop-up windows, specific button clicks, etc.; the relevant information of the key operation may include one or more of the key operation's identification (such as ID, etc.), name, type, occurrence time (which can also be understood as operation timing), exception description, response operation (which can also be understood as response measures or exception resolution methods), update strategy and other information; here, the specific content of the key operation and the specific content contained in the relevant information of the key operation can be set according to the test requirements, and the embodiments of the present application are not limited to this.

[0116] Exemplarily, when the application is started, an upgrade reminder pop-up window may appear. If the pop-up window is not clicked (i.e. closed), the application cannot continue to run. At this time, the relevant information of the key operation of "Application Upgrade Reminder Pop-up Window" can be marked at the script code location of starting the application, "Marking point 1.1, start APP, upgrade reminder, ignore upgrade, automatic processing"; among them, "Marking point 1.1" can be understood as the identification of the key operation, "start APP" can be understood as the occurrence time of the key operation or the timing of the key operation, "upgrade reminder" can be understood as the exception description corresponding to the key operation, "ignore upgrade" and "automatic processing" can be understood as the response measures for the key operations, and can also be understood as the update strategy of the test script, that is, by automatically adding code in the test script, the upgrade reminder pop-up window can be ignored when the test script is running. When the application is started, an advertisement pop-up window may appear. If the pop-up window is not clicked (i.e. closed), the application cannot continue to run. At this time, the relevant information of the key operation of "ad pop-up window" can be marked at the script code location of starting the application, "Marking point 1.2, start APP, advertising information, close advertisement, automatic processing"; among which, "Marking point 1.2" can be understood as the identification of the key operation, "start APP" can be understood as the occurrence time of the key operation or the timing of the key operation, "advertising information" can be understood as the exception description corresponding to the key operation, "close advertisement" and "automatic processing" can be understood as the response measures for the key operations, and can also be understood as the update strategy of the test script, that is, by automatically adding code to the test script, the advertisement pop-up window can be closed when the test script is running. When the application executes to a specific position, it may be necessary to click a specific button (such as the "My" button), but the image of this button may change and the button click operation cannot be completed through image matching. At this time, an annotation point can be added to this potential position where the image may be frequently changed by the application developer, that is, the relevant information of the key operation of "clicking a specific button" is marked as "Annotation point 2, navigation bar click, image change, click 'My', automatic processing"; among them, "Annotation point 2" can be understood as the identifier of the key operation, "navigation bar click" can be understood as the occurrence time of the key operation or the timing of the key operation, "image change" can be understood as the abnormal description corresponding to the key operation (that is, the "My" button image changes), "Click 'My'" and "Automatic processing" can be understood as the response measures for the key operation, and can also be understood as the update strategy of the test script, that is, by automatically adding code in the test script, the "My" button can be clicked when the test script is running.

[0117] In actual application, the test script execution exception may be caused by factors such as frequent version updates of the application, which leads to frequent changes in related UI control IDs, interface icons and other content. Specifically, it may include script execution interruption, timeout and other exceptions. The embodiment of this application does not limit the specific exception type.

[0118] In actual application, analysis templates corresponding to various exceptions can be pre-set as needed. When the test script is executed abnormally, the analysis template corresponding to the current exception can be matched from these analysis templates to perform exception analysis.

[0119] Based on this, in one embodiment, determining an analysis strategy for performing anomaly analysis based on the relevant information of the target key operation may include:

[0120] Based on the relevant information of the target key operation, a target analysis template is determined from multiple analysis templates contained in the first database, and the analysis strategy is determined using the target analysis template; the first database stores the association relationship between the analysis template and the relevant information of the key operation, and the analysis template is used to indicate the content included in the corresponding analysis strategy.

[0121] The analysis strategy may include one or more of the following (i.e., the content included in the analysis strategy may include at least one of the following):

[0122] Source data for performing anomaly analysis, the source data including one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation, that is, the source data may include at least one of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation;

[0123] at least one candidate abnormality cause, i.e., one or more candidate abnormality causes;

[0124] At least one candidate button (ie, one or more candidate buttons) of the application, the button being used to resolve the exception.

[0125] Here, it can be understood that, corresponding to the content that the analysis strategy can include, the analysis template can be used to indicate at least one of the following (that is, indicate one or more of the following): source data for exception analysis, one or more candidate causes of the exception, and one or more candidate buttons.

[0126] In actual application, the specific form of the association relationship between the analysis template and the relevant information of the key operation can be set as needed, and the embodiments of the present application do not limit this. For example, the association relationship can be specifically expressed as a mapping between the response measures of the key operation and the template name; or, the association relationship can be specifically expressed as a mapping between the identifier of the key operation and the identifier of the analysis template.

[0127] In actual application, the terminal can perform anomaly analysis by itself; or, in order to reduce terminal energy consumption and increase terminal available computing power, the terminal can request a cloud device to perform anomaly analysis.

[0128] Based on this, in one embodiment, determining the analysis result corresponding to the analysis strategy may include:

[0129] Sending an analysis request to a cloud device, wherein the analysis request includes the analysis strategy and is used to request obtaining the analysis result;

[0130] Receive the analysis result sent by the cloud device.

[0131] The analysis results may include one or more of the following (i.e., at least one of the following):

[0132] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0133] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0134] The third information indicates whether the test script needs to be updated.

[0135] In actual application, the analysis result may also include the update strategy; or, the relevant information of the target key operation may also include the update strategy; or, the terminal may generate the update strategy based on the relevant information of the target key operation and / or the analysis result. Here, it can be understood that the update strategy is used to update the test script. In addition, the specific method used by the terminal to generate the update strategy can be set as needed (such as a specific algorithm, a pre-set specific strategy, etc.), and the embodiments of the present application are not limited to this.

[0136] In actual application, the analysis strategy can be specifically expressed as a paragraph of text, which can be understood as a question raised by the terminal to the cloud device; the analysis result can be understood as the answer to this question. After receiving the analysis request, the cloud device can use its own preset specific functions to perform abnormal analysis and obtain the analysis result. Alternatively, in order to further improve the quality of the analysis result, that is, in order to further improve the accuracy, comprehensiveness and authenticity of the analysis result, the cloud device can determine the analysis result through the visual big model, that is, the cloud device can forward the analysis request to the visual big model (which can be understood as forwarding to the device corresponding to the visual big model), and the visual big model determines the analysis result and returns it to the cloud device (which can be understood as the cloud device receiving the analysis result sent by the device corresponding to the visual big model), and then the cloud device sends the analysis result to the terminal; at this time, the analysis strategy can be understood as the question raised by the cloud device to the visual big model.

[0137] In one embodiment, when the target exception cause includes an update of a resource file associated with the execution code of the target key operation, updating the test script by using the update strategy may include:

[0138] Determining an updated resource file based on the execution picture and / or execution video of the target key operation;

[0139] Replace the resource file in the test script with the updated resource file.

[0140] In actual application, the updated resource file can be obtained by taking a screenshot of the execution picture and / or execution video.

[0141] In one embodiment, when the analysis result includes the second information, updating the test script by using the update strategy may include:

[0142] Determining a resource file corresponding to the target button based on the execution picture and / or execution video of the target key operation;

[0143] Based on the position of the target button and the resource file corresponding to the target button, a function of clicking the target button is added to the test script.

[0144] In actual application, the resource file corresponding to the target button can be obtained by taking a screenshot of the execution picture and / or execution video.

[0145] In actual application, it can be understood that the cloud device can also be called the cloud side, cloud platform, etc. The specific name of the cloud device is not limited in the embodiment of the present application, as long as its function is realized. In addition, in addition to the above functions, the cloud device can also have other functions, such as maintaining the first database, video analysis function, image analysis function, maintaining the test script library, and data analysis function, etc. The specific functions of the cloud device are not limited in the embodiment of the present application.

[0146] Accordingly, the present application also provides a test script update method, which is applied to a cloud device, such as Figure 3 As shown, the method includes:

[0147] Step 301: receiving an analysis request sent by a terminal when a test script of an application is executed abnormally, wherein the analysis request includes an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0148] Step 302: Determine the analysis result, and send the analysis result to the terminal.

[0149] The analysis strategy may include one or more of the following:

[0150] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0151] one or more candidate causes of the anomaly;

[0152] One or more candidate buttons of the application, the buttons being used to resolve the exception.

[0153] In addition, the analysis results may include one or more of the following:

[0154] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0155] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0156] The third information indicates whether the test script needs to be updated.

[0157] In one embodiment, determining the analysis result may include:

[0158] Sending the analysis request to the visual big model;

[0159] The analysis result sent by the visual big model is received.

[0160] Here, sending the analysis request to the visual big model refers to sending the analysis request to the device corresponding to the visual big model; receiving the analysis result sent by the visual big model refers to receiving the analysis result sent by the device corresponding to the visual big model.

[0161] The test script updating method provided by the embodiment of the present application is that the terminal marks the position and related information of one or more key operations of the application in the test script of the application, and marks the relevant information of each key operation; in the case of abnormal execution of the test script, the target key operation associated with the abnormality is determined from the one or more key operations, and the analysis strategy for abnormal analysis is determined based on the relevant information of the target key operation, and the analysis result corresponding to the analysis strategy is determined; in the case of determining that the test script needs to be updated based on the analysis result, the update strategy of the test script is determined, and the test script is updated using the update strategy. The solution provided by the embodiment of the present application is that the terminal marks the position and related information of the key operation in the test script of the application, determines the target key operation associated with the abnormality when the test script is executed abnormally, determines the analysis strategy for abnormal analysis based on the relevant information of the target key operation, and updates the test script using the determined update strategy of the test script when it is determined that the test script needs to be updated based on the analysis result corresponding to the analysis strategy; in this way, the terminal can automatically perform abnormal analysis when the test script of the application is executed abnormally, and can realize adaptive update of the test script, thereby avoiding the problem of test script failure during automated testing, reducing the risk that automated testing cannot be carried out normally, and significantly improving the stability and test efficiency of automated testing. In addition, by marking the location and related information of key operations in the test script, automated testing can cover operation branches and abnormal situations that are difficult to foresee during the test script production process. For example, by marking key operations such as version upgrade prompt boxes (which can also be understood as application upgrade reminder pop-ups), advertising pop-ups, other special reminder information pop-ups, specific button clicks, etc. in the test script, automated testing can cover corresponding situations, thereby enhancing the comprehensiveness, robustness and scenario coverage of the test script.

[0162] In addition, in the solution provided in the embodiment of the present application, the terminal can obtain the abnormal analysis results through the cloud device, and the cloud device can obtain the abnormal analysis results through the visual big model. In this way, the quality of the analysis results can be improved based on the visual big model, that is, the accuracy, comprehensiveness and authenticity of the analysis results can be improved.

[0163] The present application is described in further detail below in conjunction with application examples.

[0164] This application example provides an optimization solution for automated test scripts for smart terminal services based on visual big models. In view of the characteristics of automated application performance testing on smart terminals, it uses cloud-based visual big model technology and a combination of end and cloud to automatically analyze the problems encountered by the test tool during the test execution, determine the cause of the test interruption, and automatically optimize and update the test script, thereby improving the intelligence level of the test tool and reducing the risk of automated testing not being able to proceed normally.

[0165] Specifically, in order to solve the problem that the client script cannot be executed normally due to factors such as frequent script updates and the inability to completely traverse all operation paths when making scripts, this application example transforms the test tool modules on the terminal side and the cloud side, such as Figure 4 As shown, the end-cloud combined intelligent test system includes a cloud-side intelligent analysis module and at least one client-side intelligent processing module (i.e., one or more client-side intelligent processing modules); the client-side intelligent processing module includes modules such as script annotation, prompt word processing, video / image generation, and script update strategy; the cloud-side intelligent analysis module includes modules such as test prompt word template library, video / image analysis, test script library (cloud-side), and analysis engine. The functions of these modules are described in detail below.

[0166] First, the functions of the client intelligent processing module are described in detail.

[0167] In this application example, for the script annotation module, after a set of ordinary scripts are completed, the tester can use the script annotation module to scan the script code according to the actual situation of the script, and automatically or manually annotate potential key operation steps. Specifically, in the process of executing a specific operation of the application, for the operation branches that cannot be traversed in the script production process, and the locations of the points where the phenomena are difficult to occur, they can be annotated by inserting specified comment codes, etc. The annotated content (i.e., the relevant information of the above-mentioned key operations) can include but is not limited to one or more of the operation identification (such as ID, etc.), name, type, occurrence time (also understood as operation timing), exception description, response operation (also understood as response measures or exception resolution methods), update strategy and other information.

[0168] For example, when the application is started, there may be upgrade reminder pop-ups and advertising pop-ups. If you do not click to close these pop-ups, you will not be able to continue running the program. At this time, you can add the following annotation points (i.e., mark key operations) to the script code that starts the application:

[0169] start_app(const.COUND_MOBILE_APP_PKG_LIST[appid])

[0170] #Mark point 1.1, start APP, upgrade reminder, ignore upgrade, automatic processing

[0171] #Mark point 1.2, start APP, advertising information, close advertising, automatic processing

[0172] touch(XXXXX)

[0173] Among them, "Marking point 1.1" can be understood as an operation identifier, the time or timing of the current operation is "starting the APP", and "upgrade reminder" can be understood as a description of abnormal operation. The recommended countermeasures are "ignore upgrade" and "automatic processing", which means that the program can be automatically processed and the relevant code for finding the ignore upgrade button is added. "Marking point 1.2" is another operation identifier, the time or timing of the operation is "starting the APP", and "advertising information" can be understood as a description of abnormal operation. The recommended countermeasures are "close advertising" and "automatic processing", which means that the program can be automatically processed and the relevant code for finding the close advertising button is added.

[0174] For another example, when the application is executed to a specific position, you may need to click a specific button (such as the "My" button), but the image of this button may change, making it impossible to complete the button click operation through image matching. In this case, you can add the following annotation points (i.e., annotate key operations) at this potential position where the developer may frequently change the image:

[0175] #Mark point 2, navigation bar click, picture change, click 'My', automatic processing

[0176] touch(XXXXX)

[0177] Among them, "mark point 2" can be understood as an operation identifier, the time of occurrence of the current operation or the timing of the operation is "navigation bar click", and "image change" can be understood as a description of the abnormal operation. The recommended response measures are "click 'My'" and "automatically process", which means that the program can automatically process and add relevant code for clicking the "My" button.

[0178] In this application example, when the subsequent execution of the test script is abnormally interrupted, you can trace back to the corresponding marked point (i.e., determine the above-mentioned target key operation), and add or repair this part of the code based on the suggestions fed back by the large model (i.e., the above-mentioned analysis results) to ensure that the test script can be executed normally.

[0179] In this application example, for the prompt word processing module, the module can regularly synchronize the latest test prompt word template library (i.e., the above-mentioned first database) from the cloud (i.e., the above-mentioned cloud device) and save it locally, and in the case of abnormal test script execution (such as interruption, timeout, etc.), that is, when the normal script cannot be executed, it automatically starts from the current code execution to find the key script annotation points (i.e., determine the above-mentioned target key operations), and assemble the analysis request after matching the appropriate prompt word (i.e., the above-mentioned analysis strategy) from the template library according to the mapping between the annotated response operation and the template name, such as organizing the analysis request according to the specifications of "response operation / template name, mobile phone screenshot, resource files involved in the script source code"; here, the prompt word can be directly understood as an analysis request containing an analysis strategy, or it can be understood as a question that needs to be asked to the cloud and / or the visual large model. After that, the module can send an analysis request to the cloud. In the test prompt word template library, it can be classified and summarized according to the execution exceptions that may occur in the test script. For example, the test prompt word template library can contain the following templates:

[0180] Template 1, APP update reminder processing, that is, the name of Template 1 is "APP update reminder processing; the prompt word assembled by using this template (which can also be understood as an analysis strategy or an analysis request containing an analysis strategy) can be "The current screenshot is a screenshot of @para.1 (@para.1 represents the application name, that is, the name of the APP) after the application is started. Is there an application upgrade reminder on the current screen? If so, please return the position information of the button in the picture for ignoring the upgrade or closing the upgrade reminder"; here, @para.1 can be understood as a parameter that needs to be assembled (or replaced). When sending an analysis request to the cloud, @para.1 needs to be replaced with the actual value / text and assembled into the prompt word;

[0181] Template 2, APP advertising processing, that is, the name of Template 2 is "APP advertising processing"; the prompt words assembled by using this template (which can also be understood as an analysis strategy or an analysis request containing an analysis strategy) can be "The current screenshot is a screenshot after the @para.1 application is launched. Is there an advertisement or other pop-up window on the current screen? If so, please return the position information of the button for closing these pop-up windows in the picture";

[0182] Template 3, APP operation processing 1, that is, the name of template 3 is "APP operation processing 1"; the prompt word assembled by using this template (which can also be understood as an analysis strategy or an analysis request containing an analysis strategy) can be "The current screenshot is a screenshot of application @para.1, and the user's next operation is to click the button @para.2 (@para.2 represents the name or logo of the button). Please help me find the location information of this button." Here, @para.2 can be understood as a parameter that needs to be assembled (or replaced). When sending an analysis request to the cloud, @para.2 needs to be replaced with the actual value / text and assembled into the prompt word;

[0183] Template 4, APP operation processing 2, that is, the name of template 4 is "APP operation processing 2"; the prompt word assembled using the template (which can also be understood as an analysis strategy or an analysis request containing an analysis strategy) can be "The current screenshot is a screenshot of a key operation @para.3 (@para.3 represents the name or identifier of the key operation) of application @para.1. Is there a prompt message indicating that the operation failed on the current interface? If not, please return only no. If so, please return yes and the location information of the button to close the current prompt message"; here, @para.3 can be understood as a parameter that needs to be assembled (can also be understood as replaced). When sending an analysis request to the cloud, @para.3 needs to be replaced with the actual value / text and assembled into the prompt word.

[0184] In this application example, as can be seen from the above description, the prompt word is a piece of text, which can be understood as a question that needs to be asked to the cloud and / or the big model, and the big model can output the answer to the question (i.e. the above analysis result). When the cloud returns the relevant information (i.e. the above analysis result), the execution engine of the prompt word processing module can perform the next operation based on the information, such as clicking on the location information fed back by the cloud, etc., to ensure that the current program can continue to execute; and, according to the script update strategy, it can choose whether to update the script.

[0185] In this application example, for the video / image generation module, the module can record videos or take screenshots during the execution of local scripts according to the different types of support for the cloud-based large model. For example, if the cloud-based visual large model only supports image input, the module can take a full screenshot of the current mobile phone interface when an exception occurs (such as a statement execution timeout, etc.); for another example, if the large model supports video input, the module can start recording the video until the next annotation point when the test script is executed at each annotation point (i.e., key operation), and can upload the most recent video of the exception, a full screenshot of the current mobile phone screen, and the assembled prompt words to the cloud for intelligent analysis to find the cause of the program execution exception.

[0186] In this application example, after the analysis results are returned by the cloud, the script update module can automatically update the script according to the returned information (such as operation suggestions, button location information, etc.) and the update strategy. The update strategy can also be included in the analysis results, or can be generated by the script update module in a specific way; for example, the update strategy can include:

[0187] Strategy 1: Change resource images. Specifically, the script update module can find the location area from the full-screen screenshot of the current mobile phone screen according to the location information of the image fed back by the cloud large model, cut out the small area image, and then replace the corresponding resource file in the original script code with the cut image. For example, Figure 5 As shown, for clicking the "Home" button in the lower left corner of the mobile phone screen, the home button image of the original script (i.e. the above resource file) can be updated to the home button image of the new version of the APP;

[0188] Strategy 2, add a pop-up window closing function; specifically, the script update module can find the location area from the full screenshot of the current mobile phone screen according to the advertisement feedback from the cloud large model and the location information of the ignored upgrade, and intercept the area image as a new resource file, and automatically add a line of code before the currently executed script code. The function of the added code is: click on the matched resource file (that is, the intercepted new resource file); for example, Figure 6 As shown, you can automatically add code to close the ad button in the test script.

[0189] The functions of the cloud-side intelligent analysis module are described in detail below.

[0190] In this application example, the test prompt word template library module can maintain the template of the test prompt word, and each client (i.e., the above-mentioned terminal) can regularly update the prompt word template content from the template library. The video / image analysis module can be responsible for managing the prompt words (i.e., analysis requests), mobile phone screenshots, resource files and other video or image content sent by the client. The test script library module can maintain all test scripts of the current test system, and can be managed in units of script information in the format of "tested APP package name, tested APP version number, script task"; each test client can automatically synchronize the latest script information with the script library. When a client updates a script, it can automatically package the script and upload it to the cloud, and notify the cloud that the test script with the script information of "tested APP package name, tested APP version number, script task" has changed (i.e., updated), and the cloud administrator will update the cloud script library after reviewing it.

[0191] In this application example, the analysis engine can provide analysis services to each client, specifically, it can accept the analysis request transmitted (i.e. sent) by the client, and forward the analysis request to the external third-party visual big model through the interface. After the third-party visual big model completes the instruction (i.e. completes the abnormal analysis of the test script according to the analysis request), the module can obtain the key information returned by the big model (i.e. obtain the analysis result, which can also be understood as the answer to the above prompt word question, such as yes / no, location coordinate information, etc.), etc., and return this part of the key information to the client in the format agreed with the client.

[0192] The solution provided by this application example realizes the application of cloud-based visual big model technology, that is, using cloud-based visual big model technology, intelligent analysis of problems encountered during the test process is performed to achieve automatic optimization and update of test scripts; the application of this technology significantly improves the intelligence level of the test tool and reduces the problem of script failure caused by APP updates. In addition, the solution provided by this application example realizes an intelligent test system that combines end and cloud, that is, this application example proposes an intelligent test system architecture that combines end and cloud, which includes a client-side intelligent processing module and a cloud-side intelligent analysis module. Through the collaborative work of the two, intelligent annotation, problem diagnosis, and automatic update of test scripts are achieved, enhancing the robustness and adaptability of the test system. In addition, the solution provided by this application example adds a script annotation and automatic processing mechanism, that is, this application example designs a set of script annotation tools that allow testers to annotate potential key operation steps. The system can automatically handle version upgrade prompts (i.e., upgrade reminder pop-ups), advertising pop-ups, and other issues based on these annotations, improving the stability and maintainability of the script.

[0193] From the above description, it can be seen that the solution provided by this application example has the following advantages:

[0194] 1) It can automatically analyze the reasons for interruptions during test execution, intelligently optimize and update test scripts, and realize the adaptive update of automated test scripts, thereby solving the problem of script failure caused by APP version updates in related test tools, and significantly improving the stability and efficiency of automated testing;

[0195] 2) Through script annotation and intelligent analysis modules, it can cover operation branches and abnormal situations that are difficult to foresee during the test script production process, such as version upgrade prompt boxes (i.e. upgrade reminder pop-ups), advertising pop-ups, other special reminder information pop-ups, specific button clicks, etc., which enhances the robustness and scenario coverage of the test;

[0196] 3) Through the cloud-based intelligent analysis module, using the visual analysis technology of the third-party big model, more accurate problem location and operation suggestions are provided for the test script, realizing intelligent analysis and optimization in the cloud, which can more comprehensively and realistically evaluate the user experience, thereby providing higher quality test results.

[0197] In order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a test script updating device, which is set on the terminal, such as Figure 7 As shown, the device comprises:

[0198] The marking unit 701 is used to mark the location of one or more key operations of the application in the test script of the application, and mark the relevant information of each key operation;

[0199] The first analysis unit 702 is used to determine, when the test script is executed abnormally, a target key operation associated with the abnormality from the one or more key operations, determine an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determine an analysis result corresponding to the analysis strategy;

[0200] The updating unit 703 is used to determine an update strategy for the test script when it is determined based on the analysis result that the test script needs to be updated, and update the test script using the update strategy.

[0201] In one embodiment, the first analysis unit 702 is further used to determine a target analysis template from a plurality of analysis templates included in the first database based on the relevant information of the target key operation, and determine the analysis strategy using the target analysis template; the first database stores an association relationship between the analysis template and the relevant information of the key operation, and the analysis template is used to indicate the content included in the corresponding analysis strategy; wherein,

[0202] The analysis strategy includes one or more of the following:

[0203] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation;

[0204] one or more candidate causes of the anomaly;

[0205] One or more candidate buttons of the application, the buttons being used to resolve the exception.

[0206] In one embodiment, the first analysis unit 702 is further configured to:

[0207] Sending an analysis request to a cloud device, wherein the analysis request includes the analysis strategy and is used to request obtaining the analysis result;

[0208] receiving the analysis result sent by the cloud device; wherein,

[0209] The analysis results include one or more of the following:

[0210] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0211] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0212] The third information indicates whether the test script needs to be updated.

[0213] In one embodiment, the analysis result further includes the update strategy;

[0214] or,

[0215] The relevant information of the target key operation also includes the update strategy;

[0216] or,

[0217] The updating unit 703 is further configured to generate the updating strategy based on the relevant information of the target key operation and / or the analysis result.

[0218] In one embodiment, when the target abnormality cause includes an update of a resource file associated with the execution code of the target key operation, the updating unit 703 is further configured to:

[0219] Determining an updated resource file based on the execution picture and / or execution video of the target key operation;

[0220] Replace the resource file in the test script with the updated resource file.

[0221] In one embodiment, when the analysis result includes the second information, the updating unit 703 is further configured to:

[0222] Determining a resource file corresponding to the target button based on the execution picture and / or execution video of the target key operation;

[0223] Based on the position of the target button and the resource file corresponding to the target button, a function of clicking the target button is added to the test script.

[0224] Among them, the function of the annotation unit 701 is equivalent to the function of the script annotation module in the above application example; the function of the first analysis unit 702 is equivalent to the function of the prompt word processing module in the above application example; the function of the update unit 703 is equivalent to the function of the script update strategy module in the above application example.

[0225] In actual application, the marking unit 701 and the updating unit 703 can be implemented by a processor in the test script updating device; the first analyzing unit 702 can be implemented by a processor in the test script updating device in combination with a communication interface.

[0226] In order to implement the method of the cloud device side of the embodiment of the present application, the embodiment of the present application also provides a test script updating device, which is set on the cloud device, such as Figure 8 As shown, the device comprises:

[0227] The receiving unit 801 is used to receive an analysis request sent by a terminal when a test script of an application is executed abnormally, wherein the analysis request includes an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0228] The second analysis unit 802 is used to determine the analysis result and send the analysis result to the terminal; wherein:

[0229] The analysis strategy includes one or more of the following:

[0230] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0231] one or more candidate causes of the anomaly;

[0232] one or more candidate buttons of the application, the buttons being used to resolve the exception;

[0233] The analysis results include one or more of the following:

[0234] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0235] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0236] The third information indicates whether the test script needs to be updated.

[0237] In one embodiment, the second analysis unit 802 is further configured to:

[0238] Sending the analysis request to the visual big model;

[0239] The analysis result sent by the visual big model is received.

[0240] The functions of the receiving unit 801 and the second analyzing unit 802 are equivalent to the functions of the analysis engine in the above application example.

[0241] In actual application, the receiving unit 801 can be implemented by a communication interface in the test script updating device; the second analyzing unit 802 can be implemented by a processor in the test script updating device in combination with the communication interface.

[0242] It should be noted that: the test script updating device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when updating the test script. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules (such as the script annotation module, prompt word processing module, script update strategy module, analysis engine, etc. in the above application example) to complete all or part of the processing described above. In addition, the test script updating device provided in the above embodiment and the test script updating method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0243] Based on the hardware implementation of the above program modules, and in order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a terminal, such as Fig. 9 As shown, the terminal 900 includes:

[0244] The first communication interface 901 is capable of exchanging information with cloud devices and / or other terminals;

[0245] A first processor 902, connected to the first communication interface 901, to implement information interaction with a cloud device and / or other terminals, and configured to execute the method provided by one or more technical solutions on the terminal side when running a computer program;

[0246] A first memory 903 , in which the computer program is stored.

[0247] Specifically, the first processor 902 is configured to:

[0248] In the test script of the application, mark the location of one or more key operations of the application and mark the relevant information of each key operation;

[0249] In the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy;

[0250] In the case where it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

[0251] In one embodiment, the first processor 902 is further used to determine a target analysis template from a plurality of analysis templates included in the first database based on the relevant information of the target key operation, and determine the analysis strategy using the target analysis template; the first database stores an association relationship between the analysis template and the relevant information of the key operation, and the analysis template is used to indicate the content included in the corresponding analysis strategy; wherein,

[0252] The analysis strategy includes one or more of the following:

[0253] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation;

[0254] one or more candidate causes of the anomaly;

[0255] One or more candidate buttons of the application, the buttons being used to resolve the exception.

[0256] In one embodiment, the first processor 902 is further configured to:

[0257] Sending an analysis request to a cloud device through the first communication interface 901, wherein the analysis request includes the analysis strategy and is used to request obtaining the analysis result;

[0258] The analysis result sent by the cloud device is received through the first communication interface 901; wherein,

[0259] The analysis results include one or more of the following:

[0260] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0261] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0262] The third information indicates whether the test script needs to be updated.

[0263] In one embodiment, the analysis result further includes the update strategy;

[0264] or,

[0265] The relevant information of the target key operation also includes the update strategy;

[0266] or,

[0267] The first processor 902 is further configured to generate the update strategy based on the relevant information of the target key operation and / or the analysis result.

[0268] In one embodiment, when the target exception cause includes an update of a resource file associated with the execution code of the target key operation, the first processor 902 is further configured to:

[0269] Determining an updated resource file based on the execution picture and / or execution video of the target key operation;

[0270] Replace the resource file in the test script with the updated resource file.

[0271] In one embodiment, when the analysis result includes the second information, the first processor 902 is further configured to:

[0272] Determining a resource file corresponding to the target button based on the execution picture and / or execution video of the target key operation;

[0273] Based on the position of the target button and the resource file corresponding to the target button, a function of clicking the target button is added to the test script.

[0274] It should be noted that the specific processing process of the first processor 902 can be understood by referring to the above method, which will not be repeated here.

[0275] Of course, in actual application, the various components in the terminal 900 are coupled together through the bus system 904. It can be understood that the bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as bus system 904.

[0276] The first memory 903 in the embodiment of the present application is used to store various types of data to support the operation of the terminal 900. Examples of such data include: any computer program used to operate on the terminal 900.

[0277] The method disclosed in the above embodiment of the present application can be applied to the first processor 902, or implemented by the first processor 902. The first processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the first processor 902. The first processor 902 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 902 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 903, and the first processor 902 reads the information in the first memory 903, and completes the steps of the above method in combination with its hardware.

[0278] In an exemplary embodiment, the terminal 900 may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0279] Based on the hardware implementation of the above program modules, and in order to implement the method of the cloud device side of the embodiment of the present application, the embodiment of the present application also provides a cloud device, such as Fig.10 As shown, the cloud device 1000 includes:

[0280] The second communication interface 1001 is capable of exchanging information with a terminal and / or other cloud devices (such as a visual large model, etc.);

[0281] The second processor 1002 is connected to the second communication interface 1001 to implement information interaction with the terminal and / or other cloud devices, and is used to execute the method provided by one or more technical solutions on the cloud device side when running the computer program;

[0282] A second memory 1003 , on which the computer program is stored.

[0283] Specifically, the second processor 1002 is configured to:

[0284] Receiving, through the second communication interface 1001, an analysis request sent by the terminal when a test script of the application is executed abnormally, the analysis request includes an analysis strategy for performing abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy;

[0285] Determine the analysis result, and send the analysis result to the terminal through the second communication interface 1001; wherein,

[0286] The analysis strategy includes one or more of the following:

[0287] Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly;

[0288] one or more candidate causes of the anomaly;

[0289] one or more candidate buttons of the application, the buttons being used to resolve the exception;

[0290] The analysis results include one or more of the following:

[0291] first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes;

[0292] second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons;

[0293] The third information indicates whether the test script needs to be updated.

[0294] In one embodiment, the second processor 1002 is further configured to:

[0295] Sending the analysis request to the visual big model through the second communication interface 1001;

[0296] The analysis result sent by the visual big model is received through the second communication interface 1001.

[0297] It should be noted that the specific processing process of the second processor 1002 can be understood by referring to the above method, which will not be repeated here.

[0298] Of course, in actual application, the various components in the cloud device 1000 are coupled together through the bus system 1004. It can be understood that the bus system 1004 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1004 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.10 Various buses are labeled as bus system 1004 .

[0299] The second memory 1003 in the embodiment of the present application is used to store various types of data to support the operation of the cloud device 1000. Examples of such data include: any computer program used to operate on the cloud device 1000.

[0300] The method disclosed in the above embodiment of the present application can be applied to the second processor 1002, or implemented by the second processor 1002. The second processor 1002 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the second processor 1002. The second processor 1002 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 1002 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the second memory 1003. The second processor 1002 reads the information in the second memory 1003 and completes the steps of the above method in combination with its hardware.

[0301] In an exemplary embodiment, the cloud device 1000 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.

[0302] It can be understood that the memory (first memory 903, second memory 1003) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0303] In order to implement the method provided in the embodiment of the present application, the embodiment of the present application also provides a test script update system, such as Fig.11 As shown, the system includes: a terminal 1101 and a cloud device 1102 .

[0304] Here, it should be noted that the specific processing process of the terminal 1101 and the cloud device 1102 has been described in detail above and will not be repeated here.

[0305] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 903 storing a computer program, and the computer program can be executed by the first processor 902 of the terminal 900 to complete the steps of any of the aforementioned terminal side methods. For another example, a second memory 1003 storing a computer program can be executed by the second processor 1002 of the cloud device 1000 to complete the steps of any of the aforementioned cloud device side methods. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0306] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the first processor 902 of the terminal 900 to complete the steps of any of the aforementioned terminal-side methods; or, the computer program can be executed by the second processor 1002 of the cloud device 1000 to complete the steps of any of the aforementioned cloud device-side methods.

[0307] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0308] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0309] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A test script updating method, characterized in that: Applied to terminals, including: In the test script of the application, mark the location of one or more key operations of the application and mark the relevant information of each key operation; In the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy; In the case where it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

2. The method according to claim 1, characterized in that Determining an analysis strategy for performing anomaly analysis based on the relevant information of the target key operation includes: Based on the relevant information of the target key operation, a target analysis template is determined from a plurality of analysis templates contained in the first database, and the analysis strategy is determined using the target analysis template; the first database stores the association relationship between the analysis template and the relevant information of the key operation, and the analysis template is used to indicate the content contained in the corresponding analysis strategy; wherein, The analysis strategy includes one or more of the following: Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of the target key operation; one or more candidate causes of the anomaly; One or more candidate buttons of the application, the buttons being used to resolve the exception.

3. The method according to claim 2, characterized in that The determining of the analysis result corresponding to the analysis strategy includes: Sending an analysis request to a cloud device, wherein the analysis request includes the analysis strategy and is used to request obtaining the analysis result; receiving the analysis result sent by the cloud device; wherein, The analysis results include one or more of the following: first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes; second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons; The third information indicates whether the test script needs to be updated.

4. The method according to claim 3, characterized in that The analysis result also includes the update strategy; or, The relevant information of the target key operation also includes the update strategy; or, The update strategy is generated based on the relevant information of the target key operation and / or the analysis result.

5. The method according to claim 3, characterized in that: In a case where the target abnormality cause includes an update of a resource file associated with the execution code of the target key operation, the updating of the test script by using the update strategy includes: Determining an updated resource file based on the execution picture and / or execution video of the target key operation; Replace the resource file in the test script with the updated resource file.

6. The method according to claim 3, characterized in that In a case where the analysis result includes the second information, the updating of the test script by using the update strategy includes: Determining a resource file corresponding to the target button based on the execution picture and / or execution video of the target key operation; Based on the position of the target button and the resource file corresponding to the target button, a function of clicking the target button is added to the test script.

7. A test script updating method, characterized in that: Applied to cloud devices, including: An analysis request sent by a receiving terminal when a test script of an application is executed abnormally, the analysis request including an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy; Determine the analysis result and send the analysis result to the terminal; wherein, The analysis strategy includes one or more of the following: Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly; one or more candidate causes of the anomaly; one or more candidate buttons of the application, the buttons being used to resolve the exception; The analysis results include one or more of the following: first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes; second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons; The third information indicates whether the test script needs to be updated.

8. The method according to claim 7, characterized in that The determining of the analysis result comprises: Sending the analysis request to the visual big model; The analysis result sent by the visual big model is received.

9. A test script updating device, characterized in that: include: A marking unit, used to mark the location of one or more key operations of the application in the test script of the application, and mark the relevant information of each key operation; A first analysis unit is used to determine, when the test script is executed abnormally, a target key operation associated with the abnormality from the one or more key operations, determine an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determine an analysis result corresponding to the analysis strategy; An updating unit is used to determine an update strategy for the test script when it is determined based on the analysis result that the test script needs to be updated, and to update the test script using the update strategy.

10. A test script updating device, characterized in that: include: A receiving unit, configured to receive an analysis request sent by a terminal when a test script of an application is executed abnormally, wherein the analysis request includes an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy; The second analysis unit is used to determine the analysis result and send the analysis result to the terminal; wherein, The analysis strategy includes one or more of the following: Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly; one or more candidate causes of the anomaly; one or more candidate buttons of the application, the buttons being used to resolve the exception; The analysis results include one or more of the following: first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes; second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons; The third information indicates whether the test script needs to be updated.

11. A terminal, characterized in that: include: a first communication interface and a first processor; wherein, The first processor is configured to: In the test script of the application, mark the location of one or more key operations of the application and mark the relevant information of each key operation; In the case where the test script is executed abnormally, determining a target key operation associated with the abnormality from the one or more key operations, determining an analysis strategy for performing abnormality analysis based on relevant information of the target key operation, and determining an analysis result corresponding to the analysis strategy; In the case where it is determined based on the analysis result that the test script needs to be updated, an update strategy for the test script is determined, and the test script is updated using the update strategy.

12. A cloud device, characterized in that: include: A second communication interface and a second processor; wherein, The second processor is configured to: Receiving, through the second communication interface, an analysis request sent by the terminal when a test script of the application is executed abnormally, the analysis request including an analysis strategy for performing an abnormality analysis, and the analysis request is used to request to obtain an analysis result corresponding to the analysis strategy; Determine the analysis result, and send the analysis result to the terminal through the second communication interface; wherein, The analysis strategy includes one or more of the following: Source data for performing anomaly analysis, the source data comprising one or more of an execution picture, an execution video, an execution code, and a resource file associated with the execution code of a target key operation of the application, the target key operation being associated with the anomaly; one or more candidate causes of the anomaly; one or more candidate buttons of the application, the buttons being used to resolve the exception; The analysis results include one or more of the following: first information, the first information being used to indicate a target abnormality cause from the one or more candidate abnormality causes; second information, the second information being used to indicate a target button and a position of the target button from among the one or more candidate buttons; The third information indicates whether the test script needs to be updated.

13. A terminal, characterized in that: include: a first processor and a first memory for storing a computer program executable on the processor, Wherein, when the first processor is used to run the computer program, the steps of the method described in any one of claims 1 to 6 are executed.

14. A cloud device, characterized in that: include: a second processor and a second memory for storing a computer program executable on the processor, Wherein, when the second processor is used to run the computer program, it executes the steps of the method according to claim 7 or 8.

15. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to claim 7 or 8.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to claim 7 or 8.