Test environment construction method and device, equipment, storage medium and product

By dynamically determining the resource configuration information and construction process of the test environment, the problem of lack of flexibility and high maintenance costs in the construction methods of traditional test environments is solved, and efficient and flexible construction and maintenance of the test environment is achieved.

CN119645885APending Publication Date: 2025-03-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411820270.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The traditional way of building test environments lacks flexibility, has a long construction cycle, poor flexibility, and high maintenance costs. It is impossible to dynamically adjust the test environment according to product needs.

Method used

By responding to the test environment construction request, obtaining product development code, determining product testing requirements, determining environmental resource configuration information based on the requirements, building a test environment, and environmental verification of the test environment based on the product development code, storing the relationship between the product development code and the environmental resource configuration information of the test environment.

Benefits of technology

It improves the efficiency and flexibility of the test environment construction, can quickly respond to the requirements of the test environment construction, reduces the maintenance costs of different versions of the test environment, and provides convenience for subsequent multiple creations of the same test environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645885A_ABST
    Figure CN119645885A_ABST
Patent Text Reader

Abstract

The invention discloses a test environment construction method, device and equipment, a storage medium and a product, which can be applied to the field of financial science and technology. The method comprises the following steps: in response to a test environment construction request, obtaining a product development code, and determining a product test demand; determining environment resource configuration information according to a product test requirement; constructing a test environment according to the environment resource configuration information; and performing environment verification on the test environment based on the product development code, and after the verification is passed, storing an association relationship between the product development code and the environment resource configuration information of the test environment for calling. According to the technical scheme of the embodiment of the invention, the construction efficiency and the construction flexibility of the test environment are improved, and meanwhile, the maintenance cost of different versions of test environments is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention can be applied to the field of financial technology, and in particular relates to a test environment construction method, device, equipment, storage medium and product. Background Art

[0002] With the continuous development and promotion of business in various fields such as big data, artificial intelligence and blockchain, the iteration speed of software development has also increased, and software products have become more diverse and complex. In order to ensure software quality and user experience during testing, the configuration and management of the test environment is crucial.

[0003] However, the traditional way of building a test environment lacks flexibility. For example, a fixed test environment is built for product applications in different months. The basic software and hardware resources of each test environment are basically the same, and cannot be dynamically adjusted according to product requirements. When faced with changes in requirements, the test environment construction process has problems such as long construction cycle, poor flexibility and high maintenance cost. Summary of the invention

[0004] The present invention provides a test environment construction method, device, equipment, storage medium and product to improve the test environment construction efficiency and construction flexibility, while reducing the maintenance cost of different versions of test environments.

[0005] According to one aspect of the present invention, a method for constructing a test environment is provided, the method comprising:

[0006] Respond to test environment build requests, obtain product development code, and determine product testing requirements;

[0007] Determine the environment resource configuration information according to the product testing requirements;

[0008] Constructing a test environment according to the environment resource configuration information;

[0009] The test environment is verified based on the product development code, and after the verification is passed, the association relationship between the product development code and the environmental resource configuration information of the test environment is stored for calling.

[0010] According to another aspect of the present invention, a test environment construction device is provided, the device comprising:

[0011] A test requirement determination module, used to obtain product development code and determine product test requirements in response to a test environment construction request;

[0012] A configuration information determination module, used to determine the environment resource configuration information according to the product testing requirements;

[0013] A test environment construction module, used to construct a test environment according to the environment resource configuration information;

[0014] The environment verification module is used to perform environment verification on the test environment based on the product development code, and after the verification is passed, store the association relationship between the product development code and the environment resource configuration information of the test environment for calling.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test environment construction method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test environment construction method described in any embodiment of the present invention when executed.

[0020] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the test environment construction method described above is implemented.

