Automatic test resource execution method and related product

By building a mapping database to automatically match commercial banks' automated testing resources with the execution environment and decoupling address and connection information, the problem of low execution efficiency of automated testing resources is solved, and efficient and accurate test execution and flexible configuration management are achieved.

CN120705064APending Publication Date: 2025-09-26AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510981358.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Commercial banks' automated testing resources suffer from low execution efficiency, high maintenance costs, and are prone to errors. Configuration management is complex during environment switching, leading to distorted test results and waste of resources.

Method used

By building a mapping database, automatically matching automated test resources with the execution environment, decoupling the execution address and database connection information, and dynamically injecting parameterized configurations, standardization and automated management of test resource configuration can be achieved.

Benefits of technology

It improves the efficiency and accuracy of test execution, reduces the configuration management cost of environment switching, enhances the flexibility and scalability of the automated testing system, adapts to complex business architecture, and reduces manual maintenance workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705064A_ABST
    Figure CN120705064A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic test resource execution method and a related product. The method comprises the following steps: acquiring an automatic test resource to be executed; determining an automatic test execution environment corresponding to the to-be-executed automatic test resource based on a mapping database; the mapping database comprises a plurality of mapping relationships between the automatic test resources and the automatic test execution environment; inputting an automated test execution address and database connection information in the automated test execution environment into an execution script to obtain an execution result of automated test resources based on the automated test execution environment; the automatic test execution address and the database connection information in the execution script are in a separated state. According to the method, the test execution efficiency and accuracy are improved, the configuration management burden caused by environment switching is remarkably reduced, the flexibility and expandability of an automatic test system are enhanced, and the execution efficiency of automatic test resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an automated test resource execution method and related products. Background Art

[0002] With commercial banks placing high demands on system stability and reliability, automated testing has become a key means of achieving "rapid iteration and stable delivery." In recent years, major banks have increased their investment, leading to a rapid expansion of their testing assets. For example, one commercial bank's automated testing assets surged from approximately 3,800 in August 2018 to over 100,000 in June 2020, a 26-fold increase in two years, demonstrating explosive growth.

[0003] However, commercial banks have a large number of application systems and complex interconnectedness. Furthermore, each system requires multiple test environments to meet diverse needs such as development and debugging, functional testing, and performance testing. As a result, the number of required test environments is often several or even dozens of times the number of the system itself. Each type of test environment requires the configuration of a corresponding execution script, significantly increasing the total number of scripts. Under the current approach, manual maintenance of the environment configuration information within the scripts is required when switching environments or executing a large number of scripts in batches. This not only results in high maintenance costs and a high error rate, but also makes it easy for individual script address misconfigurations to cause execution failures or distorted results. This wastes significant manpower and time in troubleshooting and corrections, resulting in low efficiency in the execution of automated testing resources. Summary of the Invention

[0004] Based on the above problems, the present application provides an automated test resource execution method and related products to improve the efficiency of automated test resource execution.

[0005] The embodiments of this application disclose the following technical solutions:

[0006] A first aspect of the present application provides a method for executing automated test resources, the method comprising:

[0007] Get the automated test resources to be executed;

[0008] Determining the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database; the mapping database includes mapping relationships between multiple automated test resources and automated test execution environments;

[0009] The automated test execution address and database connection information in the automated test execution environment are input into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0010] Optionally, the method further includes:

[0011] Obtain multiple automated testing resources;

[0012] Determine the domain name of the access application corresponding to each automated test resource based on each automated test resource;

[0013] Build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource;

[0014] Construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource;

[0015] The automated test execution environment is stored and managed based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

[0016] Optionally, determining the domain name of the access application corresponding to each automated testing resource based on each automated testing resource specifically includes:

[0017] Use the container source resources in each automated test resource to query the Ingress configuration corresponding to each automated test resource based on the cluster and assigned namespace;

[0018] Determine the domain name of the access application corresponding to each automated test resource based on the Ingress configuration corresponding to each automated test resource.

[0019] Optionally, the method further includes:

[0020] The mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database is detected to determine a detection result.

[0021] Optionally, detecting the mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database and determining the detection result specifically includes:

[0022] Obtain the automated testing resources to be tested;

[0023] Determine the access application domain name corresponding to the automated test resource to be tested;

