Test method and device, electronic equipment and computer readable medium

The inefficiency of existing testing methods is solved by responding to test requests, pausing execution programs, obtaining supplementary operation configuration data, recording and supplementing test cases, executing and summarizing test results, identifying and analyzing target elements, and a more efficient and flexible testing process is achieved.

CN119537226APending Publication Date: 2025-02-28CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411616647.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing testing methods are inefficient. Testers need to manually check the log or backtrack the test process, which is prone to missed key information, affecting the speed and accuracy of problem solving. The test script needs to be re-executed after modification, wasting resources and reducing test flexibility and efficiency.

Method used

Provide a test method, which can obtain the field value of the target field in response to a test request, pause the execution program to respond to user supplementary operations, obtain supplementary operation configuration data, determine the program type, record and supplement test cases, execute the updated test cases, summarize the execution result data, identify the target elements, execute the test analysis logic, and output the test analysis results.

Benefits of technology

It improves the efficiency of the backtracking test process, improves the speed and accuracy of problem solving, and improves the flexibility and efficiency of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537226A_ABST
    Figure CN119537226A_ABST
Patent Text Reader

Abstract

The invention discloses a test method and device, electronic equipment and a computer readable medium, and relates to the technical field of tests.The method comprises the steps that in response to a test request, a field value of a target field corresponding to a current execution program is obtained; in response to the fact that the field value is a target value, pausing execution of the current execution program, in response to supplementary operation of a user, obtaining supplementary operation configuration data and a corresponding program type, recording a corresponding program in the tested system based on the supplementary operation configuration data and the program type to supplement the test case, and obtaining and executing an updated test case; in response to the obtained test case execution completion identifier, summarizing corresponding execution result data when the field value is the target value; and identifying a target element in the execution result data, reading a corresponding target element value, executing the test analysis logic based on the target element value, and outputting test analysis result data. The efficiency of the backtracking test process is improved, and the problem solving speed and accuracy and the test flexibility are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a testing method, device, electronic device and computer-readable medium. Background Art

[0002] In today's rapidly developing information technology field, the complexity and functional requirements of software applications are constantly increasing, which makes traditional manual testing methods incapable of meeting the fast-iterative development cycle and strict quality assurance standards. When testers find that the test fails or anomalies occur, they cannot immediately stop the test process to locate and analyze the problem. Testers need to manually check logs or trace back the test process, which is not only inefficient, but also easy to miss key information, affecting the speed and accuracy of problem solving. Current test scripts usually need to be re-executed after modification or supplementation, which not only wastes test resources, but also reduces the flexibility and efficiency of testing. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a testing method, device, electronic device and computer-readable medium, which can solve the problems that the existing testers manually check logs or trace back the testing process, which is inefficient and easy to miss key information, affects the speed and accuracy of problem solving, and the current test scripts need to be re-executed after modification or supplementation, which wastes testing resources and reduces the flexibility and efficiency of testing.

[0004] To achieve the above object, according to one aspect of an embodiment of the present application, a testing method is provided, comprising:

[0005] In response to the test request, obtaining the field value of the target field corresponding to the currently executed program;

[0006] In response to the field value being the target value, pausing the execution of the currently executed program, and in response to the user's supplementary operation, acquiring supplementary operation configuration data corresponding to the supplementary operation;

[0007] Determine the program type corresponding to the supplementary operation configuration data, and based on the supplementary operation configuration data and the program type, record the corresponding program in the system under test to supplement the test case, so as to obtain an updated test case;

[0008] Execute the updated test case, and in response to obtaining the test case execution completion flag, summarize the execution result data corresponding to the target value when the field value is equal to the target value;

[0009] Identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data.

[0010] Optionally, obtaining supplementary operation configuration data corresponding to the supplementary operation includes:

[0011] The type of the supplementary operation is determined, and a corresponding plug-in is called according to the type of the supplementary operation to obtain supplementary operation configuration data corresponding to the supplementary operation.

[0012] Optionally, determine the type of supplemental operation, including:

