CN-116048969-B - Test environment configuration method, system and device
Abstract
The embodiment of the invention provides a test environment configuration method, a test environment configuration system and a test environment configuration device, which relate to the technical field of data processing, wherein the test environment configuration method comprises the steps of obtaining a requirement identifier of a target test requirement as a target requirement identifier; the method comprises the steps of sending a target demand identifier to a test server, enabling the test server to determine configuration information corresponding to the target demand identifier from stored configuration information after receiving the target demand identifier to serve as target configuration information, sending address information in the target configuration information to a client, receiving the address information sent by the test server, screening an access address to be utilized from access addresses configured for each program in the client based on the received address information, and acquiring test environment data required for realizing target test demands based on the access address to be utilized to realize configuration of a test environment. The efficiency of configuring the test environment can be improved through the scheme.
Inventors
- LI JINGJING
- LI TIANXIANG
- ZHU CUIRONG
- CAO DONGPING
Assignees
- 北京奇艺世纪科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221228
Claims (9)
- 1. A test environment configuration method is characterized by being applied to a client of a test environment configuration system, wherein the test environment configuration system further comprises a test server, the test server stores configuration information configured in advance for each test requirement, the configuration information of each test requirement comprises address information of test environment data required for realizing the test requirement, different test requirements are requirements of different programs to be tested for the test environment data under different test types, and the address information comprises a domain name, and the method comprises the following steps: acquiring a requirement identifier of a target test requirement as a target requirement identifier; The target demand identification is sent to the test server, so that the test server determines configuration information corresponding to the target demand identification from stored configuration information according to a first corresponding relation between a pre-established demand identification and configuration information after receiving the target demand identification, and the configuration information is used as target configuration information; The method comprises the steps of receiving address information sent by a test server, and determining an access address containing a domain name in the received address information from access addresses configured for each program in a client as an access address to be utilized, wherein the access address is a URL, and the access address of each program is an access address of data required for running the program; And acquiring test environment data required by realizing the target test requirement based on the access address to be utilized so as to realize the configuration of the test environment.
- 2. The method of claim 1, wherein the test environment configuration system further comprises a proxy server; The obtaining, based on the address to be utilized, test environment data required for implementing the target test requirement includes: The access address to be utilized is sent to the proxy server, so that after the proxy server receives the access address to be utilized, test environment data required for realizing the target test requirement are obtained based on the access address to be utilized, and the obtained test environment data are sent to the client; And receiving the test environment data sent by the proxy server.
- 3. The method of claim 2, wherein the configuration information of each test requirement further comprises an address modification rule, wherein the address modification rule included in each configuration information is used for indicating that an access address of a domain name included in the configuration information is modified to be an access address pointing to test environment data corresponding to the configuration information; The obtaining, based on the address to be utilized, test environment data required for implementing the target test requirement includes: The method comprises the steps of sending an access address to be utilized and a client identifier of a client to a proxy server, enabling the proxy server to obtain an address modification rule in target configuration information corresponding to the client identifier from a test server based on a second corresponding relation between the client identifier and the target configuration information, which is established in advance, after receiving the access address to be utilized and the client identifier, modifying the access address to be utilized according to the obtained address modification rule to obtain a target address, accessing the target address, obtaining test environment data required by realizing the target test requirement, and sending the obtained test environment data to the client, wherein the second corresponding relation is a corresponding relation established by the test server for the client identifier and the determined target configuration information after determining the configuration information corresponding to the target requirement identifier as target configuration information; And receiving the test environment data sent by the proxy server.
- 4. The method of claim 1, wherein the obtaining the requirement identification of the target test requirement comprises: Acquiring a two-dimensional code generated by a demand identifier aiming at a target test demand in advance; Analyzing the acquired two-dimensional code to obtain a requirement identifier of the target test requirement.
- 5. The test environment configuration system is characterized by comprising a test server and a client, wherein the test server stores configuration information configured in advance for each test requirement, the configuration information of each test requirement comprises address information of test environment data required for realizing the test requirement, different test requirements are requirements of different programs to be tested for the test environment data under different test types, and the address information comprises a domain name, wherein the address information comprises the following components: The client is used for acquiring a requirement identifier of a target test requirement as a target requirement identifier; The test server is used for determining configuration information corresponding to the target demand identifier from the stored configuration information according to a first corresponding relation between the pre-established demand identifier and the configuration information after receiving the target demand identifier, and sending address information in the target configuration information to the client; The client is further configured to determine, from access addresses configured for each program in the client after receiving the address information sent by the test server, an access address including a domain name in the received address information as an access address to be utilized, and obtain test environment data required for implementing the target test requirement based on the access address to be utilized, so as to implement configuration of a test environment, where the access address is a URL, and the access address of each program is an access address of data required for running the program.
- 6. The system of claim 5, wherein the test environment configuration system further comprises a proxy server; the client is specifically configured to send the access address to be utilized to the proxy server; The proxy server is used for acquiring test environment data required by realizing target test requirements based on the access address to be utilized after receiving the access address to be utilized, and sending the acquired test environment data to the client; The client is specifically configured to receive test environment data sent by the proxy server.
- 7. The test environment configuration device is characterized by being applied to a client of a test environment configuration system, the test environment configuration system further comprises a test server, the test server stores configuration information configured in advance for each test requirement, the configuration information of each test requirement comprises address information of test environment data required for realizing the test requirement, different test requirements are requirements of different programs to be tested for the test environment data under different test types, and the address information comprises a domain name, the device comprises: The demand identification acquisition module is used for acquiring a demand identification of a target test demand and taking the demand identification as a target demand identification; the configuration information determining module is used for sending the target demand identifier to the test server side so that the test server side can determine configuration information corresponding to the target demand identifier from stored configuration information according to a first corresponding relation between a pre-established demand identifier and the configuration information after receiving the target demand identifier, and the configuration information is used as target configuration information; The access address screening module is used for receiving the address information sent by the test server and determining an access address containing a domain name in the received address information from access addresses configured for each program in the client as an access address to be utilized, wherein the access address is a URL (uniform resource locator), and the access address of each program is an access address of data required for running the program; The data acquisition module is used for acquiring test environment data required by realizing the target test requirement based on the access address to be utilized so as to realize the configuration of the test environment.
- 8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; A memory for storing a computer program; a processor for implementing the method steps of any one of claims 1-4 when executing a program stored on a memory.
- 9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
Description
Test environment configuration method, system and device Technical Field The present invention relates to the field of data processing technologies, and in particular, to a test environment configuration method, system, and apparatus. Background In the development process of a program, multiple tests are often required to be performed on the program according to different test requirements, where the test requirements indicate test types of the program to be tested and a test to be executed for the program to be tested, and the test types may include a requirement test type, a product acceptance test type, an integration test type, a requirement experience test type, and the like. In the related art, before each test is performed on a developed program, a test environment for a program to be tested and a test type is configured according to current test requirements, so that the test type of the program to be tested is tested under the test environment. However, the storage of the test environment data is often scattered, so that the process of determining the required test environment data is inconvenient each time the test is performed, and therefore, the efficiency of configuring the test environment is low. Disclosure of Invention The embodiment of the invention aims to provide a test environment configuration method, a test environment configuration system and a test environment configuration device so as to improve the efficiency of configuring a test environment. The specific technical scheme is as follows: In a first aspect of the present invention, a test environment configuration method is provided, applied to a client of a test environment configuration system, where the test environment configuration system further includes a test server, where the test server stores configuration information configured in advance for each test requirement, and the configuration information of each test requirement includes address information of test environment data required for implementing the test requirement, where the method includes: acquiring a requirement identifier of a target test requirement as a target requirement identifier; The target demand identification is sent to the test server, so that the test server determines configuration information corresponding to the target demand identification from stored configuration information according to a first corresponding relation between a pre-established demand identification and configuration information after receiving the target demand identification, and the configuration information is used as target configuration information; The method comprises the steps of receiving address information sent by a test server, and screening access addresses to be utilized from access addresses configured for each program in a client based on the received address information, wherein the access address of each program is an access address of data required by running the program; And acquiring test environment data required by realizing the target test requirement based on the access address to be utilized so as to realize the configuration of the test environment. Optionally, the address information includes a domain name; the determining an access address to be utilized from access addresses configured for each program in the client based on the received address information includes: From the access addresses configured for each program in the client, an access address containing the domain name in the received address information is determined as an access address to be utilized. Optionally, the test environment configuration system further comprises a proxy server; The obtaining, based on the address to be utilized, test environment data required for implementing the target test requirement includes: The access address to be utilized is sent to the proxy server, so that after the proxy server receives the access address to be utilized, test environment data required for realizing the target test requirement are obtained based on the access address to be utilized, and the obtained test environment data are sent to the client; And receiving the test environment data sent by the proxy server. Optionally, the configuration information of each test requirement also comprises an address modification rule, wherein the address modification rule of each configuration information comprises an access address indicating a domain name contained in the configuration information is modified to be an access address pointing to test environment data corresponding to the configuration information; The obtaining, based on the address to be utilized, test environment data required for implementing the target test requirement includes: The method comprises the steps of sending an access address to be utilized and a client identifier of a client to a proxy server, enabling the proxy server to obtain an address modification rule in target configuration information corresponding to t