Automatic testing method and device thereof, equipment and medium

By using an automated testing method with visual configuration and database storage, the high technical threshold and poor reusability of traditional automated testing methods are solved, enabling rapid generation and efficient management of test scripts, thereby improving testing efficiency and quality.

CN120803944APending Publication Date: 2025-10-17广州商研网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511036899.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional automated testing methods suffer from high technical barriers, poor modularity and reusability, inconvenient script management, and difficulty in quickly responding to business changes, thus affecting testing efficiency and flexibility.

Method used

By visually configuring events to determine the operation description structure, constructing the test process body and storing it in the database, and generating operation code that adapts to different test frameworks, the test scripts can be automatically generated and modularly managed.

Benefits of technology

It lowers the barrier to test development, improves the reusability and flexibility of test scripts, shortens development time, enhances test efficiency and quality, and supports version control and team collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803944A_ABST
    Figure CN120803944A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic testing method and device, equipment and a medium. The method comprises the steps of determining an operation description structure body corresponding to each operation configuration event displayed in a test process configuration page according to visual operation configuration events for executing page control operation on a target page; according to the operation sequence determined by the operation sequence identifier in each operation description structure body, all the operation description structure bodies form a test process body, and each operation description structure body is stored in a database; in response to a script generation event, obtaining a test framework identifier corresponding to the event for calling the pre-packaged code body corresponding to each operation description structure body from the database to generate a corresponding operation code; and assembling all the operation codes into a target test script according to the operation sequence, and running the target test script in a test framework pointed by the test framework identifier so as to automatically test the target page. The method can assist a user to efficiently and conveniently realize automatic testing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to software testing technology, and in particular, to an automated testing method and device, equipment and medium thereof. BACKGROUND

[0002] In modern software development and testing processes, automated testing plays a crucial role in improving testing efficiency, reducing labor costs and ensuring software quality. However, traditional automated testing methods have many problems to be solved.

[0003] On the one hand, for non-expert test personnel, manual writing of test scripts has a high technical threshold. Test personnel need to have a deep understanding of programming languages, testing frameworks and the business logic of the system under test in order to accurately convert test cases into code. This not only limits the composition of the test team, but also leads to a long development cycle of test scripts. Moreover, the manual line-by-line code writing method is prone to errors and difficult to ensure the accuracy and clarity of the operation steps, making the quality of test scripts uneven and difficult to achieve the expected testing effect.

[0004] On the other hand, traditional test scripts lack good modularity and reusability. Usually, each test script is written for a specific testing framework and specific page. Once the business requirements change or testing needs to be performed in different testing frameworks, the script has to be modified or even rewritten extensively. This not only increases the maintenance cost of test scripts, but also makes the script less adaptable in the face of cross-page and cross-framework testing scenarios, making it difficult to quickly respond to changes in business, and seriously affecting the flexibility and efficiency of testing work.

[0005] In addition, the storage and management of traditional test scripts also has drawbacks. Scripts are often scattered in different file directories, lacking a centralized and unified management mechanism, which is not conducive to version control, historical tracking and team collaboration. This makes it difficult to share and collaborate on test scripts in a team development environment, making it difficult to leverage the overall strengths of the team and further reducing the effectiveness of testing work.

[0006] In summary, existing automated testing methods have obvious shortcomings in ease of use, reusability, flexibility and asset management, and there is an urgent need for a new automated testing method that can effectively solve these problems to meet the growing needs of the modern software testing field. SUMMARY

[0007] The present application aims to solve the above problems and provide an automated testing method and its corresponding device, equipment, non-volatile readable storage medium and computer program product.

[0008] According to one aspect of the present application, an automated testing method is provided, comprising: According to a visual operation configuration event of a page control operation performed on a target page, an operation description structure corresponding to each operation configuration event displayed in a test flow configuration page is determined, the operation description structure comprising an operation sequence identifier, an operation type, and an operation behavior parameter; According to the operation sequence determined from the operation sequence identifier in each operation description structure, all operation description structures are constructed into a test flow body, and each operation description structure is stored in a database; In response to a script generation event, a test framework identifier corresponding to the event is obtained, which is used to call a pre-packaged code body corresponding to each operation description structure in the test flow body from the database, and generate corresponding operation codes; According to the operation sequence, all operation codes are spliced into a target test script, which is used to run in a test framework pointed to by the test framework identifier, so as to perform automated testing on the target page.

[0009] According to another aspect of the present application, an automated testing device is provided, comprising: An event listening module is configured to determine, according to a visual operation configuration event of a page control operation performed on a target page, an operation description structure corresponding to each operation configuration event displayed in a test flow configuration page, the operation description structure comprising an operation sequence identifier, an operation type, and an operation behavior parameter; A data storage module is configured to construct, according to the operation sequence determined from the operation sequence identifier in each operation description structure, all operation description structures into a test flow body, and store each operation description structure in a database; An event response module is configured to, in response to a script generation event, obtain a test framework identifier corresponding to the event, which is used to call a pre-packaged code body corresponding to each operation description structure in the test flow body from the database, and generate corresponding operation codes; A script construction module is configured to, according to the operation sequence, splice all operation codes into a target test script, which is used to run in a test framework pointed to by the test framework identifier, so as to perform automated testing on the target page.

[0010] According to another aspect of the present application, a non-volatile readable storage medium stores a computer program implemented according to the automated testing method in the form of computer readable instructions, and when the computer program is called and run by a computer, the steps included in the method are executed.

[0011] According to another aspect of the present application, a computer program product is provided, comprising computer programs / instructions which, when executed by a processor, implement the steps of the method.

[0012] The technical solution of the present application has multiple advantages, including but not limited to the following aspects: Firstly, the present application configures events for visual operations on a target page, and determines operation description structures corresponding to each configured operation step in a test flow configuration page, which contain operation sequence identifiers, types and behavior parameters. This implementation concretely implements user operations which are not easy to structure into standardized digital objects, reduces the threshold of operation recording, and enables non-senior test officers to quickly configure. At the same time, this structured processing provides necessary data support for subsequent automatic generation of test scripts, thereby avoiding the problems of low efficiency and difficult to logically and accurately describe operation steps caused by traditional manual line-by-line code writing.

[0013] Secondly, the configured operation description structures are assembled into complete test flow bodies according to operation sequence identifiers and stored in a database, realizing modular encapsulation and persistent management of test flows. As an independent entity, the test flow body can be decoupled from the specific test framework, so that the same set of operation logic can be flexibly reused in different test frameworks. In addition, the database storage method supports version control, historical tracking and team collaboration, effectively avoiding the disadvantages of traditional test scripts scattered storage, difficult to reuse and manage, greatly improving the reusability and maintenance convenience of test flows.