[0013] Get the trigger control identifier corresponding to the supplementary operation, and determine the type of the supplementary operation according to the trigger control identifier.

[0014] Optionally, determining the program type corresponding to the supplementary operation configuration data includes:

[0015] It is determined whether the supplementary operation configuration data contains a series of ordered operations. If so, it is determined that the program type corresponding to the supplementary operation configuration data is a step. If not, it is determined that the program type corresponding to the supplementary operation configuration data is an action.

[0016] Optionally, determining the program type corresponding to the supplementary operation configuration data includes:

[0017] Obtain a program identifier in the supplementary operation configuration data, and in response to the program identifier corresponding to a step, determine that the program type corresponding to the supplementary operation configuration data is a step, and in response to the program identifier corresponding to an action, determine that the program type corresponding to the supplementary operation configuration data is an action.

[0018] Optionally, identifying a target element in the execution result data and reading a corresponding target element value includes:

[0019] Identify the form element in the execution result data, and read the form element value corresponding to the form element from the execution result data.

[0020] In addition, the present application also provides a testing device, comprising:

[0021] an acquisition unit, configured to acquire, in response to a test request, a field value of a target field corresponding to a currently executed program;

[0022] A suspending execution unit is configured to suspend the execution of the currently executed program in response to the field value being the target value, and to obtain supplementary operation configuration data corresponding to the supplementary operation in response to the user's supplementary operation;

[0023] A supplementing unit is configured to determine a program type corresponding to the supplementary operation configuration data, and based on the supplementary operation configuration data and the program type, record a corresponding program in the system under test to supplement the test case, so as to obtain an updated test case;

[0024] A summarizing unit is configured to execute the updated test case, and in response to obtaining the test case execution completion mark, summarize the execution result data corresponding to the target value when the field value is obtained;

[0025] The test analysis unit is configured to identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data.

[0026] Optionally, the suspend execution unit is further configured to:

[0027] The type of the supplementary operation is determined, and a corresponding plug-in is called according to the type of the supplementary operation to obtain supplementary operation configuration data corresponding to the supplementary operation.

[0028] Optionally, the suspend execution unit is further configured to:

[0029] Get the trigger control identifier corresponding to the supplementary operation, and determine the type of the supplementary operation according to the trigger control identifier.

[0030] Optionally, the supplementation unit is further configured to:

[0031] It is determined whether the supplementary operation configuration data contains a series of ordered operations. If so, it is determined that the program type corresponding to the supplementary operation configuration data is a step. If not, it is determined that the program type corresponding to the supplementary operation configuration data is an action.

[0032] Optionally, the supplementation unit is further configured to:

[0033] Obtain a program identifier in the supplementary operation configuration data, and in response to the program identifier corresponding to a step, determine that the program type corresponding to the supplementary operation configuration data is a step, and in response to the program identifier corresponding to an action, determine that the program type corresponding to the supplementary operation configuration data is an action.

[0034] Optionally, the test analysis unit is further configured to:

[0035] Identify the form element in the execution result data, and read the form element value corresponding to the form element from the execution result data.

[0036] In addition, the present application also provides a testing electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the testing method as described above.

[0037] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned testing method is implemented.

[0038] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.

[0039] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the test method provided in the embodiment of the present application is implemented.

[0040] One embodiment of the above invention has the following advantages or beneficial effects: the present application obtains the field value of the target field corresponding to the currently executed program in response to the test request; in response to the field value being the target value, the execution of the currently executed program is suspended; in response to the user's supplementary operation, the supplementary operation configuration data corresponding to the supplementary operation is obtained; the program type corresponding to the supplementary operation configuration data is determined, and the corresponding program is recorded in the tested system based on the supplementary operation configuration data and the program type to supplement the test case to obtain an updated test case; the updated test case is executed, and in response to obtaining the test case execution completion mark, the execution result data corresponding to the field value when the target value is summarized; the target element in the execution result data is identified, the corresponding target element value is read, the test analysis logic is executed based on the target element value, and the test analysis result data is output. The efficiency of the backtracking test process is improved, the speed and accuracy of problem solving are improved, and the flexibility and efficiency of testing are improved.