[0021] The technical solution of the embodiment of the present invention determines the environmental resource configuration information according to the product testing requirements; constructs the test environment according to the environmental resource configuration information; performs environmental verification on the test environment based on the product development code, and after the verification is passed, stores the association relationship between the product development code and the environmental resource configuration information of the test environment for calling. The above technical solution improves the efficiency of test environment construction by automatically generating environmental resource configuration information and constructing the test environment, and can quickly respond to the construction requirements of the test environment, thereby improving the flexibility of test environment creation. By storing the association relationship between the product development code and the environmental resource configuration information, the maintenance cost of different versions of the test environment is reduced, which facilitates the subsequent creation of multiple times of the same test environment.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 is a flowchart of a test environment construction method provided according to Embodiment 1 of the present invention;

[0025] Figure 2 is a flowchart of a test environment construction method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 is a flowchart of a test environment construction method provided in Embodiment 3 of the present invention;

[0027] Figure 4 is a schematic diagram of the structure of a test environment construction device provided according to a fourth embodiment of the present invention;

[0028] Figure 5 It is a structural schematic diagram of an electronic device for implementing the test environment construction method of an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1 This is a flow chart of a test environment construction method provided in the first embodiment of the present invention. This embodiment can be applied to the situation of building a test environment for product applications in the field of financial technology. The method can be executed by a test environment construction device, which can be implemented in the form of hardware and / or software, and the test environment construction device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S110 . In response to the test environment construction request, obtain product development code and determine product testing requirements.

[0034] Among them, the test environment construction request can be initiated by relevant personnel such as testers or developers who have environment construction requirements and permissions, or the test environment construction request can be automatically initiated when the developer completes product development. This implementation does not restrict this.

[0035] The product development code may be a program code generated during the development and iterative update of the product's functional modules. For example, in the financial field, during the development of the application module of a mobile banking product, as user demand increases, new product functional modules are continuously developed and old product functional modules are continuously iteratively updated. The product development code is the program code generated during the development and update of the application functional modules of the mobile banking product.

[0036] Among them, product testing requirements can refer to the key resources and conditions that need to be paid attention to during the testing process that are pre-defined and clarified before product testing. Specifically, they can include functional testing requirements, performance testing requirements, and network environment testing requirements.

[0037] Exemplarily, relevant technical personnel may generate a test environment construction request based on the product development code and the product test requirement, and thereby obtain the product development code and the product test requirement by parsing the test environment construction request.

[0038] It should be noted that during the product development process, a large amount of product development code may be generated. For example, in the financial field, a large number of financial products are involved, and the functional modules of different financial products have different iterative update requirements, which generates a large number of product test environment construction requirements. Therefore, relevant developers or testers can upload the generated product development code and product test requirements to the demand management platform in advance, and the demand management platform will generate unique identifiers for the product development code and product test requirements for subsequent calls and test environment creation.

[0039] In an optional embodiment, in response to a test environment construction request, a product development code is obtained and a product testing requirement is determined, including: request parsing the test environment construction request to obtain a product development code and a product requirement number; obtaining a product requirement document from a requirement management platform according to the product requirement number; document parsing the product requirement document to generate a number of user stories; story parsing each user story to determine the product testing requirement.

[0040] Specifically, the test environment construction request is parsed to obtain the product development code and product requirement number. The product requirement number is used to characterize the uniqueness of the product test requirement. According to the product requirement number, the product requirement document is obtained from the requirement management platform. It should be noted that the product requirement document and the product requirement number are associated and stored in the requirement management platform, and the product requirement numbers corresponding to different product requirement documents are different and unique.

[0041] Among them, the product requirement document stores the product function module development business scenarios, business logic and technical design. For example, the technical design may include architecture design and interface design.

[0042] Parse the product requirement document to generate several user stories. User stories are user-centric functional descriptions that are used to refine and decompose a large and complete functional requirement, thereby clearly defining the specific requirements and implementation details of each product functional module. Parse each user story, and summarize the story analysis results to obtain product testing requirements.

[0043] Optionally, product testing requirements can include multiple indicator requirements, such as front-end indicators and back-end indicators. If some indicators are not clearly stated in the user story, you can refer to the common settings in the production environment and automatically give reasonable default values. In addition, users can customize certain indicators and adjust and optimize them according to specific business development needs.