[0014] Thirdly, when a response script generation event occurs, according to the selected test framework identifier, the pre-encapsulated code bodies corresponding to each operation description structure in the test flow body are called from the database, and the corresponding operation code is dynamically generated. As can be seen, the pre-encapsulated code is responsible for implementing the general operation logic, and the specific execution target of the operation description of the code is adapted to quickly obtain the corresponding operation code. This "logic + adaptation adjustment" paradigm enables the same operation to only update the required parameters on different pages without rewriting the algorithm logic, thereby greatly improving the speed of script development, effectively avoiding the difficulty of cross-page script adaptation, and enhancing the flexibility and adaptability of the script.

[0015] Finally, the operation code is automatically assembled into the target test script according to the operation sequence, and is executed in the specified framework. This implementation realizes the complete conversion from user front-end operation configuration to automatic generation of executable scripts. This end-to-end automated process significantly shortens the writing time of test scripts, while the standardized pipeline operation ensures the consistency of script quality, thereby systematically improving the overall efficiency and quality of automated testing, and facilitating subsequent maintenance and coordination management.

[0016] In summary, the application takes structured operation description as the core hub, organically connects the two stages of visual configuration and script generation, realizes the excellent effect of reducing technical threshold, improving efficiency and strengthening enterprise-level test asset management. Through the multi-level conversion mechanism of operation logic objectification, process objectification and code automation, not only the cross-frame adaptability of the test process is enhanced, but also the robustness of the test is improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 The network architecture is exemplary for the application; Figure 2 The flowchart is exemplary for the process of the automated test method of the application; Figure 3 The principle block diagram is exemplary for the automated test device of the application; Figure 4 The structural schematic diagram is exemplary for a computer device adopted by the application. DETAILED DESCRIPTION

[0018] As shown in Figure 1 The network architecture of the application mainly includes a server 81 and a terminal device 80. The server 81 is used to run the automated test service and maintain the database relied by the service. The terminal device 80 of the application can provide the test user with access to the automated test service provided by the server, enter the corresponding automated test platform, use various functions provided by the platform, generate and run the corresponding target test script based on the interface operation for the target page, obtain the test result, and accordingly test the feasibility, reliability and performance of the page running code of the target page, and also can improve the page running code.

[0019] The automated test method of the application can be realized as a computer program product, which can be deployed in the server for running. The test platform can realize the automated test of the target page by running the target test script corresponding to the target page.

[0020] The test process referred to by the application generally includes the construction, execution and analysis of the test script. The construction of the test script is the basis of the whole test process, which involves the definition and recording of the page control operation steps for implementing the automated test of the target page. When constructing the test script, the automated test platform of the application can record the page control operation steps of the test user on the test page, and generate the corresponding test script according to the steps, so as to improve the generation efficiency of the test script and reduce human errors.

[0021] In the execution process, the automatic test platform of the present application executes the page control operation steps defined in the test script one by one to implement corresponding page control operations on the target page. These steps include but are not limited to page navigation, element clicking, text input, page control instructions, assertions, etc., aiming to simulate the interaction between real users and the target page and verify whether the page changes resulting from the interaction meet the expectations. The platform drives the browser or simulation device to execute these page control operations by calling the corresponding automation test interface and monitors the execution of the operations in real time.

[0022] The result analysis process is to evaluate and analyze the data generated in the execution process. The platform collects various data in the execution process, including operation execution time, return results, page state, etc., and judges whether the execution of the test script meets the expectations according to the preset rules and standards. For results that do not meet the expectations, the platform will perform detailed error analysis to locate the problem and provide a basis for subsequent code improvement and optimization. At the same time, the platform supports displaying the test results in an intuitive report form to the test user, making it easy for the user to quickly understand the test situation and promptly troubleshoot and repair problems.

[0023] Referring to Figure 2 The automatic test method of the present application, in a typical embodiment, includes the following steps: Step S1100, according to the visual operation configuration event of the page control operation on the target page, determine the operation description structure corresponding to each operation configuration event displayed in the test flow configuration page, the operation description structure includes operation sequence identifier, operation type and operation behavior parameter; The test platform provides a front-end visual operation interface for the user to implement various functions of the test, so that each function can perform the required visual operation in the front-end interface, and all function products are stored in the database. The various functions include module function, environment variable function, Mock function, method function, test flow function, etc.

[0024] The module function is used to create, modify, delete and query modules. A module refers to at least one operation sequence identifier and operation type of a page control operation step that can be reused in different test flows, so that the operation behavior parameters of the page control operation step can be further configured to construct the operation description structure in the structure of the corresponding test flow.

[0025] The environment variable function is used for creating, modifying, deleting, and querying environment variables, which are variables applicable to running in a specified environment and are represented by a value corresponding to a unique key. The running environment can be a test environment, a production environment, a specific terminal environment, and the like. When using this function to create environment variables in a specific environment, a value and its corresponding key need to be configured, i.e., an instance of an environment variable is represented as a key-value pair. For ease of understanding, an exemplary example is provided. In a test environment, an environment variable is [key: storeUrl], [value: https: / / ....com], [key: commodity classification list], and [value: / / div[@id=“…”]].

[0026] The Mock function is used for creating, modifying, deleting, and querying Mocks, which refer to simulating the required dependencies of a class or interface to obtain a return value, so that the script code and the dependent class or interface are independent and separate, and the same nature of return value can be obtained through simulated dependency without real dependency, thereby successfully executing the script. Of course, the return value can be set by the user as needed when editing the Mock instance, so that the set return value can be obtained when the Mock instance is called according to the reference parameter in the Mock instance. The Mock instance includes the reference parameter corresponding to the simulated class or interface, such as the class name or interface path.

[0027] The method function function is used for creating, modifying, deleting, and querying method functions, which refer to implementing personalized functions through specific algorithms, such as generating a mobile phone number, a random number, and the like.

[0028] The test flow function is used for creating, modifying, deleting, and querying test flows, which contain at least one page control operation step arranged in a corresponding operation order for executing a test task for a target page, and each page control operation step is configured with a corresponding operation type, operation order identifier, and operation behavior parameter.

[0029] The target page is a page that needs to be tested generated by running an application in a specified environment. The specification of the running environment and whether the page needs to be tested are determined by the user as needed.

[0030] The operation type represents the specific type of operation behavior that can be performed in the target page, including any one or more of access, click, scroll, input, long press, image assertion, information assertion, calling a Mock instance, and waiting.

[0031] The operation behavior parameter represents a parameter relied on by the corresponding operation behavior. Those skilled in the art should understand that the operation behavior parameter can be a key in an environment variable applicable to a target page running environment, which is realized based on an environment variable function, so that the operation behavior parameter can be facilitated to maintain, be flexible, and dynamically adapt to operation behavior parameter changes generated by iterations of an application. The operation behavior parameter can also be a method function output based on a method function function, and the output obtained by running the method function can be used as an input value required by an input test in the target page.