[0041] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0043] Figure 1 is a schematic diagram of the main process of a testing method according to an embodiment of the present application;

[0044] Figure 2 is a schematic diagram of the main process of a testing method according to an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of a related device used in a testing method according to an embodiment of the present application;

[0046] Figure 4 is a data storage schematic diagram of a test method according to an embodiment of the present application;

[0047] Figure 5 It is a schematic diagram of the main process of a testing method according to an embodiment of the present application;

[0048] Figure 6 is a schematic diagram of the main units of the testing device according to an embodiment of the present application;

[0049] Figure 7 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0050] Figure 8 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following is a description of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, analysis, use, transmission, storage, and other aspects of the user's personal information involved are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such personal information, ensure that persons with access to personal information comply with relevant laws and regulations, and ensure the security of personal information. Once such personal information is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data.

[0052] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.

[0053] Figure 1 is a schematic diagram of the main process of the testing method according to an embodiment of the present application, such as Figure 1 As shown, the testing method mainly includes the following steps S101 to S105.

[0054] Step S101, in response to a test request, obtaining a field value of a target field corresponding to a currently executed program.

[0055] In this embodiment, the execution subject of the test method (for example, it can be a server) can receive the test request through a wired connection or a wireless connection. After receiving the test request, the execution subject can obtain the field value of the target field corresponding to the currently executed program, wherein the target field can be a debug_pause field, such as a debug_stop field. The field value of the target field can be 1 or 0, and the embodiment of the present application does not specifically limit the field value of the target field. For example, when the field value of the target field is 1, it can represent that it is necessary to pause at the corresponding step or action (that is, a breakpoint is set), and when the field value of the target field is 0, it can represent that it is not necessary to pause at the corresponding step or action.

[0056] Step S102, in response to the field value being the target value, pausing the execution of the currently executed program, and in response to the user's supplementary operation, acquiring supplementary operation configuration data corresponding to the supplementary operation.

[0057] The target value can be a value representing a breakpoint set for a step or action, such as 1, a, etc. The embodiment of the present application does not specifically limit the target value. When it is detected that the field value of the target field corresponding to the currently executed program is the target value, the execution subject can immediately stop the test process to locate and analyze the problem, that is, suspend the execution of the currently executed program to facilitate problem location and analysis. During the problem location and analysis, if a user's supplementary operation is detected, the supplementary operation configuration data corresponding to the supplementary operation can be obtained. This improves the flexibility and efficiency of the test.

[0058] For example, the supplementary operation configuration data may include data such as the program type of the operation to be supplemented, the location of the operation to be supplemented, the preset execution time of the operation to be supplemented, etc. The embodiments of the present application do not specifically limit the supplementary operation configuration data.

[0059] Step S103, determining the program type corresponding to the supplementary operation configuration data, and supplementing the test case by recording the corresponding program in the tested system based on the supplementary operation configuration data and the program type to obtain an updated test case.

[0060] Program types can include steps and actions, where steps refer to a series of orderly operations to complete a task or function. These steps are executed in a certain logical order to ensure the correctness and efficiency of the program. Actions refer to specific operations during program execution, such as clicking, sliding, and inputting.

[0061] Specifically, determining the program type corresponding to the supplementary operation configuration data includes: obtaining a program identifier in the supplementary operation configuration data, and in response to the program identifier corresponding to a step, determining that the program type corresponding to the supplementary operation configuration data is a step; and in response to the program identifier corresponding to an action, determining that the program type corresponding to the supplementary operation configuration data is an action.

[0062] For example, the program identifier can be a prefix of the program text, which is used to identify the program type, for example, S or A, where S represents a step and A represents an action. If the program identifier is S, it corresponds to a step, and the program type corresponding to the supplementary operation configuration data is determined to be a step. If the program identifier is A, it corresponds to an action, and the program type corresponding to the supplementary operation configuration data is determined to be an action. Thus, the program type corresponding to the supplementary operation configuration data can be accurately and quickly determined.