[0044] The above technical solution uniformly manages a large number of product requirements through the requirement management platform, and obtains product requirement documents from the requirement management platform when there is a requirement to build a test environment. By parsing the product requirement documents into the form of user stories, the parsed product testing requirements can be user-centered functional description requirements. User stories are relatively concise and can focus on describing a specific function or user need, which is more helpful for understanding product testing requirements, thereby ensuring that the generated product testing requirements are more complete and clear.

[0045] S120. Determine environmental resource configuration information according to product testing requirements.

[0046] Among them, product testing requirements may include front-end testing requirements, back-end testing requirements and network testing requirements. Front-end testing requirements may include testing requirements such as loading speed, page size, number of requests and rendering time; back-end testing requirements may include response time, throughput, number of concurrent users, TPS (Transactions Per Second), QPS (Queries Per Second), I / O (Input / Output) load, CPU (Central Processing Unit) load, memory usage and network bandwidth, etc.; network testing requirements may include DNS (Domain Name System) time, connection time and transmission time, etc.

[0047] The environment resource configuration information includes software resource configuration information and hardware resource configuration information. For example, the software resource configuration information may include configuration information of the operating system, database management system, middleware, and server software; the hardware resource configuration information may include configuration information of the CPU, memory, storage, and network.

[0048] Exemplarily, the mapping relationship between the initial test requirements and the initial resource configuration can be obtained, for example, the CPU load in the initial test requirements is a and the memory usage is b, and the corresponding initial resource configuration requires m CPUs and n memory space, etc. Based on the pre-built mapping relationship, the required environmental resource configuration information corresponding to the product test requirements is determined.

[0049] It is understandable that in order to further improve the accuracy and efficiency of determining environmental resource configuration information, the environmental resource configuration information can also be generated by using model prediction.

[0050] In an optional embodiment, determining environmental resource configuration information according to product testing requirements includes: inputting the product testing requirements into a pre-trained environmental resource configuration model to obtain environmental resource configuration information output by the model.

[0051] Among them, the environmental resource configuration model is used to predict environmental resource configuration information, and can be generated by pre-training of relevant technical personnel.

[0052] Optionally, the model training method of the environment resource configuration model is as follows:

[0053] Obtain historical product testing requirements under historical time periods, and historical environmental resource configuration information corresponding to the historical product testing requirements; input the historical product resource requirements and their corresponding historical environmental resource configuration information into a pre-built network model to obtain predicted environmental resource configuration information output by the model; perform model training on the network model based on the historical environmental resource configuration information and predicted environmental resource configuration information of the historical product testing requirements until the preset model training end conditions are met to obtain an environmental resource configuration model.

[0054] The historical environment resource configuration information is the standard environment resource configuration information of the historical product testing requirements. The network model may be a FFN (Feedforward Neural Network) model; the model training end condition may be that the loss value reaches a preset loss threshold, or that the loss value tends to be stable, or that the model iteration number reaches a set iteration number threshold, etc., which is not limited in this embodiment.

[0055] Specifically, the historical product resource requirements and their corresponding historical environment resource configuration information are input into the pre-built network model, and the network model performs feature learning based on the historical environment resource configuration information and outputs the predicted environment resource configuration information; based on the historical environment resource configuration information and predicted environment resource configuration information of the historical product test requirements, the loss value is determined based on the preset loss function. If the loss value reaches the preset loss threshold or the loss value tends to be stable, the training is terminated to obtain a trained environment resource configuration model.

[0056] The above optional embodiment improves the generation accuracy of the environmental resource configuration model by training the preset network model based on the historical product testing requirements in the historical time period and the corresponding historical environmental resource configuration information, thereby further improving the prediction accuracy of the environmental resource configuration information.

[0057] By adopting the trained environmental resource configuration model to predict the environmental resource configuration information for product testing requirements, on the one hand, the efficiency of generating environmental resource configuration information is improved, and on the other hand, the accuracy of determining the environmental resource configuration information is improved. In this process, human participation is reduced, the influence of human subjective initiative on environmental resource configuration is reduced, and the waste of human resources is effectively avoided.