[0024] If the mapping database contains a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, then the automated test execution environment corresponding to the automated test resource to be detected and the target access application domain name are compared to obtain a judgment result;

[0025] If the judgment result indicates that the comparison is successful, the detection result is successful and the comparison ends;

[0026] If the judgment result indicates that the comparison fails, the detection result is an incident and an error instruction is generated;

[0027] If the mapping database does not contain a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, the mapping database is updated based on the automated test resource to be detected.

[0028] A second aspect of the present application provides an automated test resource execution device, the automated test resource execution device comprising:

[0029] The first acquisition module is used to obtain the automated test resources to be executed;

[0030] A mapping module, configured to determine the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database; the mapping database includes mapping relationships between multiple automated test resources and automated test execution environments;

[0031] The execution module is used to input the automated test execution address and database connection information in the automated test execution environment into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0032] Optionally, the device further comprises:

[0033] The second acquisition module is used to acquire multiple automated testing resources;

[0034] A domain name determination module is used to determine the domain name of the access application corresponding to each automated test resource based on each automated test resource;

[0035] A construction module is used to build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource;

[0036] A mapping relationship determination module is used to construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource;

[0037] The mapping database determination module is used to store and manage the automated test execution environment based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

[0038] A third aspect of the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the automated test resource execution method provided in the first aspect.

[0039] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the automated test resource execution method provided in the first aspect is implemented.

[0040] A fifth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the automated test resource execution method provided in the first aspect.

[0041] Compared with the existing technology, this application has the following beneficial effects:

[0042] This application includes obtaining automated test resources to be executed; determining the automated test execution environment corresponding to the automated test resources to be executed based on a mapping database; the mapping database includes a mapping relationship between multiple automated test resources and automated test execution environments; inputting the automated test execution address and database connection information in the automated test execution environment into an execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0043] This application achieves standardization and automation of test resource configuration by obtaining the automated test resources to be executed and intelligently matching them with the corresponding automated test execution environment based on a mapping database; the mapping database stores the correspondence between multiple automated test resources and execution environments, which can effectively support the rapid adaptation of large-scale scripts in different environments; further, the address and database connection information required for test execution are decoupled from the execution script and dynamically injected as independent parameters, avoiding the high maintenance cost and error-prone problems caused by hard coding in traditional methods; and finally generates the automated test resource execution results based on the current execution environment, which improves the test execution efficiency and accuracy, significantly reduces the configuration management burden brought by environment switching, enhances the flexibility and scalability of the automated test system, and improves the efficiency of automated test resource execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 A flowchart of an automated test resource execution method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of automated testing resources provided in an embodiment of the present application;

[0047] Figure 3 An application diagram of an automated test resource execution method provided in an embodiment of the present application;

[0048] Figure 4 This is a structural diagram of an automated test resource execution device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] As previously described, when switching environments or executing large numbers of scripts in batches, manual maintenance of the script's environment configuration information is required. Multiple copies of the automated test script for the same test logic are created, each with its own specific execution address for the test environment. During execution, the script is then selected based on the test environment. This leads to high maintenance costs and a high error rate. Misconfiguration of individual script addresses can easily lead to execution failures or distorted results, wasting significant manpower and time on troubleshooting and correction, resulting in low efficiency of automated test resource execution.

[0050] In view of the above problems, the present application provides an automated test resource execution method and related products, the method including: obtaining the automated test resources to be executed; determining the automated test execution environment corresponding to the automated test resources to be executed based on a mapping database; the mapping database includes a mapping relationship between multiple automated test resources and automated test execution environments; the automated test execution address and database connection information in the automated test execution environment are input into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0051] This application enables efficient and error-correctable management of the execution environment of automated test assets in a cloud-native environment. It allows for convenient and error-free specification of the execution environment during automated test execution, ensuring effective automated test execution while meeting the DevOps continuous delivery standard for automated test verification after automated deployment of continuous integration, testing, and pre-release pipelines. This application achieves standardized and automated management of the test resource configuration process by acquiring the automated test resources to be executed and intelligently identifying the automated test execution environment to which they are adapted based on a mapping database. The mapping database records the mapping relationships between multiple test resources and their corresponding execution environments, providing strong support for the flexible deployment of large-scale test scripts in different environments. Furthermore, the execution address and database connection information, originally fixed in the script, are decoupled and dynamically injected in a parameterized form, effectively avoiding the high maintenance complexity and high error rate associated with traditional hard-coded methods. This method not only improves the efficiency of test execution and the accuracy of results, but also significantly reduces the configuration management costs associated with environment changes, significantly enhancing the flexibility and scalability of the automated test system, and thus comprehensively improving the execution efficiency of automated test resources.