[0063] When the case is paused at a breakpoint, the user can use the UI automation recording plug-in to record new steps or actions in the system under test to supplement the test case after the step or action breakpoint, or manually modify the existing test steps or actions to obtain an updated test case.

[0064] Step S104 , executing the updated test case, in response to obtaining the test case execution completion mark, summarizing the execution result data corresponding to the target value of the field value.

[0065] After obtaining the updated test case, the execution subject can execute the updated test case, and after the execution is completed, summarize the execution result data corresponding to the target value (for example, 1) of the field value, that is, summarize the execution result data of the test case at the breakpoint set to facilitate the test analysis at the breakpoint.

[0066] Step S105, identifying the target element in the execution result data, reading the corresponding target element value, executing the test analysis logic based on the target element value, and outputting the test analysis result data.

[0067] Specifically, identifying a target element in the execution result data and reading a corresponding target element value includes: identifying a form element in the execution result data and reading a form element value corresponding to the form element from the execution result data.

[0068] The target element is, for example, a form element, that is, an input element, and the target element value is, for example, a form element value. Since the text content of the input tag in the web page will not be included in the HTML source code, the URL address of the web page and the text values ​​of all input tags are stored in the input_values.txt text for subsequent content recovery during web page analysis. By identifying the form elements in the execution result data, the form element values ​​corresponding to the form elements are read from the execution result data, thereby facilitating accurate test analysis and processing at breakpoints based on the form elements and the form element values.

[0069] This embodiment obtains the field value of the target field corresponding to the currently executed program in response to the test request; in response to the field value being the target value, the execution of the currently executed program is suspended; in response to the user's supplementary operation, the supplementary operation configuration data corresponding to the supplementary operation is obtained; the program type corresponding to the supplementary operation configuration data is determined, and the corresponding program is recorded in the tested system based on the supplementary operation configuration data and the program type to supplement the test case to obtain an updated test case; the updated test case is executed, and in response to obtaining the test case execution completion mark, the execution result data corresponding to the field value when the target value is summarized; the target element in the execution result data is identified, the corresponding target element value is read, the test analysis logic is executed based on the target element value, and the test analysis result data is output. The efficiency of the backtracking test process is improved, the speed and accuracy of problem solving are improved, and the flexibility and efficiency of testing are improved.

[0070] Figure 2 is a schematic diagram of the main flow of a testing method according to an embodiment of the present application, such as Figure 2 As shown, the testing method mainly includes the following steps S201 to S205.

[0071] Step S201, in response to a test request, obtaining a field value of a target field corresponding to a currently executed program.

[0072] Target fields, such as debug_pause fields. By obtaining the field value of the target field, you can accurately determine whether you need to pause the test analysis at the corresponding step or action, thereby improving the flexibility and efficiency of the test.

[0073] Step S202, in response to the field value being the target value, pausing the execution of the currently executed program, in response to the user's supplementary operation, determining the type of the supplementary operation, and calling the corresponding plug-in according to the type of the supplementary operation to obtain the supplementary operation configuration data corresponding to the supplementary operation.

[0074] Specifically, determining the type of the supplementary operation includes: obtaining a trigger control identifier corresponding to the supplementary operation, and determining the type of the supplementary operation according to the trigger control identifier.

[0075] The trigger control identifier corresponding to the supplementary operation can be the number or name of the trigger control. If the execution subject responds to the trigger control identifier corresponding to the supplementary operation and the trigger control identifier corresponds to the automatic recording plug-in, the type of the supplementary operation is determined to be an automatic recording supplementary operation. If the execution subject responds to the trigger control identifier corresponding to the supplementary operation and the trigger control identifier corresponds to the manual modification button, the type of the supplementary operation is determined to be a manual modification of an existing test step or action.