[0058] S130. Construct a test environment according to the environment resource configuration information.

[0059] Specifically, according to the environmental resource configuration information, complete the hardware deployment and software installation and configuration, as well as the network environment settings, to build a test environment.

[0060] S140: Perform environmental verification on the test environment based on the product development code, and after the verification passes, store the association relationship between the product development code and the environmental resource configuration information of the test environment for calling.

[0061] Specifically, the product development code is executed in the constructed test environment, and the environment is verified during the execution process to verify whether the test environment meets the performance indicators of various dimensions, such as whether the CPU is overloaded, whether the network delay exceeds the set delay time, and whether the response time has timed out. If the environmental verification of the test environment passes, the association between the product development code and the environmental resource configuration information of the test environment is stored. If there is a need to create the test environment in the future, the test environment can be created directly based on the environmental resource configuration information, and there is no need to analyze the product testing requirements, thereby improving the efficiency of environment construction.

[0062] The technical solution of the embodiment of the present invention determines the environmental resource configuration information according to the product testing requirements; constructs the test environment according to the environmental resource configuration information; performs environmental verification on the test environment based on the product development code, and after the verification is passed, stores the association relationship between the product development code and the environmental resource configuration information of the test environment for calling. The above technical solution improves the efficiency of test environment construction by automatically generating environmental resource configuration information and constructing the test environment, and can quickly respond to the construction requirements of the test environment, thereby improving the flexibility of test environment creation. By storing the association relationship between the product development code and the environmental resource configuration information, the maintenance cost of different versions of the test environment is reduced, which facilitates the subsequent creation of multiple times of the same test environment.

[0063] Embodiment 2

[0064] Figure 2 This is a flow chart of a test environment construction method provided in Embodiment 2 of the present invention. This embodiment is optimized and improved on the basis of the above-mentioned technical solutions.

[0065] Further, the step of "performing environmental verification on the test environment based on the product development code, and storing the association between the product development code and the environmental resource configuration information of the test environment after the verification is passed" is refined into "creating several environmental test cases of different test types; performing environmental testing on the test environment based on the corresponding environmental test cases according to the product development code, and obtaining the use case test results corresponding to each environmental test case; performing environmental verification based on the test results of each use case, and storing the association between the product development code and the environmental resource configuration information of the test environment after the verification is passed." to improve the environmental verification method for the test environment.

[0066] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. Figure 2 As shown, the method comprises the following specific steps:

[0067] S210 . In response to the test environment construction request, obtain product development code and determine product testing requirements.

[0068] S220. Determine environmental resource configuration information according to product testing requirements.

[0069] S230. Construct a test environment according to the environment resource configuration information.

[0070] S240. Create several environmental test cases of different test types.

[0071] Specifically, environmental test cases of different test types may include entry test cases and smoke test cases, etc.

[0072] Among them, the entry test case can refer to the verification of whether the product function has the basic conditions for continuing testing before the test life cycle of the software system or application begins. The goal of the entry test is to ensure that the test environment, test conditions and basic functions are ready to support subsequent more in-depth testing.

[0073] Among them, smoke test cases can be used to quickly verify whether a new version of the build has basic usability. Smoke testing is a preliminary check of the new version to confirm whether the most important functions work properly. Its purpose is to discover the most basic serious defects and avoid putting versions with major problems into further detailed testing.

[0074] S250. According to the product development code and based on the corresponding environmental test cases, an environmental test is performed on the test environment to obtain the test case test results corresponding to each environmental test case.

[0075] In the constructed test environment, the product development code is executed, and based on the corresponding environment test cases, the test environment is tested to obtain the test case test results corresponding to each environment test case. For example, the test case test results may include performance indicators in various dimensions.

[0076] S260: Perform environmental verification based on the test results of each use case, and after the verification is passed, store the association between the product development code and the environmental resource configuration information of the test environment for calling.