[0052] Explanation of professional terms related to this application:

[0053] Explanation of professional terms related to this application: Cloud Native: An approach to designing and building applications that leverages the advantages of cloud computing. Cloud-native applications are typically based on a microservices architecture and use containerization and orchestration platforms such as Kubernetes for rapid deployment, scalability, and management. These applications automatically adjust resources based on demand, ensuring high availability and resiliency, enabling efficient operation and continuous delivery in cloud environments.

[0054] Ingress: A key resource in Kubernetes, it manages external access to services within the cluster. It allows external traffic to enter the Kubernetes cluster and supports domain-name-based routing to route traffic to the appropriate service.

[0055] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0056] Figure 1An automated test resource execution method and related products provided in the embodiments of the present application, such as Figure 1 As shown, an automated test resource execution method includes:

[0057] S101: Obtaining automated test resources to be executed.

[0058] There are many ways to obtain the resources for automated testing to be executed, so this application does not limit the way to obtain the resources for automated testing to be executed, for example, a test task request initiated by a user or a test case identifier issued by a scheduling platform; extracting the corresponding automated testing resources from the test management platform according to the task number or script ID; Figure 2 A schematic diagram of the automated testing resources provided in the embodiment of the present application, such as Figure 2 As shown in the figure, with the implementation of cloud-native technologies in commercial banks, automated testing resources in cloud-native environments can include databases, container cloud clusters, and other resources. Namespaces can be queried in container cloud clusters, and namespaces include applications and ingresses. Data relationships also exist between applications and databases.

[0059] S102: Determine the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database.

[0060] The mapping database in this application includes a mapping relationship between multiple automated test resources and automated test execution environments. Therefore, according to the automated test resources to be executed, by querying the mapping database, the applicable execution environment can be automatically matched. For example, if the automated test resource to be executed is identified as "TC_Transfer_001", the mapping database determines that the test case should be run in the "performance test environment". After the automated test execution environment is ready and deployed, it together forms an environment that can provide services, and its external service address is the execution address required for the automated test.

[0061] In commercial bank testing activities, automated test execution environments are established based on testing requirements. Therefore, in this application, the automated test execution environment is uniquely defined by the application system + the test environment's purpose. Because the automated test execution environment includes at least the application system, purpose, maintainer, and automated test execution address, determining the automated test execution environment corresponding to the automated test resource to be executed can also determine the application system, purpose, maintainer, and automated test execution address corresponding to the automated test resource to be executed.

[0062] This application can complete the precise matching of test resources and execution environment without manual intervention; it simplifies the environment switching process by replacing decentralized script configuration with centralized mapping management; it ensures that the same test resources are always executed in the corresponding environment to avoid result deviations caused by environment mismatch; cross-environment execution can be achieved by simply modifying the mapping relationship to adapt to testing requirements at different stages; when adding new test resources or execution environments, only the mapping table needs to be maintained, and no changes to the script logic are involved.

[0063] S103: Input the automated test execution address and database connection information in the automated test execution environment into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0064] The target execution environment's execution address (e.g., service IP address, port) and database connection information (e.g., URL, username, password) are obtained from the automated test execution environment. These parameters are injected into the test script as variables, replacing the traditional hard-coding method. During actual script execution, the injected parameters are used to complete the test actions and obtain the final test execution results (e.g., success / failure, logs, screenshots, performance metrics, etc.). For example, a test script that originally contained the fixed address http: / / dev.testbank.com is now dynamically obtained from the environment configuration center, and env.TEST_URL is replaced with http: / / testbank-perf.com during execution.

[0065] This application extracts the configuration information originally solidified in the script to avoid maintenance costs caused by frequent script modifications; the same script can be flexibly executed in different environments through parameter injection without repeated writing; dynamic loading of real environment configurations to ensure that the test execution results accurately reflect the target environment status; centralized parameter management to avoid spelling errors, path errors and other problems caused by manual script modification; adapt to the CI / CD process to achieve full-process automated execution and feedback of test tasks; reduce the number of invalid executions due to configuration problems, and improve the overall test success rate and coverage.