[0076] For example, when it is determined that the type of supplementary operation is an automated recording supplementary operation, the execution subject can call the corresponding automated recording plug-in to obtain the supplementary operation configuration data corresponding to the supplementary operation (such as the program type of the operation to be supplemented, the location of the operation to be supplemented, the preset execution time of the operation to be supplemented, etc.) and record the corresponding new steps or actions in the system under test for supplementation. When it is determined that the type of supplementary operation is to manually modify the existing test steps or actions, the execution subject can open the modification permission to the corresponding user and display the manually modified corresponding supplementary operation configuration data for reference to make manual modifications, so as to improve the flexibility and efficiency of the test.

[0077] Step S203, determine whether the supplementary operation configuration data contains a series of ordered operations. If so, determine that the program type corresponding to the supplementary operation configuration data is a step; otherwise, determine that the program type corresponding to the supplementary operation configuration data is an action. Based on the supplementary operation configuration data and the program type, record the corresponding program in the tested system to supplement the test case to obtain an updated test case.

[0078] When the supplementary operation configuration data contains a series of ordered operations, it indicates that the steps need to be supplemented, and the program type corresponding to the supplementary operation configuration data can be determined to be a step. Otherwise, when the supplementary operation configuration data only contains a single specific operation, such as click, slide, input, etc., it indicates that the action needs to be supplemented, and the program type corresponding to the supplementary operation configuration data can be determined to be an action. Based on the supplementary operation configuration data and the program type (such as steps or actions), the corresponding program is recorded in the system under test to supplement the test case accordingly to obtain an updated test case.

[0079] Step S204 , executing the updated test case, in response to obtaining the test case execution completion mark, summarizing the execution result data corresponding to the target value of the field value.

[0080] When there are multiple updated test cases, the execution subject can execute the updated test cases in parallel to improve the test efficiency. In addition, when the execution subject obtains the case execution completion mark, such as E, during the execution of the updated test case, it indicates that the execution of the updated test case is completed, and the test can be stopped and the field value can be summarized as the target value, that is, the execution result data corresponding to the breakpoint for test analysis.

[0081] Step S205, identifying the target element in the execution result data, reading the corresponding target element value, executing the test analysis logic based on the target element value, and outputting the test analysis result data.

[0082] The target element can be determined based on the control corresponding to the breakpoint where the field value is the target value. Each control has a corresponding element for test analysis. The element for test analysis corresponding to the control at the breakpoint is determined as the target element, the corresponding target element value is read, the test analysis logic is executed based on the target element value, and the test analysis result data is output, thereby achieving accurate test analysis based on the control at the breakpoint and improving the flexibility of the test.

[0083] Figure 3 Schematic diagram of the relevant device used in the test method according to an embodiment of the present application. The embodiment of the present application supports the UI automated test of interrupt execution, and provides an innovative debug test mode with certain flexibility and user interactivity. Figure 3 As shown, the implementation of the test method of the embodiment of the present application involves five unit modules, namely, a breakpoint setting unit, a data storage unit, an action supplement unit, a test execution unit and a test analysis unit. The specific functions of each unit are as follows:

[0084] Breakpoint setting unit: The test case of the embodiment of the present application is composed of multiple test steps, and each test step is composed of test actions. Therefore, there are two debugging granularity levels for breakpoint setting, namely step breakpoint and action breakpoint. Select "step breakpoint", and the user can select the key steps of the test case in the device client to set the breakpoint; select "action breakpoint", and the user can select the key actions in the test step to set the breakpoint. After the setting is successful, the debug_stop field of the step or action in the database is set to "1", which is used for the subsequent test execution unit to confirm whether it is necessary to pause at the step or action.

[0085] Data storage unit: During the case execution, data will be transferred between steps or actions. The subsequent action execution may depend on the execution result parameters of the previous action, and the case breakpoint analysis requires the analysis of process data. Therefore, when the case is suspended, the server will store these data in the following way: Figure 4 The folder structure and contents of the local folder named by the batch ID are as shown in the following figure: Figure 4As shown, the solid-line boxes represent folders, and the dotted-line boxes represent files. Among them, the vars.json file stores all parameter names and parameter values ​​at the current breakpoint, and is displayed on the device client page. The subfolders under the folder exe are named after the breakpoint ID, and there can be multiple subfolders, which store the parameters and page information at each breakpoint, namely html.html, input_values.txt, and vars.json. html.html is the page information of the system under test, and its HTML source code is saved. Since the text content of the input tag in the web page will not be included in the HTML source code, the URL address of the web page and the text values ​​of all input tags are stored in the input_values.txt text for subsequent content recovery during web page analysis. vars.json stores the parameter names and parameter values ​​of the case execution to the breakpoint in key-value format.