[0077] If the performance indicators of various dimensions, such as concurrency, response time, throughput, memory usage and CPU utilization, meet the corresponding parameter values ​​given in the product requirement test requirements, the environmental verification of the test environment can be considered to have passed; otherwise, the environmental verification of the test environment can be considered to have failed.

[0078] If the environmental verification of the test environment passes, the association relationship between the product development code and the environmental resource configuration information of the test environment is stored for calling.

[0079] Optionally, after performing environmental verification based on the test results of each use case, it also includes: if the verification fails, updating the environmental resource configuration information according to the test results of each use case; and storing the association relationship between the product development code and the updated environmental resource configuration information of the test environment.

[0080] Specifically, the environment resource configuration information can be adjusted according to the performance indicators that failed in the use case test results. For example, if the CPU utilization exceeds the preset utilization threshold, the number of CPUs in the environment resource configuration information can be adjusted to meet the demand and obtain the updated environment resource configuration information. The association relationship between the product development code and the updated environment resource configuration information of the test environment is stored.

[0081] By updating the environment resource configuration information according to the use case test results, accurate configuration of environment resources is achieved, thereby improving the accuracy of test environment creation, realizing dynamic adjustment of environment resource configuration information, reducing the probability of human error, and improving the stability and reliability of the test environment.

[0082] The technical solution of this embodiment creates several environmental test cases of different test types, and performs environmental testing on the test environment based on the product development code and the corresponding environmental test cases, obtains the test case test results corresponding to each environmental test case, performs environmental verification based on the test results of each case, and after the verification is passed, stores the association between the product development code and the environmental resource configuration information of the test environment, thereby realizing automated testing and verification of the test environment. During the testing process, multiple types of environmental test cases are combined to achieve comprehensiveness and completeness of the testing process, improve the accuracy of the test and verification results, and thus improve the accuracy of the test environment creation.

[0083] Embodiment 3

[0084] Figure 3 This is a flow chart of a test environment construction method provided in Embodiment 3 of the present invention. This embodiment provides a preferred example based on the above embodiments.

[0085] like Figure 3 As shown, the specific execution steps are as follows:

[0086] S31. Parse the test environment construction request to obtain a product development code and a product requirement number.

[0087] S32. Input the product testing requirements into the pre-trained environment resource configuration model to obtain the environment resource configuration information output by the model.

[0088] Among them, product testing requirements include front-end testing requirements, back-end testing requirements and network testing requirements; environmental resource configuration information includes software resource configuration information and hardware resource configuration information.

[0089] Among them, the model training method of the environmental resource configuration model is as follows:

[0090] Obtain historical product testing requirements under historical time periods, and historical environmental resource configuration information corresponding to the historical product testing requirements; input the historical product resource requirements and their corresponding historical environmental resource configuration information into a pre-built network model to obtain predicted environmental resource configuration information output by the model; perform model training on the network model based on the historical environmental resource configuration information and predicted environmental resource configuration information of the historical product testing requirements until the preset model training end conditions are met to obtain an environmental resource configuration model.

[0091] S33. Parse the product requirement document and generate several user stories.

[0092] S34. Analyze each user story and determine product testing requirements.

[0093] S35. Determine the environmental resource configuration information according to product testing requirements.

[0094] S36. Build a test environment based on the environmental resource configuration information.

[0095] S37. Create several environmental test cases of different test types.

[0096] S38. According to the product development code and based on the corresponding environmental test cases, an environmental test is performed on the test environment to obtain the test case test results corresponding to each environmental test case.

[0097] S39. Perform environmental verification based on the test results of each use case;

[0098] S310a: If the verification is successful, the association relationship between the product development code and the environmental resource configuration information of the test environment is stored.

[0099] S310b. If the verification fails, the environment resource configuration information is updated according to the test results of each use case, and the association relationship between the product development code and the updated environment resource configuration information of the test environment is stored.

[0100] The technical solution of this embodiment has the following advantages in terms of resource utilization, efficiency and maintenance cost:

[0101] 1) Resource utilization: Flexibly allocate and release resources according to actual needs, which can not only release unnecessary resources for other purposes, but also quickly increase resources to meet test requirements. This greatly improves resource utilization efficiency and avoids waste of resources.

[0102] 2) Flexibility and scalability: Through automation, it can quickly respond to changes in testing requirements and adapt to project changes and demand growth more quickly.

[0103] 3) Cost control: Automatically adjust resource allocation, shorten the test cycle, reduce time costs, and dynamically use resources to avoid unnecessary hardware and software configurations, reducing payment costs.

[0104] 4) Simplified management and version consistency: Automated configuration management and version control can reduce human errors and improve the stability and reliability of the environment. On the other hand, it can ensure that the test environment is consistent with the production environment, improving the accuracy and reliability of the test.

[0105] Embodiment 4

[0106] Figure 4 A schematic diagram of the structure of a test environment construction device provided in the fourth embodiment of the present invention. A test environment construction device provided in the embodiment of the present invention can be applied to the situation of building a test environment for product applications in the field of financial technology. The test environment construction device can be implemented in the form of hardware and / or software, such as Figure 4 As shown, the device specifically includes: a test requirement determination module 401, a configuration information determination module 402, a test environment construction module 403 and an environment verification module 404. Among them,

[0107] The test requirement determination module 401 is used to obtain product development code and determine product test requirements in response to a test environment construction request;

[0108] Configuration information determination module 402, used to determine environment resource configuration information according to the product testing requirements;

[0109] A test environment construction module 403 is used to construct a test environment according to the environment resource configuration information;

[0110] The environment verification module 404 is used to perform environment verification on the test environment based on the product development code, and after the verification is passed, store the association relationship between the product development code and the environment resource configuration information of the test environment for calling.

[0111] The technical solution of the embodiment of the present invention determines the environmental resource configuration information according to the product testing requirements; constructs the test environment according to the environmental resource configuration information; performs environmental verification on the test environment based on the product development code, and after the verification is passed, stores the association relationship between the product development code and the environmental resource configuration information of the test environment for calling. The above technical solution improves the efficiency of test environment construction by automatically generating environmental resource configuration information and constructing the test environment, and can quickly respond to the construction requirements of the test environment, thereby improving the flexibility of test environment creation. By storing the association relationship between the product development code and the environmental resource configuration information, the maintenance cost of different versions of the test environment is reduced, which facilitates the subsequent creation of multiple times of the same test environment.

[0112] Optionally, the test requirement determination module 401 is specifically configured to:

[0113] Parsing the test environment building request to obtain a product development code and a product requirement number;

[0114] According to the product requirement number, obtain the product requirement document from the requirement management platform;

[0115] Parse the product requirement document to generate several user stories;

[0116] Perform story analysis on each user story to determine product testing requirements.

[0117] Optionally, the configuration information determination module 402 is specifically configured to:

[0118] Inputting the product test requirements into a pre-trained environment resource configuration model to obtain environment resource configuration information output by the model;

[0119] Among them, the product testing requirements include front-end testing requirements, back-end testing requirements and network testing requirements; the environmental resource configuration information includes software resource configuration information and hardware resource configuration information.

[0120] Optionally, the model training method of the environment resource configuration model is as follows:

[0121] Obtain historical product testing requirements in a historical time period, and historical environment resource configuration information corresponding to the historical product testing requirements;

[0122] Inputting the historical product resource demand and its corresponding historical environmental resource configuration information into a pre-built network model to obtain the predicted environmental resource configuration information output by the model;

[0123] According to the historical environment resource configuration information and the predicted environment resource configuration information of the historical product testing requirements, the network model is trained until a preset model training end condition is met to obtain an environment resource configuration model.

[0124] Optionally, the environment verification module 404 includes:

[0125] A test case creation unit, used to create several environmental test cases of different test types;

[0126] An environment testing unit, used to perform environment testing on the test environment according to the product development code and based on corresponding environment testing cases, and obtain test case testing results corresponding to each of the environment testing cases;