[0032] For ease of understanding, exemplary examples are as follows: operation type: access, operation behavior parameter: https: / / ....com (a specific access address) or storeUrl (an environment variable in a certain environment); operation type: click, operation behavior parameter: / / div[@id="..."] (an XPath or a CSS selector or other specific representations for locating a page element); operation type: image assertion, operation behavior parameter: a storage address of an expected page view in a database; operation type: information assertion, operation behavior parameter: a storage address of an expected information in a database; operation type: call a Mock instance, operation behavior parameter: a reference parameter in the Mock instance; and operation type: wait, operation behavior parameter: 1000 (a default unit: millisecond).

[0033] In order to perform a test task for a target page, a corresponding page control operation needs to be performed on the target page, and the operation is specifically a test flow. In one embodiment, a user can manually configure a test flow in a test platform using a test flow function. When the function is triggered for use, the test platform provides and front-end displays a test flow configuration page for the user. In the page, each page control operation step constituting the test flow can be created by a mouse operation, and the selection of an operation type of the step, the manual input of an operation behavior parameter of the step, the direct calling or input completion or associative input based on historical input records, etc. can be realized. In addition, the arrangement order between steps can be changed by dragging the page control operation steps. It is not difficult to understand that the page control operation steps arranged in order in the test flow configuration page define the operation order identifiers of the steps. In other embodiments, the user can call a module constructed based on a module function, and further configuration can be performed on the basis.

[0034] When the user confirms that all relevant configurations are completed in the test flow configuration page, the user can trigger a configuration completion event by touching a control (e.g., a save button, a submit button, etc.) in the page that represents the completion of the configuration. In response to the configuration completion event, each operation configuration event corresponding to the operation steps of each page control in the test flow configuration page is obtained, and by processing each operation configuration event, the operation order identifier, the operation type, and the operation behavior parameter of the corresponding step configured in the test flow configuration page are obtained, and these data are assembled into an operation description structure.

[0035] In step S1200, all operation description structures are constructed into a test flow body according to the operation order determined by the operation order identifier in each operation description structure, and each operation description structure is stored in a database. The operation order identifier in each operation description structure gives the operation order of the page control operation steps corresponding to the operation description structure in the test flow, and according to this, the operation description structures can be concatenated in the operation order to obtain the test flow body, which can represent the test flow in a structured and logically specific manner. Further, to facilitate the maintenance and management of the test flow, each operation description structure in the test flow body is stored in the database.

[0036] In step S1300, in response to a script generation event, a test framework identifier corresponding to the event is obtained, which is used to call the pre-packaged code corresponding to each operation description structure in the test flow body from the database to generate the corresponding operation code. When the user decides to use a test framework to run a test script, a script generation event can be triggered in the test flow configuration page, and the unique identifier of the test framework is provided. The test platform can obtain the identifier as the test framework identifier in response to the script generation event.

[0037] After the test flow body is stored in the database, the pre-packaged code corresponding to the operation type in each operation description structure in the test flow body can be determined, and each pre-packaged code is stored in association with the corresponding operation description structure for future calling.

[0038] It can be understood that for different test frameworks, the programming personnel of the test platform can determine the executable code corresponding to various operation types as pre-packaged code for constructing operation code to run the operation code to perform corresponding operation behaviors on the page. For the programming personnel of the test framework who has pre-packaged the method function and interface corresponding to the operation type, the programming personnel of the test platform can directly call or develop the executable code corresponding to the required operation type by adapting the code programming constraints of the test framework. Accordingly, in order to facilitate the maintenance and management of these pre-packaged codes, the corresponding operation types of each pre-packaged code are stored in the database, so that the corresponding pre-packaged code can be queried according to the operation type through the query operation of the database.

[0039] After the pre-packaged code corresponding to the operation type in the operation description structure is described, the parser is called to parse the operation behavior parameters in the operation description structure into code parameters, and the code parameters are injected into the pre-packaged code to obtain the operation code.

[0040] Step S1400, according to the operation sequence, all the operation codes are spliced into a target test script for running in the test framework identified by the test framework identifier to automatically test the target page.

[0041] According to the operation sequence, the operation code corresponding to each page control operation step is spliced to obtain a target test script. The target test script is constructed by adapting the test framework corresponding to the test framework identifier, and therefore can be directly run in the test framework to automatically test the target page to implement the test task. It can be seen that for any test framework identifier given by the user, the related code stored in the database and running in the corresponding test framework and adapting the test flow body test can be called to construct a test script.

[0042] According to the typical embodiments of the present application, the technical solutions of the present application have many advantages, including but not limited to the following aspects: Firstly, the present application configures events for visual operations of the target page, and determines the operation description structure corresponding to each configured operation step in the test flow configuration page, which contains operation sequence identifier, type and behavior parameters. The user operation which is not easy to structure is implemented as a standardized digital object, which reduces the operation record threshold, so that non-senior test officers can also configure simply and quickly. At the same time, this structured processing provides necessary data support for the subsequent automatic generation of test scripts, thereby avoiding the low efficiency and the problem that the operation steps are difficult to be logically and accurately expressed caused by traditional manual line-by-line code writing.

[0043] Secondly, the operation description structure configured is assembled into a complete test flow body according to an operation sequence identifier and stored in a database, realizing modular encapsulation and persistent management of the test flow. The test flow body can be decoupled from a specific test framework, so that the same set of operation logic can be flexibly reused in different test frameworks. In addition, the database storage mode supports version control, historical tracking and team collaboration, effectively avoiding the drawbacks of traditional test scripts scattered storage, difficult to reuse and manage, greatly improving the reusability and maintenance convenience of the test flow.

[0044] Furthermore, when generating a response script, according to the selected test framework identifier, the pre-encapsulated code body corresponding to each operation description structure in the test flow body is called from the database, and the corresponding operation code is dynamically generated. It can be seen that the pre-encapsulated code is responsible for implementing the general operation logic, and the specific execution target of the operation description code can be quickly obtained by adapting the operation parameters. This "logic + adaptation adjustment" paradigm makes it unnecessary to rewrite the algorithm logic when the same operation is updated on different pages, thereby greatly improving the speed of script development, effectively avoiding the difficulty of cross-page script adaptation, and enhancing the flexibility and adaptability of the script.

[0045] Finally, the operation code is automatically assembled into the target test script according to the operation sequence, and is used in the specified framework for execution. The complete conversion from user front-end operation configuration to automatic generation of executable scripts is realized. This end-to-end automation process significantly shortens the writing time of test scripts, while the standardized pipeline operation ensures the consistency of script quality, thereby systematically improving the efficiency and quality of the whole process of automated testing, and facilitating subsequent maintenance and coordination management.