[0066] The above is the main technical solution of this application. Now we will introduce the expansion and implementation of the main technical solution of this application. The details are as follows:

[0067] Commercial banks have a vast number of application systems, and the relationships between them are complex. Furthermore, each application system often applies for and deploys multiple test environments to meet various testing requirements for itself and its associated systems, such as development and debugging, functional testing, performance testing, and version verification. As a result, the number of test environments involved in automated testing is several times, or even dozens of times, the number of application systems in commercial banks. Therefore, constructing a mapping database to manage automated test execution environments can further improve the efficiency of automated test resource execution. This application provides an optional embodiment for constructing a mapping database:

[0068] Get multiple automated testing resources.

[0069] Determine the domain name of the access application corresponding to each automated test resource based on each automated test resource.

[0070] Automated testing resources mainly include databases and container clouds. Container cloud resources can query their Ingress configurations on the container cloud platform based on their clusters and assigned namespaces, and determine the domain name of the accessible application corresponding to the automated testing resources based on the Ingress configurations. As an optional embodiment, the container source resources in each automated testing resource are used to query the Ingress configuration corresponding to each automated testing resource based on its cluster and assigned namespace; and the domain name of the accessible application corresponding to each automated testing resource is determined based on the Ingress configuration corresponding to each automated testing resource.

[0071] Build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource.

[0072] Each automated test resource is usually used to test a specific business function, corresponding to one or more access targets (such as interface services, front-end pages, etc.); parse the access targets in the test resources (such as the domain name in the URL) to identify the application system on which the test resource depends; automatically build the corresponding test execution environment information based on the domain name of the application system, including service address, database connection, authentication information, etc.

[0073] There is no need to manually configure the execution environment, reducing preparation time. The domain name identification mechanism ensures that test resources always run in the correct environment. Different application systems can automatically identify and build corresponding environments to adapt to complex business architectures, avoiding test failures caused by environmental configuration errors.

[0074] Construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource.

[0075] Establish a one-to-one or many-to-one mapping relationship between "test resource identifiers" and "execution environment identifiers." This mapping relationship can be statically preset or dynamically generated and can be further categorized and managed through tags, namespaces, system modules, and other methods. Automatically identify the corresponding execution environment based on the test resource, improving execution efficiency. Structuring the mapping relationship facilitates batch import, update, and query operations. When adding new test resources or execution environments, only the mapping table needs to be maintained, without requiring code modifications. Clearly record the execution path of each test resource to facilitate subsequent auditing and troubleshooting.

[0076] The automated test execution environment is stored and managed based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

[0077] The above mapping relationships are persistently stored in the database to form a structured "mapping database"; it supports retrieval by dimensions such as test resources, execution environment, and system modules; it can be integrated into the test platform, scheduling system, and CI / CD process and used as a standard data source.

[0078] The above embodiment describes the method for constructing a mapping database in detail. However, in order to ensure the validity of the mapping database, the mapping database should be tested in real time. This application also provides an optional embodiment of a method for testing the mapping database:

[0079] The mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database is detected to determine a detection result.

[0080] Based on the cluster and namespace where the container cloud resource resides, the container cloud platform queries its Ingress configuration, obtains the domain name that can access the application, and compares it with the execution address configuration. If the comparison fails, the corresponding automated test environment maintainer is notified by email or other means to confirm the correctness of the execution address configuration.

[0081] This application also provides a specific embodiment:

[0082] Get the automated test resources to be tested.

[0083] Obtain a collection of automated testing resources involved in the upcoming test task from the test scheduling platform, CI / CD pipeline, or test engine, such as test scripts and interface call paths.

[0084] Determine the access application domain name corresponding to the automated test resource to be tested.

[0085] If the mapping database contains a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, the automated test execution environment corresponding to the automated test resource to be detected and the target access application domain name are configured and compared to obtain a judgment result.

[0086] If the judgment result indicates that the comparison is successful, the detection result is successful and the comparison ends.

[0087] If the judgment result indicates that the comparison fails, the detection result is an incident and an error instruction is generated.