[0086] Action Supplement Unit: When the case is paused at a breakpoint, the user can use the UI Automation Recording plug-in to record new actions in the system under test after the step breakpoint or action breakpoint to supplement, or manually modify the existing test steps or actions.

[0087] Test execution unit: When the unit is executing a case, if it recognizes that the current test mode is debug mode, and the debug_stop field value of the step or action is "1", it will pause after the previous action of the step or action breakpoint is executed. Click to continue debugging the case. The unit first loads the data stored in the data storage unit and restores the parameter values ​​at the breakpoint, that is, the content in the vars.json file; then re-obtains the latest case steps and actions of the case after the action is supplemented, and continues to execute from the breakpoint step or action to the next breakpoint until the case is executed.

[0088] Test analysis unit: Analyze the pages with breakpoints set during case execution. Dynamic analysis during execution is inefficient, so this unit mainly performs static analysis on HTML pages after all actions are executed. The data to be analyzed for each breakpoint is the content in the exe folder stored in the data storage unit.

[0089] The html text is parsed through the Jsoup library and its input elements are traversed. The content of input_value.txt is read and the value of the input element is filled back to perform breakpoint processing.

[0090] The embodiments of the present application can improve the efficiency of problem location: by introducing breakpoint setting and variable monitoring functions, testers can quickly locate the cause of test failure. This greatly reduces the time for problem diagnosis, allowing testers to quickly respond to problems that arise in the test, thereby speeding up the entire test process. Enhance the flexibility and maintainability of the test: allowing the test script to be partially executed or continued from a breakpoint after modification, which can significantly improve the flexibility of the test. Testers can test only the modified parts without having to start from scratch every time. It supports setting breakpoints on the UI automation platform with test actions or test steps as the granularity. When debugging is paused, manual intervention can be made to modify the case or record and supplement new actions. It supports process data and browser status caching, and case execution can be resumed when case debugging continues without starting from the beginning.

[0091] Figure 5 FIG. 1 is a schematic diagram of the main flow of a testing method according to an embodiment of the present application. Figure 5 As shown, the test method of the embodiment of the present application sets the step / action breakpoint at the beginning, responds to the detection of the user clicking to start the test, determines whether the step / action is a breakpoint, if not, executes the action, ends, if so, suspends execution, stores the transfer data and process data between the steps or actions, updates the test case after supplementing the steps / actions, performs data recovery, and continues to determine whether the step / action is a breakpoint when the user clicks to continue debugging, and ends the test after executing the action if not. Thereby improving the efficiency of the backtracking test process, improving the speed and accuracy of problem solving, and improving the flexibility and efficiency of testing.

[0092] Figure 6 Schematic diagram of the main units of the testing device according to the embodiment of the present application. Figure 6 As shown, the test device 600 includes an acquisition unit 601 , a suspension execution unit 602 , a supplement unit 603 , a summary unit 604 and a test analysis unit 605 .

[0093] The acquisition unit 601 is configured to acquire the field value of the target field corresponding to the currently executed program in response to the test request.

[0094] The execution suspension unit 602 is configured to suspend the execution of the currently executed program in response to the field value being the target value, and to obtain the supplementary operation configuration data corresponding to the supplementary operation in response to the user's supplementary operation.

[0095] The supplementing unit 603 is configured to determine the program type corresponding to the supplementary operation configuration data, and supplement the test case by recording the corresponding program in the tested system based on the supplementary operation configuration data and the program type to obtain an updated test case.

[0096] The summarizing unit 604 is configured to execute the updated test case, and in response to obtaining the test case execution completion mark, summarize the execution result data corresponding to the target value when the field value is obtained.