[0127] The environment verification unit is used to perform environment verification based on the test results of each use case, and after the verification is passed, store the association relationship between the product development code and the environment resource configuration information of the test environment.

[0128] Optionally, the environment verification module 404 further includes:

[0129] A configuration information updating unit, configured to update the environment resource configuration information according to the test results of each of the use cases after the environment verification is performed based on the test results of each of the use cases, if the verification fails;

[0130] The association relationship storage unit is used to store the association relationship between the product development code and the updated environmental resource configuration information of the test environment.

[0131] The test environment construction device provided in the embodiment of the present invention can execute the test environment construction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0132] Embodiment 5

[0133] Figure 5A schematic diagram of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0134] like Figure 5 As shown, the electronic device 50 includes at least one processor 51, and a memory connected to the at least one processor 51 in communication, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 to the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0135] A number of components in the electronic device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0136] The processor 51 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as a test environment construction method.

[0137] In some embodiments, the test environment construction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the test environment construction method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to execute the test environment construction method in any other appropriate manner (e.g., by means of firmware).

[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0140] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0141] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0142] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0143] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A test environment construction method, characterized in that: include: Respond to test environment build requests, obtain product development code, and determine product testing requirements; Determine the environment resource configuration information according to the product testing requirements; Constructing a test environment according to the environment resource configuration information; The test environment is verified based on the product development code, and after the verification is passed, the association relationship between the product development code and the environmental resource configuration information of the test environment is stored for calling.

2. The method according to claim 1, characterized in that: The step of obtaining product development code and determining product testing requirements in response to the test environment construction request includes: Parsing the test environment building request to obtain a product development code and a product requirement number; According to the product requirement number, obtain the product requirement document from the requirement management platform; Parse the product requirement document to generate several user stories; Perform story analysis on each user story to determine product testing requirements.

3. The method according to claim 1, characterized in that: Determining the environment resource configuration information according to the product testing requirements includes: Inputting the product test requirements into a pre-trained environment resource configuration model to obtain environment resource configuration information output by the model; Among them, the product testing requirements include front-end testing requirements, back-end testing requirements and network testing requirements; the environmental resource configuration information includes software resource configuration information and hardware resource configuration information.

4. The method according to claim 3, characterized in that The model training method of the environmental resource configuration model is as follows: Obtain historical product testing requirements in a historical time period, and historical environment resource configuration information corresponding to the historical product testing requirements; Inputting the historical product resource demand and its corresponding historical environmental resource configuration information into a pre-built network model to obtain the predicted environmental resource configuration information output by the model; According to the historical environment resource configuration information and the predicted environment resource configuration information of the historical product testing requirements, the network model is trained until a preset model training end condition is met to obtain an environment resource configuration model.

5. The method according to claim 1, characterized in that The performing environmental verification on the test environment based on the product development code and storing the association relationship between the product development code and the environmental resource configuration information of the test environment after the verification passes, includes: Create several environmental test cases of different test types; According to the product development code, based on the corresponding environmental test cases, the test environment is tested to obtain the test case test results corresponding to each of the environmental test cases; Environmental verification is performed based on the test results of each of the use cases, and after the verification is passed, the association relationship between the product development code and the environmental resource configuration information of the test environment is stored.

6. The method according to claim 5, characterized in that After the environment verification is performed based on the test results of each of the use cases, the method further includes: If the verification fails, the environment resource configuration information is updated according to the test results of each of the use cases; The association relationship between the product development code and the updated environment resource configuration information of the test environment is stored.

7. A test environment construction device, characterized in that: include: A test requirement determination module, used to obtain product development code and determine product test requirements in response to a test environment construction request; A configuration information determination module, used to determine the environment resource configuration information according to the product testing requirements; A test environment construction module, used to construct a test environment according to the environment resource configuration information; The environment verification module is used to perform environment verification on the test environment based on the product development code, and after the verification is passed, store the association relationship between the product development code and the environment resource configuration information of the test environment for calling.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the test environment construction method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the test environment construction method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the test environment construction method according to any one of claims 1 to 6.