[0046] In summary, the present application takes structured operation description as the core hub, organically links the two stages of visual configuration and script generation, realizes the excellent effect of reducing technical threshold, improving efficiency and strengthening enterprise-level test asset management. Through the multi-level conversion mechanism of operation logic instantiation, process objectification and code automation, not only the cross-framework adaptability of the test flow is enhanced, but also the robustness of the test is improved.

[0047] In a further embodiment, the test platform supports an alarm function. In one embodiment, a timing task is enabled to automatically check whether each test script designated by the task in the test platform can normally run according to a preset interval in the task. An alarm is triggered for a test script that does not normally run, thereby achieving a local inspection effect. Those skilled in the art can configure the interval according to the disclosure, for example, three minutes, half a day, etc. The test script that needs to be included in the timing task for inspection in the test platform can also be specified according to the business needs. When the alarm is triggered, the user who configures the test script is informed of the test exception, for example, message notification, telephone notification, email notification, interface pop-up window notification visible to the user in the test platform, and the like. It can be seen that unnecessary losses and negative effects caused by the test page being directly put online without test confirmation can be minimized.

[0048] In a further embodiment, after step S1400, the operation codes are assembled into the target test script according to the operation sequence, the method further includes the following steps: In step S1500, when the operation code of the operation type in the target test script belongs to the operation code corresponding to the assertion type, the operation result to be verified of the target page at the current time is obtained. The operation types of image assertion and information assertion both belong to the assertion type. When the operation code of the assertion type in the target test script is executed, a breakpoint is triggered, and it is necessary to determine whether the operation result to be verified of the target page at the current time passes the verification, and whether to continue to execute the subsequent operation code in the target test script.

[0049] For the operation code of the operation type of image assertion, when it is executed, a breakpoint is triggered, and the page view of the target page at the current time is intercepted as a real-time page view as the operation result to be verified. It can be understood that before this, a series of operations on the target page by running part of the code in the target test script can be verified to test whether the page view meets the expectation, for example, normally closing or displaying a certain page element of the page, the display effect of the page meets the product design requirements, and the like.

[0050] For the operation code of the operation type of information assertion, when it is executed, a breakpoint is triggered, and the real-time information generated in the target page at the current time is obtained as the operation result to be verified. It can be understood that before this, the information generated by a series of operations on the target page by running part of the code in the target test script needs to be verified to test whether the page information is normal, for example, the test task of the order settlement page is to verify whether the order payment amount is accurate. Therefore, the order payment amount generated by a series of operations on the order settlement page needs to be verified, and the calculation is accurate and correct, which is considered as the test confirmation that the order settlement function of the page is normal.

[0051] Step S1510, matching the operation result to be verified with the expected operation result corresponding thereto in the database, obtaining a matching result, the expected operation result being mapped with the operation description structure corresponding to the operation code; For the operation code of the operation type of image assertion, further according to the code parameter in the operation code, i.e. the storage address in the database, the expected page view pointed thereby is obtained from the database as the expected operation result. The image similarity between the real-time page view as the result to be verified and the expected page view as the expected operation result is determined, whether the image similarity exceeds a preset threshold is judged, if yes, the real-time page view and the expected page view are marked with a label of meeting the expectation, and the real-time page view and the expected page view after the marking are composed into the matching result; if not, the real-time page view and the expected page view are marked with a label of not meeting the expectation, and the real-time page view and the expected page view after the marking are composed into the matching result. The preset threshold can be set by the person skilled in the art as needed. The image similarity between the real-time page view and the expected page view is determined, and the image matching algorithm in the pixelmatch library is recommended to be called for implementation, and the person skilled in the art can also call other open-source image matching algorithms for implementation.

[0052] For the operation code of the operation type of information assertion, further according to the code parameter in the operation code, i.e. the storage address in the database, the expected information pointed thereby is obtained from the database as the expected operation result. The consistency between the real-time information as the result to be verified and the expected information as the expected operation result is matched, i.e. whether the two are consistent is judged, if yes, the real-time information and the expected information are marked with a label of meeting the expectation, and the real-time information and the expected information after the marking are composed into the matching result; if not, the real-time information and the expected information are marked with a label of not meeting the expectation, and the real-time information and the expected information after the marking are composed into the matching result.

[0053] Step S1520, when the matching result represents that the verification passes, the target test script is continuously executed.

[0054] When the label marked by the operation result to be verified and the expected operation result in the matching result is the label of meeting the expectation, it means that the matching result represents that the verification passes at this time, and according to this, the subsequent operation code in the target test script can be continuously executed, in addition, in an embodiment, in order to be able to be visually displayed in the test flow configuration page in association with the operation description structure corresponding to the operation code currently executed, the matching result is stored to the database in association with the operation description structure.

[0055] In this embodiment, by dynamically capturing the operation results to be verified and intelligently matching them with the expected results when executing the assertion type operation code, the automatic closed-loop management of the test verification link is realized. First, by real-time intercepting the page view or obtaining the output information as the verification basis, the instantaneity and authenticity of the test result feedback are ensured, effectively avoiding the subjective bias and low efficiency of the traditional manual comparison method. Secondly, the standardized comparison mechanism of pre-storing the expected results and real-time results in the database not only supports various verification strategies such as image similarity threshold determination and data structured matching, but also provides structured data support for test report generation and historical tracing by storing the matching results in a symbolic way. More importantly, the automatic association storage of the verification results and the operation description structure enables the test process configuration page to visually display the pass status of the assertion points in real time, forming a complete link of "execution-verification-feedback", and significantly improving the observability of the test results and the problem positioning efficiency.

[0056] In further embodiments, step S1300, in response to the script generation event, acquires the test framework identifier corresponding to the event, which is used to call the pre-packaged code body corresponding to each operation description structure in the test process body from the database, to generate the corresponding operation code, including the following steps: Step S1310, determine the test code table pointed to by the test framework identifier corresponding to the script generation event in the database; For each test framework, a unique identifier corresponding to the test framework can be constructed to uniquely distinguish the test framework from other test frameworks. For each test framework identifier, a test code table associated with the test framework identifier can be maintained in the database, which contains various operation types supported in the test platform and their corresponding pre-packaged code bodies. For example, for the Selenium framework, the WebElement.click() method encapsulation code corresponding to the "click" operation type may be stored in the test code table.

[0057] Step S1320, according to the operation types in each operation description structure in the test process body stored in the database, query the test code table for the mapping associated pre-packaged code bodies; It is not difficult to understand that for the operation types in each operation description structure in the test process body, the operation type can be used as a query condition to retrieve the matching pre-packaged code body from the test code table. Those skilled in the art can flexibly construct database query statements to meet the query requirements disclosed herein. For example: the query statement can be written as SELECT code_body FROM "test code table" WHERE operation_type = "specific operation type", and executing the query statement can obtain the required pre-packaged code body.