[0088] Query the mapping database to see if there is a record that matches the currently accessed domain name; if so, obtain the execution environment parameters preset in the record (such as IP, port, database connection, etc.); compare the execution parameters used in the current test script with the standard parameters stored in the database; and output the comparison result (consistent / inconsistent).

[0089] If the mapping database does not contain a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, the mapping database is updated based on the automated test resource to be detected.

[0090] Support the rapid integration of new systems into the testing process; reduce the workload of manual maintenance of mapping tables; improve the system's adaptability and scalability; and achieve full life cycle management of test resource configuration.

[0091] This application also provides a specific embodiment:

[0092] In the DevOps continuous delivery standard, continuous integration, testing, pre-release and other different purpose pipelines complete the deployment and automated testing verification of application images in different environments. Figure 3 This is a schematic diagram of an application of an automated test resource execution method provided in an embodiment of the present application, such as Figure 3, the automated test resources to be executed are pipeline types (such as continuous integration pipeline, test pipeline and pre-release pipeline); determine the clusters and namespaces of the cloud resources of the continuous integration pipeline, test pipeline and pre-release pipeline respectively; use the mapping data set to determine the deployment plug-in configuration of the continuous integration pipeline, test pipeline and pre-release pipeline based on the clusters and namespaces of the cloud resources of the continuous integration pipeline, test pipeline and pre-release pipeline (for example, the deployment plug-in configuration of the continuous integration pipeline is the cluster and namespace of the Dev environment container cloud resource; the deployment plug-in configuration of the test pipeline is the Test The cluster and namespace of the environment container cloud resources; the deployment plug-in configuration of the pre-release pipeline is the cluster and namespace of the PreProd environment container cloud resources); based on the deployment plug-in configuration of the continuous integration pipeline, test pipeline and pre-release pipeline, the automated test execution environment of the continuous integration pipeline, test pipeline and pre-release pipeline is determined (for example, the automated test plug-in execution environment information of the continuous integration pipeline selects Dev; the automated test plug-in execution environment information of the test pipeline selects Test; the automated test plug-in execution environment information of the pre-release pipeline selects PreProd).

[0093] This application establishes a one-to-one correspondence between the container cloud cluster and namespace of an automated test resource and its automated test execution address. After the pipeline deployment plug-in selects the target container cloud cluster and namespace for application deployment, its automated test plug-in automatically selects the corresponding automated test execution address.

[0094] This application can efficiently manage the automated test execution environment. The method of specifying the automated test execution environment during execution avoids the maintenance cost of the automated test script when the automated test execution environment changes and switches. At the same time, the practice of specifying the execution environment during execution can improve the effectiveness of automated test execution. The automatic correspondence method of the pipeline automated test execution address can ensure the consistency of the automated test execution address and the application system deployment address, thereby improving the effectiveness of automated test execution. The dynamic checking method of the automated test execution address can automatically check the correctness of the execution address configuration, promptly notify the corresponding automated test environment maintainer, and reduce the cost of manual maintenance.

[0095] Figure 4 This is a structural diagram of an automated test resource execution device provided in an embodiment of the present application, such as Figure 4 As shown, based on the automated test resource execution method provided in the previous embodiment, the present application also provides an automated test resource execution device including:

[0096] The first acquisition module is used to acquire the automated test resources to be executed.

[0097] The mapping module is used to determine the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database; the mapping database includes a mapping relationship between multiple automated test resources and automated test execution environments.

[0098] The execution module is used to input the automated test execution address and database connection information in the automated test execution environment into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

[0099] As an optional embodiment, the device further includes:

[0100] The second acquisition module is used to acquire multiple automated testing resources.

[0101] The domain name determination module is used to determine the domain name of the access application corresponding to each automated test resource based on each automated test resource.

[0102] The construction module is used to build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource.

[0103] The mapping relationship determination module is used to construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource.

[0104] The mapping database determination module is used to store and manage the automated test execution environment based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

[0105] As an optional embodiment, the domain name determination module specifically includes:

[0106] The Ingress configuration determination unit is used to use the container source resources in each automated test resource to query the Ingress configuration corresponding to each automated test resource according to the cluster and the allocated namespace.

[0107] The domain name determination unit is used to determine the domain name of the access application corresponding to each automated testing resource based on the Ingress configuration corresponding to each automated testing resource.

[0108] As an optional embodiment, the device further includes:

[0109] The detection module is used to detect the mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database and determine the detection result.