[0097] The test analysis unit 605 is configured to identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data.

[0098] In some embodiments, the suspension execution unit 602 is further configured to: determine the type of the supplementary operation, and call the corresponding plug-in according to the type of the supplementary operation to obtain the supplementary operation configuration data corresponding to the supplementary operation.

[0099] In some embodiments, the pause execution unit 602 is further configured to: obtain a trigger control identifier corresponding to the supplementary operation, and determine the type of the supplementary operation according to the trigger control identifier.

[0100] In some embodiments, the supplement unit 603 is further configured to: determine whether the supplement operation configuration data contains a series of ordered operations, if so, determine that the program type corresponding to the supplement operation configuration data is a step, otherwise determine that the program type corresponding to the supplement operation configuration data is an action.

[0101] In some embodiments, the supplement unit 603 is further configured to: obtain a program identifier in the supplementary operation configuration data; in response to the program identifier corresponding to a step, determine that the program type corresponding to the supplementary operation configuration data is a step; in response to the program identifier corresponding to an action, determine that the program type corresponding to the supplementary operation configuration data is an action.

[0102] In some embodiments, the test analysis unit 605 is further configured to: identify a form element in the execution result data, and read a form element value corresponding to the form element from the execution result data.

[0103] It should be noted that the test method and the test device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be described again.

[0104] Figure 7 An exemplary system architecture 700 to which the testing method or testing device according to the embodiment of the present application can be applied is shown.

[0105] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0106] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0107] The terminal devices 701 , 702 , and 703 may be various electronic devices having a test processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0108] Server 705 can be a server that provides various services, such as a background management server that supports test requests submitted by users using terminal devices 701, 702, and 703 (only as an example). The background management server can respond to the test request and obtain the field value of the target field corresponding to the currently executed program; respond to the field value being the target value, suspend the execution of the currently executed program, respond to the user's supplementary operation, and obtain the supplementary operation configuration data corresponding to the supplementary operation; determine the program type corresponding to the supplementary operation configuration data, and supplement the test case by recording the corresponding program in the tested system based on the supplementary operation configuration data and the program type to obtain an updated test case; execute the updated test case, respond to the acquisition of the test case execution completion mark, summarize the execution result data corresponding to the field value when the target value is obtained; identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data. Improve the efficiency of the backtesting process, improve the speed and accuracy of problem solving, and improve the flexibility and efficiency of testing.

[0109] It should be noted that the testing method provided in the embodiment of the present application is generally executed by the server 705 , and accordingly, the testing device is generally set in the server 705 .

[0110] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0111] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present application. Figure 8 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0112] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input or output (I or O) interface 805 is also connected to the bus 804.

[0113] The following components are connected to the I or O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I or O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0114] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present application are executed.

[0115] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0117] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a suspension execution unit, a supplement unit, a summary unit, and a test analysis unit. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0118] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device responds to the test request and obtains the field value of the target field corresponding to the currently executed program; in response to the field value being the target value, the execution of the currently executed program is suspended, and in response to the user's supplementary operation, the supplementary operation configuration data corresponding to the supplementary operation is obtained; the program type corresponding to the supplementary operation configuration data is determined, and the corresponding program is recorded in the tested system based on the supplementary operation configuration data and the program type to supplement the test case to obtain an updated test case; the updated test case is executed, and in response to obtaining the test case execution completion mark, the execution result data corresponding to the field value when the target value is summarized; the target element in the execution result data is identified, the corresponding target element value is read, the test analysis logic is executed based on the target element value, and the test analysis result data is output.

[0119] The computer program product of the present application includes a computer program, and the computer program implements the testing method in the embodiment of the present application when executed by a processor.

[0120] According to the technical solution of the embodiment of the present application, the efficiency of the backtesting process can be improved, the speed and accuracy of problem solving can be improved, and the flexibility and efficiency of testing can be improved.