[0058] Step S1330, parse the operation behavior parameter in the operation description structure corresponding to each pre-packaged code body into a code parameter, and inject the pre-packaged code body to obtain operation code.

[0059] For each pre-packaged code body, the parser is called to parse the operation behavior parameter in the operation description structure corresponding to the pre-packaged code body. First, it is determined whether the operation behavior parameter belongs to an environment variable or a method function. If not, the operation behavior parameter is taken as a code parameter. If the operation behavior parameter belongs to an environment variable, the corresponding value (value) configured by the key in the specific environment variable of the operation behavior parameter in the database is taken as a code parameter. If the operation behavior parameter belongs to a method function, the operation behavior parameter, i.e., the specific method function, is run, and the obtained running result is taken as a code parameter. Then, the code parameter is taken as the input parameter of the pre-packaged code body and injected into the pre-packaged code body to obtain operation code.

[0060] In this embodiment, by establishing a mapping system of test framework identifier and test code table, the unified adaptation capability of cross-framework script generation is realized. First, the test code table is used as the central repository of pre-packaged code. Through the decoupling design of operation type and framework-specific code, the same operation logic (such as clicking) only needs to maintain the corresponding code body mapping relationship in different frameworks (such as Selenium / Playwright), greatly reducing the maintenance cost brought by multi-framework support. Second, through the intelligent parsing mechanism of operation behavior parameters, the parameter types such as environment variables and method functions are automatically identified and dynamically injected into the pre-packaged code, which not only retains the flexibility of parameter configuration, but also ensures the accuracy of code generation, solving the problem of poor script adaptability caused by traditional parameter hard coding. Third, the database-driven query mechanism makes it only need to extend the code table content when supporting new test frameworks without modifying the core generation logic, significantly improving the scalability.

[0061] In a further embodiment, step S1510, the operation result to be verified is matched with the expected operation result corresponding to it in the database, and a matching result is obtained, including the following steps: Step S1511, when the matching result indicates that the verification fails, the operation description structures corresponding to the operation code currently executed in the target test script and all operation codes before it are constructed into an executed operation structure according to the operation order. First, the operation code corresponding to the operation type that triggers the verification failure, i.e., the operation code currently executed, is located, and the operation order identifier of the operation code is traced back in the target test script. The operation description structures associated with the operation order identifier and all operation codes before it are extracted. These operation description structures are assembled in operation order to obtain an executed operation structure.

[0062] Step S1512, generating a test exception report corresponding to the target page according to the executed operation structure.

[0063] The detailed configuration of all steps in the executed operation structure is listed in operation sequence to form a complete execution track. For ease of understanding, an exemplary example is shown: {Step 1: [Operation type: access, parameter: https: / / store.com], Step 2: [Operation type: input, parameter: id=username, value: ${testUser}], Step 3: [Operation type: click, parameter: xpath= / / login_button], Step 4: [Operation type: information assertion, parameter: expected amount = "¥100"]}. The completed execution track is spliced with the matching result to obtain the test exception report.

[0064] In this embodiment, the intelligent processing chain of test failure analysis is constructed through the backtracking and exception report generation of the executed operation structure. For this, the precise positioning of the failure point and the automatic aggregation of the previous steps are realized through the operation sequence identifier, the execution track which needs to be manually combed in the traditional way is converted into a structured executed operation structure, so that the abnormal analysis can be directly focused on the key path. At the report generation level, combined with the structured characteristics of the operation description and the difference data of the matching result, a diagnostic report containing complete execution context and specific failure point is automatically generated, which not only avoids the information fragmentation problem of traditional log analysis, but also intuitively exposes the nature of the problem through the juxtaposition and comparison of operation parameters and expected results. This mechanism is particularly suitable for regression testing of complex processes, can quickly distinguish between environment configuration problems and real logic defects, and shorten the average fault diagnosis time.

[0065] In a further embodiment, step S1400, all operation codes are spliced into a target test script according to the operation sequence, which is used to run in the test framework identified by the test framework identifier for automated testing of the target page, including the following steps: Step S1410, according to the running state of each operation code in the target test script during the running of the target test script in the test framework, capturing execution information corresponding to each operation sequence identifier, the execution information including any one or more of running state identifier, execution timestamp, and execution log; Generally, the test framework supports executing each operation code in the target test script according to the operation sequence during the running of the target test script, and then automatically marking the execution information of each operation step corresponding to each operation sequence identifier according to the execution state of each operation code, and then outputting these execution information in the form of a report.

[0066] The running state identifier refers to using an identified description text to refer to a specific running state, including state enumeration values such as "success" and "failure". For example, "success" can be pass, and "failure" can be fail.

[0067] The execution timestamp refers to recording the precise time points at which the operation code starts and ends execution, and is stored in the ISO 8601 standard format.

[0068] The execution log contains structured data such as console output execution recording information, error stack, performance indicators, etc. For example, the browser console log obtained by the get_log('browser') method in the Selenium framework.

[0069] Step S1420, in response to the user's viewing operation of the execution information, the execution information is visually displayed.

[0070] The user can view the report output by each test script in the front-end report interface of the test platform at any time, which details the execution information corresponding to each operation step in the script, so that the user can understand the global and / or local running actual situation of the script.

[0071] In the recommended embodiment, for the execution visualization of the image assertion operation type, in addition to displaying basic state information, the expected page view and the actual page view can also be displayed side by side for comparison, and the inconsistent image area is identified by the difference highlighting tool. For the execution visualization of the information assertion operation type, the actual information and the expected information are compared in table form, and the information differences are automatically marked in red. The execution timestamp information is used to show the time consumption distribution of each step with a line chart, helping to locate performance bottlenecks. The execution log can also support keyword search function, providing log content required for adaptation search.

[0072] In this embodiment, through the full-link monitoring and visual display of the execution information, a transparent management and control system of the test running state is created. First, a multi-dimensional execution information capture mechanism (state identifier, timestamp, log) is used to build a three-dimensional monitoring network at the operation code level, which can achieve more detailed performance analysis and abnormal positioning compared with the coarse-grained solution of the traditional test framework which only provides use case level monitoring. Second, the operation sequence identifier dynamically associates the runtime data with the operation description structure in the configuration stage, forming a "configuration-execution" bidirectional traceability capability in the test process configuration page, so that the user can directly view the real-time execution state on the original configuration interface, completely changing the situation of the separation of configuration and execution data in traditional test tools. It is particularly worth emphasizing that the differentiated visual display strategy (such as side-by-side image comparison, information difference red marking) converts professional-level test data analysis into intuitive visual feedback, greatly reducing the technical threshold and understanding time of test result interpretation.

