Test environment generation method and device and related product
By obtaining the version image in the mirror warehouse and automatically obtaining necessary information using the test environment generator, the time-consuming problem of building a test environment in the existing technology is solved, and a fast and efficient test environment generation is achieved.
Patent Information
- Application Number
- CN202311031062.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
It takes a long time to build a software testing environment in the existing technology, which makes it time-consuming to connect development, operation and maintenance and testers.
By obtaining the version image of the target software in the mirror repository and running multiple parallel independent processes using the test environment generator, we automatically obtain the test account information, test IP address range and test server, thereby generating the test environment.
It reduces the time to build a test environment, reduces the need for developers to connect with personnel in other departments, and improves the generation efficiency of the test environment.
Smart Images

Figure CN119493738A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for generating a test environment and related products. Background Art
[0002] With the continuous development of science and technology, the release of a mature software version often requires a lot of testing and verification. The testing environment of the software is different from the environment when the software is actually put into use. The construction of the software testing environment is often completed by multiple people with different responsibilities. For example, the software to be tested is provided by the developer. After the developer provides the software, the developer needs to connect with the operation and maintenance personnel. The operation and maintenance personnel apply for server resources and configure ports based on the software provided by the developer. When the operation and maintenance personnel complete their work, they need to connect with the testers, and finally the testers build the test environment based on the preparation of the operation and maintenance personnel and the software provided by the developers.
[0003] In the above example, when the staff of one department is setting up the test environment, the staff of other departments are idle for setting up the test environment. The existing setting up of the software test environment is very time-consuming. Therefore, how to reduce the time of setting up the software test environment has become a technical problem that those skilled in the art need to solve urgently. Summary of the invention
[0004] The embodiments of the present application provide a method, device and related products for generating a test environment, aiming to solve the problem that it takes a long time to build a software test environment in the prior art.
[0005] The first aspect of the present application provides a method for generating a test environment, comprising:
[0006] In response to a request to generate a test environment for a test version of the target software, obtaining a version image corresponding to the test version in an image repository, the image repository being used to store version images of different versions of the target software;
[0007] Creating a test environment generator, the test environment generator is used to run multiple parallel independent processes; the multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process;
[0008] By running the multiple parallel independent processes, the test account information, test IP address range and test server of the version image are obtained;
[0009] The test environment of the test version is generated by using the version image and the test account information, the test IP address range and the determined test server obtained by the test environment generator.
[0010] A second aspect of the present application provides a device for generating a test environment, including:
[0011] A version image acquisition module, configured to, in response to a request for generating a test environment for a test version of the target software, acquire a version image corresponding to the test version in an image repository, wherein the image repository is used to store version images of different versions of the target software;
[0012] A test environment generator creation module, used to create a test environment generator, the test environment generator is used to run multiple parallel independent processes; the multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process;
[0013] An information acquisition module, used to obtain the test account information, test IP address range and test server of the version image by running the multiple parallel independent processes;
[0014] The test environment generation module is used to generate the test environment of the test version by using the version image and the test account information obtained by the test environment generator, the test IP address range and the determined test server.
[0015] A third aspect of the present application provides a device for generating a test environment, the device comprising a processor and a memory:
[0016] The memory is used to store program code and transmit the program code to the processor;
[0017] The processor is used to execute the steps of the method for generating a test environment provided in the first aspect according to the instructions in the program code.
[0018] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the method for generating a test environment provided in the first aspect.
[0019] A fifth aspect of the present application provides a computer program product, including a computer program or instructions, which, when executed by a test environment generation device, implements the steps of the test environment generation method provided in the first aspect.
[0020] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0021] In the technical solution of the present application, the version images of different versions of the target software are stored in the image warehouse. When the test environment of the test version of the target software needs to be built, it is only necessary to obtain the version image corresponding to the test version in the image warehouse. For developers, it is only necessary to upload the version images of different versions of the target software to the image warehouse, without docking with any personnel, and directly upload the version images to the image warehouse, which reduces the time required for developers to dock. The method provided by the present application executes multiple parallel independent processes simultaneously through the test environment generator, and simultaneously obtains the test account information, the test IP address range and the determination of the test server through multiple parallel independent processes. The related tasks of building the test environment of the test version of the target software are automatically performed through multiple parallel independent processes, which can be completed without the participation of operation and maintenance personnel, further reducing the time required for personnel docking. The time for building the test environment of the test version of the target software is further reduced by multiple parallel independent processes carried out simultaneously. The test environment builder only needs to use the test environment generator to complete the construction of the test environment of the test version of the target software, without docking with other personnel, reducing the construction time of the test environment of the test version of the target software. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A scenario architecture diagram of a method for generating a test environment provided in an embodiment of the present application;
[0023] Figure 2 A flowchart of a method for generating a test environment provided in an embodiment of the present application;
[0024] Figure 3 A comparison diagram of a traditional environment creation process provided in an embodiment of the present application and an environment creation process provided in the present application;
[0025] Figure 4 Generate an architecture diagram for a test environment based on K8s architecture provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of a test environment provided for an embodiment of the present application;
[0027] Figure 6 A comparison diagram of the effects of a traditional test environment generation method provided in an embodiment of the present application and the test environment generation method provided in the present application;
[0028] Figure 7 A schematic diagram of the structure of a test environment generation device provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of the server in the embodiment of the present application;
[0030] Fig. 9 A schematic diagram of the structure of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In the related art, the release of a mature software needs to go through a lot of testing and verification. Here, taking games as an example, the release of a game requires testing of a large number of different game versions. For games, updates and patches to the game are also very frequent. Each update or each patch means a brand new version. Each version needs to be tested before it can be released, and testing requires a test environment. The test environment requires the collaborative construction of personnel from different departments. Developers provide the software version that needs to be tested; the operation and maintenance personnel prepare the servers and related information required to build the test environment based on the software version that needs to be tested provided by the developers; and finally the test environment builders build the test environment. The connection between personnel from multiple departments greatly reduces the time to build the test environment. In addition, the test environment builders obtain a large amount of information related to the construction of the test environment through the connection. This information takes a certain amount of time to understand. Only after the test environment builders fully understand this information can the test environment be built. This process further reduces the time to build the test environment.
[0032] In view of the above problems, a method, device and related products for generating a test environment are provided in this application, the purpose of which is to provide a test environment construction solution that can be completed without human interaction. This saves labor costs and reduces the time required to build a test environment. In the technical solution provided in this application,
[0033] First, several terms that may be involved in the embodiments of the present application are explained below.
[0034] Kubernetes: K8s for short, which is an abbreviation formed by replacing the eight characters in the middle of the name "ubernete". It is a containerized application used to manage multiple hosts. Kubernetes is a complete cluster, a group of working hosts, which are called nodes. Kubernetes has at least one working node. Kubernetes manages applications on multiple hosts through pods.
[0035] Pod: Pod is a concept of Kubernetes. Pod is the smallest deployable unit of Kubernetes. A pod can contain multiple containers, which are isolated from each other. These containers share resources such as network and hardware and run on the same node.
[0036] Rotational training: Rotational training is a way of providing services to peripheral devices. It mainly consists of the device providing the service sending out inquiries at regular intervals, asking each peripheral device in sequence whether it needs its service. If so, it will provide service. After the service is completed, it will ask the next peripheral device, and then repeat the cycle continuously.
[0037] The execution subject of the method for generating the test environment provided in the embodiment of the present application may be a terminal device. For example, the version image corresponding to the test version is obtained in the image warehouse on the terminal device. As an example, the terminal device may specifically include but is not limited to mobile phones, desktop computers, tablet computers, laptops, PDAs, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The execution subject of the method for generating the test environment provided in the embodiment of the present application may also be a server, that is, a test environment generator may be created on the server. The method for generating the test environment provided in the embodiment of the present application may also be executed collaboratively by a terminal device and a server. Therefore, in the embodiment of the present application, there is no limitation on the implementation subject for executing the technical solution of the present application.
[0038] Figure 1 The scenario architecture diagram of a test environment generation method is exemplarily shown, including a server and various terminal devices. Figure 1 The server shown can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. In addition, the server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0039] Figure 2 A flow chart of a method for generating a test environment provided in an embodiment of the present application. Figure 2 The method for generating the test environment shown includes:
[0040] S201: In response to a request to generate a test environment for a test version of a target software, a version image corresponding to the test version is obtained from an image repository.
[0041] The image warehouse is used to store version images of different versions of the target software. The version images in the image warehouse are generated based on different versions of the target software. In one possible implementation, the target software may be game A. Game A has game version 1 and game version 2. The terminal device may generate version image 1 based on game version 1 and version image 2 based on game version 2. The terminal device sends the generated version image 1 and version image 2 to the image warehouse for storage.
[0042] In a possible implementation, the image warehouse can also store version images of multiple different games. For example, there are game A and game B, game A has game version 1 and game version 2, game B has game version 1 and game version 2, and the terminal device can add a tag corresponding to the game to the game version when generating the version image, so as to distinguish different games and different versions. The terminal device can generate version image A1 based on game version 1 of game A, the terminal device can generate version image A2 based on game version 2 of game A, the terminal device can generate version image B1 based on game version 1 of game B, and the terminal device can generate version image B2 based on game version 2 of game B.
[0043] The terminal device can be connected to multiple target software development devices. In a possible implementation, development device A is a device for developing game A, and development device A can provide multiple different versions of game A. Development device B is a device for developing game B, and development device B can provide multiple different versions of game B. The terminal device can obtain different versions of different games by training development device A and development device B in rotation.
[0044] In a possible implementation, the version image can also be created by the game development device. Development device A is a device for developing game A. Game A has game version 1 and game version 2. Development device A generates version image 1 and version image 2 based on game version 1 and game version 2. Development device A is directly connected to the image warehouse, and can generate version images and upload them to the image warehouse without going through a terminal device.
[0045] The method provided in the present application can directly generate a version image through a development device and upload the version image to an image warehouse, thereby reducing the time for the development device to send different versions of software to the terminal device by directly generating the version image on the development device.
[0046] S202: Create a test environment generator.
[0047] The terminal device creates a test environment generator, which is used to run multiple parallel independent processes. The multiple parallel independent processes may include: a test account information acquisition process for a version image, a test IP address range acquisition process, a test server determination process, and other processes.
[0048] The terminal device creates a test environment generator. The test environment generator needs to run on a hardware environment. The terminal device can determine the hardware environment in which the test environment generator runs.
[0049] In a possible implementation, the terminal device can apply to the server for a dedicated hardware environment for the test environment generator, or divide the dedicated hardware environment for the environment generator on the terminal device. Create an empty test environment generator based on the hardware environment. The empty test environment generator includes multiple empty containers. The containers are used to run independent processes. One container runs one independent process. Multiple parallel independent processes are placed in different empty containers to obtain a test environment generator.
[0050] In one possible implementation, the test environment generator can be generated based on the Kubernetes architecture. After the terminal device determines the hardware environment for running the test environment generator, it generates a Kubernetes deployable unit pod. The pod can be used as a test environment generator. A pod can include one or more empty containers. In the method provided in the present application, the pod includes multiple empty containers, and an independent process runs in an empty container. The multiple containers in the Pod are isolated from each other, and the independent processes running between the containers will not affect each other. The independent processes running in multiple containers use the same hardware environment to process data. Put multiple parallel independent processes into different empty containers to obtain a test environment generator pod.
[0051] The method provided by the present application determines the hardware environment for running the test environment generator when creating the test environment generator. Multiple parallel independent processes are isolated through different containers. No matter how many parallel independent processes there are, the independent processes will not affect each other, which increases the stability of the test environment generator. At the same time, since the test environment generator runs based on the hardware environment, multiple parallel independent processes in the test environment generator also process data based on the same hardware environment, and multiple parallel independent processes share the same hardware resources. Compared with related technologies, the hardware resources used when generating the test environment are reduced.
[0052] S203: By running multiple parallel independent processes, the test account information, test IP address range and test server of the version image are obtained.
[0053] The terminal device can obtain information such as the test account information and the test IP address range of the version image through multiple parallel independent processes running in the test environment generator, and determine the test server used to test the version image.
[0054] In a possible implementation, the test environment generator can be generated based on the Kubernetes architecture, and the pod can be used as the test environment generator. The test account information of the version image is generally stored in the database corresponding to the development device. Since the development device of the target software will restrict the call to the information in the database, only the device with the call permission can call the information in the database corresponding to the development device. The development device is a node in the Kubernetes architecture, and the pod has the permission to call the information in the development device database. The test account information running in the container of the pod can call the test account information of the version image from the database corresponding to the development device. The test account information corresponds to the version image, and the test account information includes the test account, the test password, and the correspondence between the test account and the test password. For the sake of security and confidentiality, the test of the target software version image generally limits the test IP, and the terminal device obtains the test IP address range through the test IP address range acquisition process in the pod container.
[0055] The test server of the test version image is used to process test data. Test data is generated during the testing of the version image. Every piece of data generated during the testing of the version image is valuable. In order not to miss the test data, the terminal device needs to determine the test server that processes the test data when generating the test environment. In one possible implementation, the target software is game A, which is an operating game. The version that game A is using is version 1, and game A has a corresponding official server. Game A is about to launch version 2, which needs to be tested. Version 2 generally cannot use the official server to process test data. For this reason, a test server other than the official server can be determined through the test server determination process in the pod.
[0056] When a test environment needs to be generated, multiple independent processes in the test environment generator, such as the test account information acquisition process, the test IP address range acquisition process, and the test server determination process, can run simultaneously.
[0057] S204: Generate a test environment for the test version using the version image and the test account information, the test IP address range, and the determined test server obtained by the test environment generator.
[0058] The terminal device can use the test account information and test IP address range obtained by the version image and the test environment generator and the determined test server to generate a test environment for the test version.
[0059] In a possible implementation, the version image is run on the hardware environment, the terminal device uses the test account information as the account information for logging into the version image, uses the test IP address range as the IP address range for the test version image, and uses the test server as the server for processing test data to generate a test environment for the test version. The terminal device can test the version image on the generated test environment, and the data generated during the test is sent to the test server, which analyzes the test data to obtain the final test result of the version image.
[0060] In a possible implementation, since the hardware environment is a dedicated hardware environment for the applied test environment generator, the hardware environment may lack the plug-ins required to run the software, and the lack of plug-ins may cause the version image to be unable to run on the hardware environment. When creating the test environment, the terminal device can obtain the plug-in information used when running the version image, and use the plug-in information to generate a plug-in installation process, and multiple parallel independent processes include the plug-in installation process. When the version image cannot run, the plug-in installation process is used to install the plug-in required to run the version image, and after the plug-in installation process is installed, the version image is run.
[0061] The method provided in the present application can provide a variety of services for the generation of a test environment by adding independent processes. For example, in order to ensure that the version image can run successfully on the hardware environment, the plug-in installation process is used as one of multiple independent processes, and the business expansion is achieved simply and quickly by adding processes.
[0062] In one possible implementation, multiple parallel independent processes include a test resource release process. After the test of the version image is completed, the terminal device can use the test resource release process to delete the data saved in the test environment; use the test resource release process to send information about the end of the test to the test server; use the test resource release process to end one or more of the multiple parallel independent processes and release the hardware environment.
[0063] In another possible implementation, the test resource release process releases the hardware environment, does not delete the data stored in the test environment, and backs up the data stored in the test environment.
[0064] After the test of the target software is completed, the method provided by the present application deletes the data stored in the test environment through the test resource release process, thereby avoiding data leakage and improving security. The test resource release process is used to end one or more of multiple parallel independent processes to release software resources, and the test resource release process can also be used to release the hardware environment. Releasing the hardware environment through the test resource release process reduces the occupation time of hardware resources, facilitates the hardware resources to perform other work, and improves the utilization rate of hardware resources.
[0065] The method provided by the present application uses an image warehouse to store version images of different versions of the target software. When it is necessary to build a test environment for the test version of the target software, it is only necessary to obtain the version image corresponding to the test version in the image warehouse. For developers, it is only necessary to upload the version images of different versions of the target software to the image warehouse, without docking with any personnel, and directly upload the version image to the image warehouse, which reduces the time required for developers to dock. The method provided by the present application executes multiple parallel independent processes at the same time through a test environment generator, and simultaneously obtains test account information, obtains the test IP address range and determines the test server through multiple parallel independent processes. The relevant tasks of building the test environment of the test version of the target software are automatically performed through multiple parallel independent processes, which can be completed without the participation of operation and maintenance personnel, further reducing the time required for personnel docking. The test environment builder only needs to use the test environment generator to complete the construction of the test environment of the test version of the target software, without docking with other personnel, reducing the time required for the construction of the test environment of the test version of the target software. In the method provided by the present application, the independent processes in the test environment generator are isolated from each other, and the stability of the test environment generator can be increased by isolation.
[0066] In a possible implementation, the test environment generator can be generated based on the Kubernetes architecture, and the pod can be used as the test environment generator. Since the multiple containers of the pod are isolated from each other and do not interfere with each other, some tasks require the collaboration of multiple processes. The communication rules between multiple processes may be different. The terminal device can generate a communication rule management process based on the communication rules of the independent processes in the pod container. The communication rule management process can establish communication connections between independent processes.
[0067] The present application provides a solution for connecting mutually isolated independent processes. The communication rules of each independent process are acquired in advance and centrally managed through the communication rule management process. When the processes need to communicate, the communication connection between the independent processes is established through the communication rule management process, making multi-process collaborative work possible between multiple mutually isolated independent processes. To achieve the expansion of the multi-process collaborative work business, it is only necessary to add a communication rule management process to the test environment generator, which completes the expansion of the business simply and quickly.
[0068] In a possible implementation, the test account information may be changed during the software testing process. Here, taking game A as an example, version 1 of game A needs to be tested, and a test environment of version image 1 is generated for this purpose. When testing version image 1, account 1 is used, and account 1 corresponds to password 1. In the process of testing version image 1 using the test environment, password 1 may be modified. The test environment generator may include a test account information change process to meet the needs of the actual test process. When password 1 is changed to password 1+, a communication connection between the test account information change process and the test account information acquisition process is established using the communication rule management process, and the test account information change process is used to change password 1 in the test account information acquisition process to password 1+.
[0069] In another possible implementation, account 1 is used when testing version image 1. In the process of testing version image 1 using the test environment, account 1 violates the test regulations. For example, the test regulations state that the test environment used by account 1 cannot copy test data, but the test environment used by account 1 not only copies test data, but also causes the leakage of test data. In this case, the test environment used by account 1 violates the test regulations. At this time, account 1 needs to be banned. A communication rule management process is used to establish a communication connection between the test account information change process and the test account information acquisition process, and the test account information change process is used to delete the information related to account 1 in the test account information acquisition process.
[0070] The method provided by the present application realizes the collaborative work of the test account information change process and the test account information acquisition process through the communication rule management process. When a specific situation occurs, the test account information is changed using the test account information change process. The expansion of the account information change service is only to add an independent process to the test environment generator, and the expansion of the service is very fast and convenient. In special circumstances, such as account violations, the test account information can also be quickly changed through the test account information change process, which increases the stability and security of the test environment.
[0071] In a possible implementation, when the version image is tested through the test environment, the login information for logging into the version image is obtained through the login information acquisition process and matched through the login information matching process. Here, game A is taken as an example. Version 1 of game A needs to be tested. For this purpose, a test environment of version image 1 is generated. When version image 1 is tested, the login information corresponding to the account for logging into the test environment is obtained through the login information acquisition process. Account 1 is used to log into the test environment. Account 1 corresponds to password 1, and the device IP using account 1 is IP1. When the login information acquisition process obtains the above login information, a communication connection between the login information acquisition process and the login information matching process is established using the communication rule management process. The login information matching process is used to match the test account information in the login information with the test account information obtained by the test account information acquisition process, and the login information matching process is used to match the IP address in the login information with the test IP address range obtained by the test IP address range acquisition process. In one possible implementation, the login information matching process finds the corresponding relationship between account 1, password 1, and account 1 and password 1 in the test account information, and IP1 is an IP address within the test IP address range. At this time, the device using account 1 successfully logs into the test environment and tests version image 1. In another possible implementation, the login information matching process finds account 1 and password 1 in the test account information, but account 1 does not correspond to password 1, but IP1 is an IP address within the test IP address range. At this time, the terminal device can send a prompt that the password is wrong to the device using account 1. In another possible implementation, the login information matching process finds the corresponding relationship between account 1, password 1, and account 1 and password 1 in the test account information, but IP1 is not an IP address within the test IP address range. At this time, the terminal device can send a prompt that the device using account 1 is not qualified for testing.
[0072] The method provided by the present application matches the login information of the test environment with the test account information and the test IP address range by adding a login information acquisition process and a login information matching process. By completing the login information matching in the test environment generator instead of sending the login information to the test server for matching, the burden of the test server is reduced. Matching the login information in the test environment only adds two independent processes, the login information matching process and the login information acquisition process, which realizes the expansion of the business very simply and quickly.
[0073] In a possible implementation, the multiple parallel independent processes include a test status acquisition process and a notification process. The test status acquisition process is mainly used to acquire the test status, such as normal test status or abnormal test status, during the process of testing the test version using the test environment. The test status acquisition process can also display the reason for the abnormal test status, such as abnormality caused by network reasons or abnormality caused by errors in the version image. When the running status of the test environment acquired by the test status acquisition process is abnormal, a notification of the abnormal running status is sent to the test party using the test environment and the test environment generator through the notification process.
[0074] The method provided by the present application can obtain the test status of the test environment during the test process by adding an independent process, and send a notification of abnormal operation status to the test party using the test environment and the test environment generator through the notification process. By simply adding processes to achieve business expansion, the test party and the test environment generator are notified in time when an abnormality occurs in the test environment, and the abnormality that occurs can be quickly located and resolved.
[0075] Figure 3 A comparison diagram of a traditional environment creation process provided in an embodiment of the present application and the environment creation process provided in the present application, through Figure 3 It can be seen that in the traditional environment creation process, there is no connection between each step. Different steps may require personnel from different departments to complete. The application of the hardware environment for the test environment to run, the hardware environment initialization, the acquisition of test account information, the acquisition of the test IP address range, the application of the test server and the deployment of the communication connection all need to be completed by the operation and maintenance personnel; the packaging of the test version, the transmission of the test version, the configuration of the port and the operation of the test version all require the participation of developers; and the testers need to connect with the corresponding personnel at each step to finally generate the test environment. In the traditional test environment generation process, permission application is also required. For example, in the process of obtaining the test account information, the operation and maintenance personnel need to obtain the permission to call the test account information before they can call the test account information. As mentioned above, the test account information is generally stored in the database corresponding to the development device. Since the development device of the target software will restrict the call of the information in the database, only the device with the call permission can call the information in the database corresponding to the development device. The process for the operation and maintenance personnel to obtain the call permission also takes a certain amount of time. In one possible implementation, you can apply for a test server using the Gcloud zone service management system, which is used to manage servers. Operation and maintenance personnel also need to obtain permissions to the Gcloud zone service management system. Only after obtaining permissions to the Gcloud zone service management system can they apply for a server.
[0076] In the test environment generation process provided by this application, developers store different versions of version images in the image warehouse. When generating the test environment, they only need to obtain the version image in the image warehouse, without the need for testers to connect with developers. After obtaining the version image in the test environment generation process provided by this application, the version image can be run directly. In the test environment generation process, the hardware environment for the test environment to run can be automatically applied for by the terminal device, and the test environment generator is created on the hardware environment after the hardware environment is determined. Multiple parallel independent processes are running in the test environment generator, and the multiple parallel independent processes include: the test account information acquisition process of the version image, the test IP address range acquisition process and the test server determination process. The test environment generator is generated based on the Kubernetes architecture, and the pod can be used as a test environment generator. The development equipment of the target software and the Gcloud district service management system can be used as nodes in the Kubernetes architecture. The pod has the right to access the node. The test environment is generated through the Kubernetes architecture without the participation of operation and maintenance personnel. The test account information acquisition, test IP address range acquisition and test server determination are performed simultaneously through multiple parallel independent processes, so as to reduce the time required to generate the test environment.
[0077] The method provided by this application simplifies the test environment generation process, reduces unnecessary manpower waste such as applying for permissions and personnel docking when generating the test environment, and can generate the test environment more quickly. Developers only need to upload the version image to the image warehouse, and testers only need to obtain the version image in the image warehouse. Developers and testers use different environments, which further speeds up the generation of the test environment.
[0078] Figure 4 An architecture diagram is generated for a test environment based on the K8s architecture provided for this application, in which CloneMirror, CloneWeb, CloneCore, CloneLocal, CloneAgent, CloneController, CloneWatch, CloneK8sConsoleh and CloneETCD are all nodes in the K8s architecture, and development equipment, image warehouse, MySQL, Gcloud zone service and Tcaplus are external components.
[0079] The development device is a device for developing the target software, and CloneMirror is a component for making version images. After the development device uploads a version of the target software to CloneMirror, CloneMirror makes the version image and saves it to the image repository.
[0080] CloneWeb is the control page for the test environment generation architecture. CloneWeb has various trigger buttons. For example, the request for the test environment of the target software test version can be triggered on CloneWeb. CloneCore provides an interface for CloneWeb. CloneWeb connects to the Gcloud server and CloneLocal through CloneCore, and CloneLocal connects to Tcaplus. The Gcloud server is a server that can be used to test software. Tcaplus is a database that can save test account information and test IP address ranges. CloneLocal is mainly used to create Tcaplus and store the acquired test account information and test IP address ranges in Tcaplus. CloneCore and CloneWeb communicate via the HTTP protocol, CloneCore and Gcloud server communicate via the HTTP protocol, CloneCore and CloneLocal communicate via RPC instructions, and CloneLocal and Tcaplus communicate via the HTTP protocol.
[0081] MySQL is a database. MySQL is mainly used to store relevant information for creating a version image test environment. For example, CloneWeb can use CloneCore to store the device code of the test environment device, the time when the test environment was generated, and other information in MySQL.
[0082] K8sAPI is the interface that connects CloneCore to the image repository.
[0083] Each version image corresponds to a CloneAgent. CloneAgent is used to obtain the status of the version image. CloneAgent can also perform initialization operations on the version image. CloneAgent can obtain the status of the test environment generator pod corresponding to the version image. CloneAgent can send the pod status to CloneWatch in the form of a heartbeat packet through CloneETCD. CloneETCD is used to connect CloneWatch and CloneAgent. CloneWatch controls the status of the test environment generator pod through the heartbeat packet.
[0084] CloneController is the controller of the test environment generation architecture. CloneController can obtain the status of the version and control it. CloneController can also store the status of each version image in MySQL.
[0085] CloneWeb can directly access the test environment corresponding to the version image through CloneK8sConsoleh, and control the test environment corresponding to the image through CloneK8sConsoleh.
[0086] Figure 5 A test environment schematic diagram provided for this application, the development device uploads the test version to the image warehouse, and the image warehouse can be built on the Blue Whale server. The web management page initiates a request to create a test environment, and in response to the request to generate a test environment for the target software test version, obtains the version image in the image warehouse, and generates a test environment generator. The test environment generator is created on the hardware DB provided by the environment cloning service. The test environment generator automatically connects the surroundings based on multiple independent processes, including Gcloud area service, TcaplusDB, CMDB, CC / BF login and CLB port configuration. The test environment generator determines the test server in the Gcloud area service through the test server determination process, and the test environment generator obtains the test account information in TcaplusDB through the test account information acquisition process, and the test environment generator obtains the test IP address range through the CLB port. In addition, the test environment generator can also obtain the configuration information of the test environment through the CMDB (Configuration Management Database) database. CC and BF are a kind of login, and you can log in to the test environment generation service through CC or BF, and view the working status of the test environment generator in the test environment generation service. In addition to using the login tool to log in to the test environment generation service, you can also log in to the test environment generation service directly through the web management page. Developers, testers, and operations / planning personnel can also log in to the test environment generation service through mobile terminals such as mobile phones.
[0087] The method provided by this application can store any information and data. By calling the background data, you can clearly know the device code that created the test environment, the creation time of the test environment, the person who logged into the environment generation service, and the related operations performed on the test environment. Through the detailed background records, even if an abnormality occurs in the test environment, the process and time of the abnormality can be located, which is conducive to maintaining the stability of the test environment.
[0088] Figure 6A comparison chart of the effects of a traditional test environment generation method provided by the present application and the test environment generation method provided by the present application, wherein the traditional test environment generation relies on manual generation, the developer proposes the test requirements, and the operation and maintenance personnel apply for permissions, obtain information and other operations. The connection between the developer and the operation and maintenance personnel is time-consuming and wastes labor costs. When a large number of test environments are required for testing certain versions of the target software, the connection time between the developer and the operation and maintenance personnel will be greatly extended, seriously affecting the testing of the target software.
[0089] The method provided in this application can automatically build a test environment. Developers only need to upload different versions of the target software to the image repository. When a test environment needs to be generated, the tester only needs to trigger the test environment generation to generate the test environment without any manual intervention, and directly generate the test environment based on the version image of the test version. For the generation of the test environment, using the method provided in this application can save 30%-50% of the time.
[0090] Traditional test environment updates need to follow a specific process. Test environment updates can be major changes to test account information, or minor updates to version images, etc. Traditional test environment updates also require developers and operation and maintenance personnel to connect and update according to the prescribed process.
[0091] The method provided in the present application can be automatically updated. It only needs to add a corresponding independent process in the test environment generator to complete the corresponding update operation. Similarly, no human intervention is required and the update is automatically completed.
[0092] For the created test environment, the traditional method requires manual maintenance of the test environment. For example, if there are many test environments and the capacity of the test server is insufficient, the tester needs to connect with the operation and maintenance personnel, and the operation and maintenance personnel apply for more servers as test servers. There is a problem of untimely maintenance of the test environment.
[0093] The method provided by the present application can automatically maintain the test environment. For example, when there are many test environments and the capacity of the test server is insufficient, the method provided by the present application can directly determine the test server that can support multiple test environments through the test server determination process in the test environment generator. The maintenance process also does not require human intervention and can be completed automatically.
[0094] Based on the method for generating a test environment provided in the above embodiment, the present application also provides a device 700 for generating a test environment. Figure 7 Provide explanation. Figure 7 This is a schematic diagram of the structure of a device for generating a test environment provided in an embodiment of the present application. Figure 7 The generation device of the test environment shown includes:
[0095] A version image acquisition module 701 is used to respond to a request for generating a test environment for a test version of the target software and to acquire a version image corresponding to the test version in an image repository, where the image repository is used to store version images of different versions of the target software;
[0096] A test environment generator creation module 702 is used to create a test environment generator, and the test environment generator is used to run multiple parallel independent processes; the multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process, and a test server determination process;
[0097] The information acquisition module 703 is used to obtain the test account information, test IP address range and test server of the version image by running the multiple parallel independent processes;
[0098] The test environment generating module 704 is used to generate the test environment of the test version by using the version image and the test account information obtained by the test environment generator, the test IP address range and the determined test server.
[0099] In a possible implementation, the test environment generator creation module is specifically used to:
[0100] Determine the hardware environment for running the test environment generator;
[0101] Creating an empty test environment generator based on the hardware environment, wherein the empty test environment generator includes a plurality of empty containers, wherein the containers are used to run independent processes, and one container runs one independent process;
[0102] The multiple parallel independent processes are respectively placed into different empty containers to obtain a test environment generator.
[0103] In a possible implementation, the test environment generation module is specifically used to:
[0104] Running the version image on the hardware environment;
[0105] The test account information is used as the account information for logging into the version image, the test IP address range is used as the IP address range for testing the version image, and the test server is used as a server for processing test data to generate a test environment for the test version. The test data is the data generated by testing the version image.
[0106] In a possible implementation, the multiple parallel independent processes further include: a plug-in installation process, and the test environment generation device further includes a plug-in installation module, and the plug-in installation module is specifically used to:
[0107] Get the plug-in information used when running the version image;
[0108] When the version image cannot run, installing the plug-in using the plug-in installation process, wherein the plug-in installation process is generated based on the plug-in information;
[0109] After the plug-in installation process is completed, the version image is run.
[0110] In a possible implementation, the multiple parallel independent processes further include: a test resource release process, and the test environment generation device further includes a test resource release module, and the test resource release module is specifically used to:
[0111] After the test of the version image is completed, the data stored in the test environment is deleted by using the test resource release process;
[0112] Using the test resource release process to send test end information to the test server;
[0113] The test resource release process is utilized to terminate one or more of the plurality of parallel independent processes and release the hardware environment.
[0114] In a possible implementation, the test environment generating device further includes a communication rule management module, and the communication rule management module is used to:
[0115] Generate a communication rule management process based on the communication rules of the test environment generator independent process;
[0116] The communication rule management process establishes a communication connection between independent processes.
[0117] Optionally, the multiple parallel independent processes further include: a test account information change process, and the test environment generation device further includes a test account change module, and the test account change module is used to:
[0118] When the test account information is changed, the communication rule management process is used to establish a communication connection between the test account information change process and the test account information acquisition process;
[0119] The test account information is changed using the test account change process.
[0120] In a possible implementation, the multiple parallel independent processes further include: a login information acquisition process and a login information matching process, and the test environment generation device further includes a login information acquisition module and a login information matching module, and the login information acquisition module and the login information matching module are used to:
[0121] When the login information acquisition process acquires the login information, a communication connection is established between the login information acquisition process and the login information matching process using the communication rule management process;
[0122] The login information matching process is used to match the test account information in the login information with the test account information obtained by the test account information obtaining process, and the login information matching process is used to match the IP address in the login information with the test IP address range obtained by the test IP address range obtaining process.
[0123] In a possible implementation, the multiple parallel independent processes further include: a test status acquisition process and a notification process, and the test environment generation device further includes a test status acquisition module and a notification module, and the test status acquisition module and the notification module are used to:
[0124] Acquiring the running status of the test environment using the test status acquisition process;
[0125] When the running state of the test environment acquired by the test state acquisition process is abnormal, a notification of the abnormal running state is sent to the test party using the test environment and the generator of the test environment through the notification process.
[0126] The following describes the structure of the test environment generation device in server form and terminal device form respectively.
[0127] Figure 8: This is a schematic diagram of a server structure provided in an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 922 (for example, one or more processors) and a memory 932, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 942 or data 944. Among them, the memory 932 and the storage medium 930 can be short-term storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 922 can be configured to communicate with the storage medium 930 and execute a series of instruction operations in the storage medium 930 on the server 900.
[0128] The server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, and / or one or more operating systems 941, such as Windows Server 2000. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0129] The CPU 922 is used to execute the following steps:
[0130] In response to a request to generate a test environment for a test version of the target software, obtaining a version image corresponding to the test version in an image repository, the image repository being used to store version images of different versions of the target software;
[0131] Creating a test environment generator, the test environment generator is used to run multiple parallel independent processes; the multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process;
[0132] By running the multiple parallel independent processes, the test account information, test IP address range and test server of the version image are obtained;
[0133] The test environment of the test version is generated by using the version image and the test account information, the test IP address range and the determined test server obtained by the test environment generator.
[0134] The present application embodiment also provides another test environment generation device, such as Fig. 9 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), a sales terminal (English full name: Point of Sales, English abbreviation: POS), a car computer, etc., taking the terminal as a mobile phone as an example:
[0135] Fig. 9 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Fig. 9 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art can understand that Fig. 9 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0136] Combine the following Fig. 9 A detailed introduction to the various components of the mobile phone:
[0137] The RF circuit 1010 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (full name: LowNoiseAmplifier, English abbreviation: LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to Global System of Mobile communications (Global System of Mobile communication, English abbreviation: GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, English abbreviation: CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, English abbreviation: LTE), e-mail, Short Messaging Service (SMS), etc.
[0138] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0139] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may further include other input devices 1032. Specifically, the other input devices 1032 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0140] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (full name in English: Liquid Crystal Display, English abbreviation: LCD), an organic light-emitting diode (full name in English: Organic Light-Emitting Diode, English abbreviation: OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Fig. 9 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0141] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0142] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.
[0143] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Fig. 9 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0144] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 1020, and calling data stored in the memory 1020, it executes various functions of the mobile phone and processes data, thereby collecting overall data and information of the mobile phone. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.
[0145] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.
[0146] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0147] In the embodiment of the present application, the processor 1080 included in the terminal also has the following functions:
[0148] In response to a request to generate a test environment for a test version of the target software, obtaining a version image corresponding to the test version in an image repository, the image repository being used to store version images of different versions of the target software;
[0149] Creating a test environment generator, the test environment generator is used to run multiple parallel independent processes; the multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process;
[0150] By running the multiple parallel independent processes, the test account information, test IP address range and test server of the version image are obtained;
[0151] The test environment of the test version is generated by using the version image and the test account information, the test IP address range and the determined test server obtained by the test environment generator.
[0152] An embodiment of the present application also provides a computer-readable storage medium for storing program code, wherein the program code is used to execute any one of the implementation methods of a test environment generation method described in the aforementioned embodiments.
[0153] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any one of the methods for generating a test environment described in the aforementioned embodiments.
[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0155] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the system is only a logical function division. There may be other division methods in actual implementation, such as multiple systems can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0156] The systems described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.
[0159] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generating a test environment, characterized in that: include: In response to a request to generate a test environment for a test version of the target software, obtaining a version image corresponding to the test version in an image repository, the image repository being used to store version images of different versions of the target software; Creating a test environment generator, wherein the test environment generator is used to run multiple parallel independent processes; The multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process; By running the multiple parallel independent processes, the test account information, test IP address range and test server of the version image are obtained; The test environment of the test version is generated by using the version image and the test account information, the test IP address range and the determined test server obtained by the test environment generator.
2. The method according to claim 1, characterized in that The creating a test environment generator comprises: Determine the hardware environment for running the test environment generator; Creating an empty test environment generator based on the hardware environment, wherein the empty test environment generator includes a plurality of empty containers, wherein the containers are used to run independent processes, and one container runs one independent process; The multiple parallel independent processes are respectively placed into different empty containers to obtain a test environment generator.
3. The method according to claim 2, characterized in that The step of generating the test environment of the test version by using the version image and the test account information obtained by the test environment generator, the test IP address range, and the determined test server includes: Running the version image on the hardware environment; The test account information is used as the account information for logging into the version image, the test IP address range is used as the IP address range for testing the version image, and the test server is used as a server for processing test data to generate a test environment for the test version. The test data is the data generated by testing the version image.
4. The method according to claim 3, characterized in that The plurality of parallel independent processes further include: a plug-in installation process, and the method further includes: Get the plug-in information used when running the version image; When the version image cannot run, installing the plug-in using the plug-in installation process, wherein the plug-in installation process is generated based on the plug-in information; After the plug-in installation process is completed, the version image is run.
5. The method according to claim 2, characterized in that: The plurality of parallel independent processes further include: a test resource release process, and the method further includes: After the test of the version image is completed, the data stored in the test environment is deleted by using the test resource release process; Using the test resource release process to send test end information to the test server; The test resource release process is utilized to terminate one or more of the plurality of parallel independent processes and release the hardware environment.
6. The method according to claim 1, characterized in that The method further comprises: Generate a communication rule management process based on the communication rules of the test environment generator independent process; The communication rule management process establishes a communication connection between independent processes.
7. The method according to claim 6, characterized in that The multiple parallel independent processes further include: a test account information change process, and the method further includes: When the test account information is changed, a communication connection is established between the test account information changing process and the test account information obtaining process using the communication rule management process; The test account information is changed using the test account change process.
8. The method according to claim 6, characterized in that The multiple parallel independent processes further include: a login information acquisition process and a login information matching process, and the method further includes: When the login information acquisition process acquires the login information, a communication connection is established between the login information acquisition process and the login information matching process using the communication rule management process; The login information matching process is used to match the test account information in the login information with the test account information obtained by the test account information obtaining process, and the login information matching process is used to match the IP address in the login information with the test IP address range obtained by the test IP address range obtaining process.
9. The method according to claim 1, characterized in that: The plurality of parallel independent processes further include: a test status acquisition process and a notification process, and the method further includes: Acquiring the running status of the test environment using the test status acquisition process; When the running state of the test environment acquired by the test state acquisition process is abnormal, a notification of the abnormal running state is sent to the test party using the test environment and the generator of the test environment through the notification process.
10. A device for generating a test environment, characterized in that: include: A version image acquisition module, configured to, in response to a request for generating a test environment for a test version of the target software, acquire a version image corresponding to the test version in an image repository, wherein the image repository is used to store version images of different versions of the target software; A test environment generator creation module, used to create a test environment generator, wherein the test environment generator is used to run multiple parallel independent processes; The multiple parallel independent processes include: a test account information acquisition process of the version image, a test IP address range acquisition process and a test server determination process; An information acquisition module, used to obtain the test account information, test IP address range and test server of the version image by running the multiple parallel independent processes; The test environment generation module is used to generate the test environment of the test version by using the version image and the test account information obtained by the test environment generator, the test IP address range and the determined test server.
11. A device for generating a test environment, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the method for generating a test environment according to any one of claims 1 to 9 according to the instructions in the program code.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the steps of the method for generating a test environment according to any one of claims 1 to 9.
13. A computer program product, characterized in that The invention comprises a computer program or an instruction, which, when executed by a test environment generating device, implements the steps of the test environment generating method as claimed in any one of claims 1 to 9.