[0121] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A testing method, characterized in that: include: In response to the test request, obtaining the field value of the target field corresponding to the currently executed program; In response to the field value being a target value, pausing the execution of the currently executed program, and in response to a supplementary operation of a user, acquiring supplementary operation configuration data corresponding to the supplementary operation; Determine a program type corresponding to the supplementary operation configuration data, and supplement the test case by recording a corresponding program in the system under test based on the supplementary operation configuration data and the program type to obtain an updated test case; Execute the updated test case, and in response to obtaining the test case execution completion mark, summarize the execution result data corresponding to the target value when the field value is equal to the target value; Identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data.

2. The method according to claim 1, characterized in that: The obtaining the supplementary operation configuration data corresponding to the supplementary operation includes: The type of the supplementary operation is determined, and a corresponding plug-in is called according to the type of the supplementary operation to obtain supplementary operation configuration data corresponding to the supplementary operation.

3. The method according to claim 2, characterized in that The determining the type of the supplementary operation includes: A trigger control identifier corresponding to the supplementary operation is obtained, and a type of the supplementary operation is determined according to the trigger control identifier.

4. The method according to claim 1, characterized in that: The determining the program type corresponding to the supplementary operation configuration data includes: It is determined whether the supplementary operation configuration data contains a series of ordered operations. If so, it is determined that the program type corresponding to the supplementary operation configuration data is a step. If not, it is determined that the program type corresponding to the supplementary operation configuration data is an action.

5. The method according to claim 1, characterized in that The determining the program type corresponding to the supplementary operation configuration data includes: Obtain a program identifier in the supplementary operation configuration data, and in response to the program identifier corresponding to a step, determine that the program type corresponding to the supplementary operation configuration data is a step, and in response to the program identifier corresponding to an action, determine that the program type corresponding to the supplementary operation configuration data is an action.

6. The method according to claim 1, characterized in that The identifying the target element in the execution result data and reading the corresponding target element value includes: A form element in the execution result data is identified, and a form element value corresponding to the form element is read from the execution result data.

7. A testing device, characterized in that: include: an acquisition unit, configured to acquire, in response to a test request, a field value of a target field corresponding to a currently executed program; A suspending execution unit is configured to suspend the execution of the currently executed program in response to the field value being a target value, and to obtain supplementary operation configuration data corresponding to the supplementary operation in response to a supplementary operation of a user; A supplementing unit is configured to determine a program type corresponding to the supplementary operation configuration data, and based on the supplementary operation configuration data and the program type, record a corresponding program in the system under test to supplement the test case, so as to obtain an updated test case; A summarizing unit is configured to execute the updated test case, and in response to obtaining a test case execution completion flag, summarize the execution result data corresponding to the target value when the field value is equal to the target value; The test analysis unit is configured to identify the target element in the execution result data, read the corresponding target element value, execute the test analysis logic based on the target element value, and output the test analysis result data.

8. The device according to claim 7, characterized in that The suspension execution unit is further configured to: The type of the supplementary operation is determined, and a corresponding plug-in is called according to the type of the supplementary operation to obtain supplementary operation configuration data corresponding to the supplementary operation.

9. The device according to claim 8, characterized in that The suspension execution unit is further configured to: A trigger control identifier corresponding to the supplementary operation is obtained, and a type of the supplementary operation is determined according to the trigger control identifier.

10. The device according to claim 7, characterized in that The supplementation unit is further configured to: It is determined whether the supplementary operation configuration data contains a series of ordered operations. If so, it is determined that the program type corresponding to the supplementary operation configuration data is a step. If not, it is determined that the program type corresponding to the supplementary operation configuration data is an action.

11. The device according to claim 7, characterized in that The supplementation unit is further configured to: Obtain a program identifier in the supplementary operation configuration data, and in response to the program identifier corresponding to a step, determine that the program type corresponding to the supplementary operation configuration data is a step, and in response to the program identifier corresponding to an action, determine that the program type corresponding to the supplementary operation configuration data is an action.

12. The device according to claim 7, characterized in that The test analysis unit is further configured to: A form element in the execution result data is identified, and a form element value corresponding to the form element is read from the execution result data.

13. A test electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.