[0073] In a further embodiment, before the step S1120 of invoking the preset test configuration model to generate the operation description semi-body of the at least one page control operation step according to the test task text and the page running data, the following steps are included: In step S2120, a training set is obtained, which includes a plurality of training samples and their supervision labels. The training samples are test task texts and page running data of historical test pages, and the supervision labels are operation description semi-bodies of each page control operation step in the execution of the corresponding test task of the historical test pages. In the process of training the test configuration model, a high-quality training set needs to be constructed first. The training set is composed of a plurality of training samples and their corresponding supervision labels, wherein each training sample contains two key elements: a test task text of a historical test page and corresponding page running data. The test task text describes the test requirements of the page in natural language, such as "verify user login function" or "test the accuracy of shopping cart settlement amount calculation". The page running data is the resource file that can support the running of the page and / or the screenshot in the running state of the page, for example: the resource file can be the HTML source code of the page. The supervision label is the standardized description of the actual operation steps adopted in the execution of the test task of the historical test page, i.e. the operation description semi-body, which contains three structured fields: operation sequence identification, operation type and operation behavior description text.

[0074] In an embodiment, the operation sequence identification in the operation description semi-body represents the step execution order with an integer number, for example, 1 represents the first step operation. The operation type is selected from all operation types supported by the test platform, including but not limited to access, click, input, assertion, etc. The operation behavior description text describes the operation behavior dependent parameters in semi-structured natural language, for example, for click operation, it can be described as "click the login button", and for input operation, it can be described as "fill in the test account in the username input box". The supervision label can be manually labeled by the test personnel of the test platform according to the actual test case required, to ensure that the defined configuration of each operation step accurately reflects the test intention.

[0075] It is not difficult to understand that for the training samples and their supervision labels in the training set, they can be obtained by collecting historical test cases of test personnel of the test platform and processing them according to the requirements of preparation. The historical test case is a test flow body configured manually by the test personnel in the test flow configuration page, and based on the operation type and operation behavior parameters in each operation description structure body in the test flow body, the corresponding operation behavior description text is manually configured.

[0076] Step S2121, calling the training set to train the test configuration model to a convergent state, learning the ability of the operation description semi-product of each page control operation step in the corresponding test task of the page according to the test task text and page running data of the page.

[0077] The test configuration model training adopts a supervised learning paradigm, taking a convolutional neural network and a text encoding network of natural language processing as a basic framework, and splicing a fusion layer and a decoding neural network of natural language processing thereon. In specific implementation, the training sample in the training set and its supervision label are applied to develop the inference process of the model from the perspective of the network structure of the test configuration model, the page running data in the training sample is input into the convolutional neural network branch for image feature extraction, and the test task text in the training sample is input into the text encoding network branch for semantic coding. After the feature vectors of the two branches are spliced in the fusion layer, the fusion feature vector is decoded through the decoding neural network, and the predicted operation description semi-product of at least one page control operation step in the corresponding test task of the page is output. A loss function adopts a multi-task learning framework, takes the deviation between the predicted operation description semi-product and the supervision label (i.e. the actual operation description semi-product) as a training target, and provides a corresponding loss value. When the loss value does not exceed a preset threshold, it is determined that the test configuration model is trained to a convergent state and the training of the model is terminated, at which time the model learns the required function of supervision training; when the loss value exceeds the preset threshold, other training samples and their supervision labels are called, the corresponding weight parameters in the network structure of the model are adjusted according to the loss value, and the training is iterated until convergence.

[0078] In the embodiment, the intelligent inference ability breakthrough from test requirements to operation steps is realized through the supervision training mechanism of the test configuration model. The training set constructed based on historical test cases deposits the operation configuration experience of actual test personnel into a reusable machine learning model, so that the model can automatically derive reasonable operation step suggestions from page visual features and task semantics. This knowledge distillation mechanism effectively solves the problem of high dependence on manual experience in traditional test configuration, and is especially suitable for new employees to quickly generate test processes conforming to best practices. At the model architecture level, the multi-modal learning framework of computer vision and natural language processing is fused to ensure that the model can understand the visual semantics of interface elements (such as recognizing clickable buttons) and grasp the technical intent of test tasks (such as verifying login functions), and the generated semi-product operation description not only retains the structured characteristics of manual configuration, but also provides sufficient support for subsequent parameter perfection, showing a magnitude advantage in test case design efficiency improvement.

[0079] In a further embodiment, step S1100, according to the visualization operation configuration event of performing the page control operation on the target page, determines the operation description structure corresponding to each operation configuration event displayed in the test flow configuration page, including the following steps: Step S1110, obtaining the test task text of performing the page control operation on the target, and the page view of the target page; The test task text usually describes the test requirements or test scenarios that need to be verified in natural language. The sources of the test task text include but are not limited to: pure text description manually input by the user on the front-end interface, key sentences extracted from the test requirement document, or text records converted through voice recognition. For example, in the test scenario of the page in the e-commerce platform, the test task text can be "verify the user login function" or "test the accuracy of the automatic calculation of the shopping cart commodity amount".

[0080] The page running data of the target page can be the page view obtained by the page running screenshot, and / or the resource file supporting the page running such as the HTML source code of the page. The page view refers to the visual presentation of the web page or application interface that needs to be tested, and its acquisition method includes the page screenshot captured by the browser developer tool, the image data obtained by using the page screenshot API provided by the automation test framework, or the bitmap data directly output from the application runtime rendering engine. The page view should contain complete page content.

[0081] Step S1120, calling a preset test configuration model to generate at least one operation description semi-body of the page control operation step according to the test task text and the page running data, the operation description semi-body including operation sequence identification, operation type and operation behavior description text, the operation behavior description text being used to configure the operation behavior parameters of the corresponding page control operation step; The test configuration model is trained to a convergent state in advance and learns the ability to infer the operation description semi-body of each page control operation step in the corresponding test task of the test page according to the test task text and the page running data of the test page. Therefore, for the target page, the test task text and the page running data corresponding to the test configuration model can efficiently and accurately infer at least one operation description semi-body of the page control operation step that adapts to the test task.

[0082] Step S1130, according to the operation sequence determined by the operation sequence identification of each operation description semi-body, displaying all operation description semi-bodies in the test flow configuration page, so as to configure the operation sequence identification, operation type and operation behavior parameters of the corresponding page control operation step based on the operation description semi-body; When the operation sequence identifier of the operation description semi-antecedent is displayed to recommend the configuration of the display configuration, the test flow configuration page at the front end presents the operation description antecedent of each page control operation step generated in the form of an interactive list. Each step entry in the operation sequence arrangement displays its operation sequence identifier, operation type, and operation behavior description text, for example, displayed as "1. [click] Login button". The user can adjust the step order by dragging, modify the operation type through a drop-down menu, and input text through a text editing box to perfect the operation behavior parameters. The test flow configuration page can also provide an intelligent completion function. When the user inputs the operation behavior parameters, the corresponding step is automatically prompted with a possible matching page element positioning expression or a predefined environment variable according to the operation type, for example, the operation type of the image assertion. The database storage address of the matching expected page view is supported according to the real-time input on the interface, so that the complete address can be conveniently input with one key.