[0110] As an optional embodiment, the detection module specifically includes:

[0111] The acquisition unit is used to acquire the automated test resources to be detected and determine the access application domain name corresponding to the automated test resources to be detected.

[0112] The judgment unit is used to compare the configurations of the automated test resource to be detected and the automated test execution environment corresponding to the target access application domain name if there is a target access application domain name consistent with the access application domain name corresponding to the automated test resource to be detected in the mapping database to obtain a judgment result.

[0113] The first determination unit for the judgment result is used to determine that the detection result is successful and end the comparison if the judgment result indicates that the comparison is successful.

[0114] The second determination unit for the judgment result is used to determine that the detection result is an incident and generate an error instruction if the judgment result indicates that the comparison fails.

[0115] The third determination unit for judging the result is configured to update the mapping database based on the automated test resource to be detected if the mapping database does not contain a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected.

[0116] An embodiment of the present application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an automated test resource execution method.

[0117] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, an automated test resource execution method is implemented.

[0118] An embodiment of the present application provides a computer program product, including a computer program, which implements an automated test resource execution method when executed by a processor.

[0119] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and equipment embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components indicated as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0120] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for executing automated test resources, characterized in that: The automated test resource execution method includes: Get the automated test resources to be executed; Determining the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database; the mapping database includes mapping relationships between multiple automated test resources and automated test execution environments; The automated test execution address and database connection information in the automated test execution environment are input into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

2. The automated test resource execution method according to claim 1, wherein: The method further comprises: Obtain multiple automated testing resources; Determine the domain name of the access application corresponding to each automated test resource based on each automated test resource; Build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource; Construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource; The automated test execution environment is stored and managed based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

3. The automated test resource execution method according to claim 2, wherein: Determining the domain name of the access application corresponding to each automated test resource based on each automated test resource specifically includes: Use the container source resources in each automated test resource to query the Ingress configuration corresponding to each automated test resource based on the cluster and assigned namespace; Determine the domain name of the access application corresponding to each automated test resource based on the Ingress configuration corresponding to each automated test resource.

4. The automated test resource execution method according to claim 1, wherein: The method further comprises: The mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database is detected to determine a detection result.

5. The automated test resource execution method according to claim 4, characterized in that: The detecting of the mapping relationship between the plurality of automated test resources and the automated test execution environment in the mapping database and determining the detection result specifically includes: Obtain the automated testing resources to be tested; Determine the access application domain name corresponding to the automated test resource to be tested; If the mapping database contains a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, then the automated test execution environment corresponding to the automated test resource to be detected and the target access application domain name are compared to obtain a judgment result; If the judgment result indicates that the comparison is successful, the detection result is successful and the comparison ends; If the judgment result indicates that the comparison fails, the detection result is an incident and an error instruction is generated; If the mapping database does not contain a target access application domain name that is consistent with the access application domain name corresponding to the automated test resource to be detected, the mapping database is updated based on the automated test resource to be detected.

6. An automated test resource execution device, characterized in that: The automated test resource execution device includes: The first acquisition module is used to obtain the automated test resources to be executed; A mapping module, configured to determine the automated test execution environment corresponding to the automated test resource to be executed based on a mapping database; the mapping database includes mapping relationships between multiple automated test resources and automated test execution environments; The execution module is used to input the automated test execution address and database connection information in the automated test execution environment into the execution script to obtain the execution result of the automated test resources based on the automated test execution environment; the automated test execution address and database connection information in the execution script are in a separated state.

7. The automated test resource execution device according to claim 6, characterized in that: The device further comprises: The second acquisition module is used to acquire multiple automated testing resources; A domain name determination module is used to determine the domain name of the access application corresponding to each automated test resource based on each automated test resource; A construction module is used to build an automated test execution environment corresponding to each automated test resource based on the domain name of the access application corresponding to each automated test resource; A mapping relationship determination module is used to construct a mapping relationship between each automated test execution environment and the automated test execution environment corresponding to each automated test resource; The mapping database determination module is used to store and manage the automated test execution environment based on the mapping relationship between the automated test execution environment and the automated test resources to obtain a mapping database.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the automated test resource execution method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the automated test resource execution method according to any one of claims 1 to 5 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the automated test resource execution method according to any one of claims 1 to 5 is implemented.