[0083] In step S1140, in response to a configuration completion event triggered based on the test flow configuration page, for each page control operation step corresponding to an operation configuration event in the test flow configuration page, the operation sequence identifier, operation type, and operation behavior parameters configured for the page control operation step are determined to be assembled into an operation description structure.

[0084] In response to the generation of the operation description structure in the configuration completion event, it can be verified whether all the required fields are complete, including the validity check of the operation type and the format check of the operation behavior parameters. After the verification, the operation sequence identifier, operation type, and operation behavior parameters of each page control operation step confirmed by the user are assembled into the operation description structure of the step.

[0085] In this embodiment, through the collaborative workflow of the test configuration model and the visual configuration page, a test design solution that assists artificial efficient configuration is constructed. First, the operation description semi-antecedent is used as an intermediate representation layer for human-computer collaboration, which not only utilizes the intelligent recommendation results (operation sequence / operation type / operation behavior parameter description) output by the model, but also provides support for the operation behavior parameters for the user's final decision, greatly improving the user configuration experience and efficiency. Second, the interactive design of the test flow configuration page is optimized for semi-antecedent transformation. Through the combination of functions such as drag-and-drop sorting, type drop-down menu, and intelligent parameter association, the user's efficiency in correcting operation steps is higher. Third, the automatic verification and structure assembly mechanism when the configuration is completed not only guarantees data integrity but also realizes the lossless conversion of user operations into machine executable script corresponding intermediates, forming an end-to-end logical instantiation from test requirements to intermediates, which can effectively land the test task.

[0086] Please refer to Figure 3According to an aspect of the present application, an automatic testing device is provided, which comprises an event listening module 1100, a data storage module 1200, an event response module 1300 and a script construction module 1400. The event listening module 1100 is configured to configure events according to visual operation of page control operation on a target page, determine operation description structures corresponding to each operation configuration event displayed in a testing flow configuration page, and the operation description structures comprise operation sequence identifiers, operation types and operation behavior parameters. The data storage module 1200 is configured to construct all operation description structures into a testing flow body according to operation sequences determined by the operation sequence identifiers in each operation description structure, and store each operation description structure in the testing flow body into a database. The event response module 1300 is configured to respond to a script generation event, acquire a testing framework identifier corresponding to the event, and call pre-packaged code bodies corresponding to each operation description structure in the testing flow body from the database to generate corresponding operation codes. The script construction module is configured to splice all operation codes into a target testing script according to the operation sequences, and run the target testing script in a testing framework indicated by the testing framework identifier to perform automatic testing on the target page.

[0087] In further embodiments, the script construction module further comprises an operation result acquisition submodule configured to acquire a to-be-verified operation result of the target page at a current time when an operation code corresponding to an operation type belonging to an assertion type in the target testing script is executed. The script construction module further comprises a matching result acquisition submodule configured to match the to-be-verified operation result with an expected operation result corresponding to the operation code in the database to obtain a matching result, the expected operation result being mapped to an operation description structure corresponding to the operation code. The script construction module further comprises a matching result storage submodule configured to continue to execute the target testing script when the matching result indicates that the verification is passed.

[0088] In further embodiments, the event response module 1300 comprises a table determination submodule configured to determine a testing code table corresponding to a testing framework identifier corresponding to the script generation event in the database. The event response module 1300 further comprises a code body query submodule configured to query each pre-packaged code body mapped and associated in the testing code table according to operation types in each operation description structure in the testing flow body stored in the database. The event response module 1300 further comprises a code construction submodule configured to parse operation behavior parameters in each operation description structure corresponding to each pre-packaged code body into code parameters, and inject the operation behavior parameters into the pre-packaged code body to obtain an operation code.

[0089] In a further embodiment, the matching result obtaining submodule comprises: a first structure constructing submodule, configured to, when the matching result represents a failed check, construct operation description structures corresponding to all operation codes before the operation code currently executed in the target test script into an executed operation structure according to operation order; and an exception attribution submodule, configured to generate a test exception report corresponding to the target page according to the executed operation structure.

[0090] In a further embodiment, the event response module 1300 comprises: a monitoring running submodule, configured to capture execution information corresponding to each operation order identifier according to a running state of each operation code in the target test script during running of the target test script in the test framework, the execution information comprising any one or more of a running state identifier, an execution timestamp, and an execution log; and an execution information storage submodule, configured to, in response to a user viewing operation of the execution information, visually display the execution information.

[0091] In a further embodiment, the model inference submodule comprises: a training set obtaining submodule, configured to obtain a pre-prepared training set, the training set comprising a plurality of training samples and supervision labels thereof, the training samples being test task texts and page running data of historical test pages, and the supervision labels being operation description half-bodies of each page control operation step in execution of a corresponding test task of the historical test page; and a model training submodule, configured to train the test configuration model to a convergent state by calling the training set, and learn an ability to infer operation description half-bodies of each page control operation step in a corresponding test task of a test page according to test task texts and page running data of the test page.

[0092] In a further embodiment, the event monitoring module 1100 includes: a data acquisition submodule, which is used to obtain a test task text for performing a page control operation on the target, and the page operation data of the target page; a model reasoning submodule, which is used to call a preset test configuration model to generate an operation description semi-body of at least one page control operation step according to the test task text and the page operation data, wherein the operation description semi-body includes an operation sequence identifier, an operation type and an operation behavior description text, and the operation behavior description text is used to configure the operation behavior parameters of the corresponding page control operation step; a data display submodule, which is used to display all operation description semi-bodies on the test process configuration page according to the operation sequence determined by the operation sequence identifier of each operation description semi-body, so as to configure the operation sequence identifier, operation type and operation behavior parameters of the corresponding page control operation step based on the operation description semi-body; and a second structure construction submodule, which is used to respond to a configuration completion event triggered based on the test process configuration page, and for each page control operation step in the test process configuration page, determine the operation sequence identifier, operation type and operation behavior parameters configured for the page control operation step, and assemble them into an operation description structure.

[0093] Another embodiment of the present application also provides a test abnormal relocation device. Figure 4 FIG2 is a schematic diagram of the internal structure of a test anomaly relocation device. The test anomaly relocation device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable, non-volatile storage medium of the test anomaly relocation device stores an operating system, a test database, and computer-readable instructions. The test database may store an information sequence. When the computer-readable instructions are executed by the processor, the processor implements an automated testing method.

[0094] The processor of the test anomaly relocation device is used to provide computing and control capabilities to support the operation of the entire test anomaly relocation device. The memory of the test anomaly relocation device may store computer-readable instructions, which, when executed by the processor, may cause the processor to execute the automated testing method of the present application. The network interface of the test anomaly relocation device is used to connect and communicate with a terminal.

[0095] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the test abnormality relocation device to which the solution of the present application is applied. The specific test abnormality relocation device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0096] In this embodiment, the processor is used to executeFigure 3 The memory stores program codes and various data required for executing the above-mentioned modules or sub-modules. The network interface is used to realize data transmission between the user terminal or the server. The non-volatile readable storage medium in the embodiment stores program codes and data required for executing all modules in the automatic testing device of the present application, and the server can call the program codes and data of the server to execute the functions of all modules.

[0097] The present application also provides a non-volatile readable storage medium storing computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the automatic testing method of any embodiment of the present application.

[0098] The present application also provides a computer program product, including computer program / instructions, which, when executed by one or more processors, realize the steps of the method described in any embodiment of the present application.

[0099] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods of the present application can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of each method. The storage medium can be a computer readable storage medium such as a magnetic disc, an optical disc, a read-only memory (ROM), or a random access memory (RAM).

[0100] In summary, the present application can assist users to efficiently and conveniently realize automatic testing, and can efficiently deal with testing engineering contents such as framework requirements, actual measurement and expected testing, and output reports in the automatic testing platform, thereby providing strong and flexible support for testing engineering, and significantly improving the efficiency of the overall testing process and user experience.

Claims

1. An automated testing method, characterized in that: The steps include: Determine, based on a visual operation configuration event for executing a page control operation on a target page, an operation description structure corresponding to each operation configuration event displayed on a test process configuration page, wherein the operation description structure includes an operation sequence identifier, an operation type, and an operation behavior parameter; According to the operation sequence determined by the operation sequence identifier in each of the operation description structures, all the operation description structures are constructed into a test process body, and each of the operation description structures is stored in a database; In response to a script generation event, a test framework identifier corresponding to the event is obtained, which is used to call the pre-packaged code body corresponding to each operation description structure in the test process body from the database to generate the corresponding operation code; All the operation codes are assembled into a target test script according to the operation sequence, and are used to run in the test framework pointed to by the test framework identifier to perform automated testing on the target page.

2. The automated testing method according to claim 1, wherein: After assembling all the operation codes into a target test script according to the operation sequence, the following steps are included: When executing an operation code corresponding to an assertion type in the target test script, obtaining a to-be-verified operation result of the target page at the current moment; Matching the to-be-verified operation result with its corresponding expected operation result in the database to obtain a matching result, wherein the expected operation result is mapped to the operation description structure corresponding to the operation code; When the matching result representation verification passes, the target test script continues to be executed.

3. The automated testing method according to claim 1, wherein: In response to a script generation event, obtaining a test framework identifier corresponding to the event, and calling the pre-packaged code body corresponding to each operation description structure in the test process body from the database to generate the corresponding operation code, including the following steps: Determine the test code table pointed to by the test framework identifier corresponding to the script generation event in the database; According to the operation type in each operation description structure in the test process body stored in the database, query each pre-packaged code body mapped and associated in the test code table; The operation behavior parameters in the operation description structure corresponding to each of the pre-packaged code bodies are parsed into code parameters, and the code parameters are injected into the pre-packaged code body to obtain the operation code.

4. The automated testing method according to claim 2, wherein: Matching the operation result to be verified with the expected operation result corresponding to it in the database to obtain a matching result includes the following steps: When the matching result characterization verification fails, the operation description structures corresponding to the operation code currently executed in the target test script and all the operation codes before it are constructed into an executed operation structure according to the operation sequence; A test exception report corresponding to the target page is generated according to the executed operation structure.

5. The automated testing method according to claim 1, wherein: Assembling all the operation codes into a target test script according to the operation sequence, and running the target test script in the test framework pointed to by the test framework identifier to perform automated testing on the target page, including the following steps: capturing execution information corresponding to each operation sequence identifier according to the running status of each operation code in the target test script during the running of the target test script in the test framework, the execution information including any one or more of a running status identifier, an execution timestamp, and an execution log; In response to a user viewing operation of the execution information, the execution information is visually displayed.

6. The automated testing method according to claim 1, wherein: Before calling a preset test configuration model to generate a semi-completed operation description of at least one page control operation step according to the test task text and page operation data, the following steps are included: Obtain a pre-prepared training set, the training set including a plurality of training samples and their supervisory labels, the training samples being test task text and page operation data of a historical test page, and the supervisory labels being a semi-completed description of each page control operation step in executing a corresponding test task on the historical test page; The training set is called to train the test configuration model to a convergent state, and the model is learned to infer the semi-completed operation description of each page control operation step in the corresponding test task of the page based on the test task text and page operation data of the test page.

7. The automated testing method according to claim 1, wherein: Determining an operation description structure corresponding to each operation configuration event displayed on a test process configuration page based on a visual operation configuration event for executing a page control operation on a target page includes the following steps: Acquire a test task text for executing a page control operation on the target, and page operation data of the target page; Invoking a preset test configuration model to generate, based on the test task text and page operation data, an operation description semi-form for at least one page control operation step, the operation description semi-form including an operation sequence identifier, an operation type, and an operation behavior description text, the operation behavior description text being used to configure operation behavior parameters for the corresponding page control operation step; Based on the operation sequence determined by the operation sequence identifier of each operation description semi-complete body, all operation description semi-complete bodies are displayed on the test process configuration page, so that the operation sequence identifier, operation type and operation behavior parameters of the corresponding page control operation steps can be configured based on the operation description semi-complete body; In response to the configuration completion event triggered based on the test process configuration page, for the operation configuration event corresponding to each page control operation step in the test process configuration page, the operation sequence identifier, operation type and operation behavior parameters configured for the page control operation step are determined and assembled into an operation description structure.

8. An automated testing device, characterized in that: include: An event monitoring module is used to determine an operation description structure corresponding to each operation configuration event displayed on the test process configuration page based on a visual operation configuration event that performs a page control operation on a target page. The operation description structure includes an operation sequence identifier, an operation type, and operation behavior parameters. A data storage module is used to construct all the operation description structures into a test process body according to the operation sequence determined by the operation sequence identifier in each of the operation description structures, and store each of the operation description structures in a database; An event response module is used to respond to script generation events, obtain the test framework identifier corresponding to the event, and call the pre-packaged code body corresponding to each operation description structure in the test process body from the database to generate the corresponding operation code; A script construction module is used to assemble all the operation codes into a target test script according to the operation sequence, and is used to run in the test framework pointed to by the test framework identifier to perform automated testing on the target page.

9. A test abnormal relocation device, comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.

10. A non-volatile readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.