A test environment configuration method, system and apparatus

By storing configuration information on the test server and filtering access addresses on the client side, test environment data can be quickly obtained, solving the problem of low configuration efficiency caused by scattered test environment data and achieving efficient test environment configuration.

CN116048969BActive Publication Date: 2026-05-08BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING QIYI CENTURY SCI & TECH CO LTD
Filing Date
2022-12-28
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, test environment data is stored in a scattered manner, which makes it inconvenient to determine the required test environment data for each test, resulting in low efficiency in configuring the test environment and difficulty in meeting the testing needs of personnel with different identities.

Method used

A test environment configuration method is provided. The test server stores pre-configured configuration information. After the client obtains the target requirement identifier, it determines the corresponding configuration information and filters the access address to be used based on the address information, thereby obtaining the test environment data.

Benefits of technology

It improves the efficiency of configuring the test environment, reduces the learning cost and time of manual configuration, and adapts to the testing needs of personnel with different roles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048969B_ABST
    Figure CN116048969B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of test environment configuration method, system and device, it is related to data processing technical field, the method comprises: obtaining the demand identifier of target test demand as target demand identifier;Target demand identifier is sent to test server, so that test server determines the configuration information corresponding to target demand identifier from each configuration information stored as target configuration information after receiving target demand identifier;Address information in target configuration information is sent to client;The address information sent by test server is received, and based on the received address information, from the access address configured for each program in client, the access address to be used is filtered out;Based on the access address to be used, the test environment data required to realize target test demand is obtained, to realize the configuration of test environment.Through the present scheme, the efficiency of configuration test environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a test environment configuration method, system, and apparatus. Background Technology

[0002] During the development of a program, depending on the different testing requirements, the program often needs to be tested multiple times. The aforementioned testing requirements indicate the program to be tested and the test types that need to be performed on the program to be tested. These test types can include requirement testing, product acceptance testing, integration testing, requirement experience testing, etc.

[0003] In related technologies, before each test of a developed program, a test environment needs to be configured based on the current testing requirements, specifically for the program under test and the test type. Then, the program under test is subjected to the required test type within this environment. However, test environment data is often stored in a scattered manner, making the process of determining the necessary test environment data for each test inconvenient, thus resulting in low efficiency in configuring the test environment. Summary of the Invention

[0004] The purpose of this invention is to provide a test environment configuration method, system, and apparatus to improve the efficiency of test environment configuration. The specific technical solution is as follows:

[0005] In a first aspect of this invention, a test environment configuration method is provided, applied to a client of a test environment configuration system. The test environment configuration system further includes a test server, which stores pre-configured configuration information for each test requirement. The configuration information for each test requirement includes address information of the test environment data required to implement that test requirement. The method includes:

[0006] Obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier;

[0007] The target requirement identifier is sent to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; the address information in the target configuration information is sent to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0008] The system receives address information sent by the test server and, based on the received address information, filters out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address for each program is the access address for the data required to run the program.

[0009] Based on the access address to be utilized, obtain the test environment data required to achieve the target test requirements, so as to configure the test environment.

[0010] Optionally, the address information includes: a domain name;

[0011] The step of determining the access address to be used from the access addresses configured for each program in the client based on the received address information includes:

[0012] From the access addresses configured for each program in the client, determine the access address containing the domain name in the received address information, and use it as the access address to be used.

[0013] Optionally, the test environment configuration system further includes: a proxy server;

[0014] The step of obtaining the test environment data required to achieve the target test requirements based on the access address to be utilized includes:

[0015] The proxy server sends the access address to be used, so that after receiving the access address to be used, the proxy server obtains the test environment data required to achieve the target test requirements based on the access address to be used, and sends the obtained test environment data to the client.

[0016] Receive test environment data sent by the proxy server.

[0017] Optionally, the configuration information for each test requirement also includes address modification rules; the address modification rules included in each configuration information are: indicating that the access address containing the domain name in the configuration information should be modified to the access address pointing to the test environment data corresponding to the configuration information.

[0018] The step of obtaining the test environment data required to achieve the target test requirements based on the access address to be utilized includes:

[0019] The proxy server sends the access address to be used and the client's client identifier to the proxy server. Upon receiving the access address to be used and the client identifier, the proxy server, based on a pre-established second correspondence between the client identifier and the target configuration information, retrieves the address modification rules from the target configuration information corresponding to the client identifier from the test server. It then modifies the access address to be used according to the retrieved address modification rules to obtain the target address. The proxy server accesses the target address, retrieves the test environment data required to achieve the target test requirement, and sends the retrieved test environment data to the client. The second correspondence is a relationship established by the test server between the client identifier and the determined target configuration information after determining the configuration information corresponding to the target requirement identifier as the target configuration information.

[0020] Receive test environment data sent by the proxy server.

[0021] Optionally, the requirement identifier for obtaining the target test requirement includes:

[0022] Obtain a QR code generated in advance based on the requirement identifier of the target testing requirements;

[0023] The requirement identifier of the target test requirement is obtained by parsing the acquired QR code.

[0024] In a second aspect of this invention, a test environment configuration system is also provided. The test environment configuration system includes a test server and a client. The test server stores configuration information pre-configured for each test requirement. The configuration information for each test requirement includes: address information of the test environment data required to implement the test requirement; wherein:

[0025] The client is used to obtain the requirement identifier of the target test requirement as the target requirement identifier; and send the target requirement identifier to the test server.

[0026] The test server, upon receiving the target requirement identifier, determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and configuration information, and uses this as the target configuration information; and sends the address information in the target configuration information to the client.

[0027] The client is further configured to, after receiving the address information sent by the test server, filter out the access addresses to be used from the access addresses configured for each program in the client based on the received address information, and obtain the test environment data required to achieve the target test requirements based on the access addresses to be used, so as to configure the test environment; wherein, the access address of each program is: the access address of the data required to run the program.

[0028] Optionally, the address information includes: a domain name;

[0029] Based on the received address information, the client filters out the access addresses to be used from the access addresses configured for each program in the client, including:

[0030] From the access addresses configured for each program in the client, determine the access address containing the domain name in the received address information, and use it as the access address to be used.

[0031] Optionally, the test environment configuration system further includes: a proxy server;

[0032] The client is specifically used to send the access address to be used to the proxy server;

[0033] The proxy server is configured to, upon receiving the access address to be exploited, obtain the test environment data required to achieve the target test requirements based on the access address to be exploited, and send the obtained test environment data to the client.

[0034] The client is specifically used to receive test environment data sent by the proxy server.

[0035] In a third aspect of this invention, a test environment configuration device is also provided, applied to a client of a test environment configuration system. The test environment configuration system further includes a test server, which stores pre-configured configuration information for each test requirement. The configuration information for each test requirement includes address information of the test environment data required to implement that test requirement. The device includes:

[0036] The requirement identifier acquisition module is used to acquire the requirement identifier of the target test requirement, and use it as the target requirement identifier.

[0037] The configuration information determination module is used to send the target requirement identifier to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; and sends the address information in the target configuration information to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0038] The access address filtering module is used to receive address information sent by the test server, and based on the received address information, filter out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address of each program is: the access address of the data required to run the program.

[0039] The data acquisition module is used to acquire the test environment data required to achieve the target test requirements based on the access address to be utilized, so as to configure the test environment.

[0040] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0041] Memory, used to store computer programs;

[0042] The processor, when executing programs stored in memory, implements the above-described test environment configuration method.

[0043] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements the above-described test environment configuration method.

[0044] In another aspect of the present invention, a computer program product including instructions is also provided, which, when run on a computer, causes the computer to execute the above-described test environment configuration method.

[0045] The test environment configuration method provided in this embodiment of the invention is applied to the client of a test environment configuration system. The test environment configuration system also includes a test server. Since the test server stores pre-configured configuration information for each test requirement, when the client obtains the target requirement identifier of a target test requirement, it can send the target requirement identifier to the test server. This allows the test server to determine the target configuration information matching the target requirement identifier. The target configuration information is configured for each test requirement, and the configuration information for each test requirement includes the address information of the test environment data required to implement that test requirement. The client can then obtain the address information in the target configuration information and, based on this address information, filter out the access addresses configured for each program in the client to select the access addresses to be used by the programs related to the target test requirement. Therefore, test environment data can be obtained based on these access addresses. This solution allows for rapid acquisition of test environment data by obtaining the requirement identifier of the target test requirement, improving the efficiency of test environment configuration. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0047] Figure 1 This is a flowchart of the test environment configuration method in an embodiment of the present invention;

[0048] Figure 2 This is another flowchart of the test environment configuration method in an embodiment of the present invention;

[0049] Figure 3 This is a structural diagram of the test environment configuration system in an embodiment of the present invention;

[0050] Figure 4 This is an interactive diagram of the test environment configuration system in an embodiment of the present invention;

[0051] Figure 5 This is another structural diagram of the test environment configuration system in an embodiment of the present invention;

[0052] Figure 6 This is a structural diagram of the test environment configuration device in an embodiment of the present invention;

[0053] Figure 7 This is a structural diagram of the electronic device in an embodiment of the present invention. Detailed Implementation

[0054] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0055] Currently, during program development, multiple tests are required. These tests can be used to add new features or update existing ones. Taking updating existing features as an example, during requirement testing, manual verification of the updated program data, runtime environment data, and other test environment data is necessary to replace the original software data and configure the test environment. However, test environment data is often scattered, with numerous A / B testing scenarios. Manual differentiation of various data types and locating the required test environment data based on the specific testing requirements is complex and inconvenient. Configuring the test environment also requires significant learning costs, and the need for manual configuration before each test further reduces efficiency. Furthermore, program testing requires targeted testing by personnel with different roles, including non-technical personnel such as users conducting requirement testing. Therefore, the inefficient manual configuration of the test environment in this technology fails to meet the testing needs of diverse personnel.

[0056] To address the aforementioned problems and improve the efficiency of configuring the test environment, this invention provides a test environment configuration method, system, and apparatus. The method is applied to a client of a test environment configuration system, which also includes a test server. The test server stores pre-configured configuration information for each test requirement. The configuration information for each test requirement includes: address information of the test environment data required to implement that test requirement. The method includes:

[0057] Obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier;

[0058] The target requirement identifier is sent to the test server so that, upon receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; the address information in the target configuration information is sent to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0059] Receive the address information sent by the test server, and based on the received address information, filter out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address of each program is: the access address of the data required to run the program.

[0060] Based on the access address to be used, obtain the test environment data required to achieve the target test requirements, so as to configure the test environment.

[0061] In this embodiment, since the test server stores pre-configured configuration information for each test requirement, when the client obtains the target requirement identifier of the target test requirement, it can send the target requirement identifier to the test server. This allows the test server to determine the target configuration information that matches the target requirement identifier. The target configuration information is configured for each test requirement, and the configuration information for each test requirement includes the address information of the test environment data required to implement that test requirement. The client can then obtain the address information from the target configuration information and, based on this address information, filter out the access addresses configured for each program in the client to select the access addresses to be used by the programs related to the target test requirement. Therefore, test environment data can be obtained based on these access addresses. This solution allows for rapid acquisition of test environment data by obtaining the requirement identifier of the target test requirement, improving the efficiency of test environment configuration.

[0062] The test environment configuration method provided by the embodiments of the present invention will be described exemplarily below with reference to the accompanying drawings.

[0063] The test environment configuration method provided in this embodiment of the invention is applied to a client of a test environment configuration system. The test environment configuration system also includes a test server. The test server stores configuration information pre-configured for each test requirement. The configuration information for each test requirement includes: address information of the test environment data required to implement that test requirement; such as... Figure 1 As shown, the method may include the following steps:

[0064] S101, Obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier;

[0065] The client can be an electronic device, such as a computer or mobile phone, or a program running on that device. The test server can be any server. However, the client and test server are not limited to these. The aforementioned test requirements can be the test environment data requirements of the program under test under different test types. In the specific implementation process, configuration information can be pre-configured for the test requirements of each program under test at each test stage and stored on the test server. The program under test can be a program developed for the functions to be added or updated in the client. The test types can include requirements testing, product acceptance testing, integration testing, and user experience testing.

[0066] Because the test environment data is stored in a scattered manner, to address this issue, the configuration information can include the address information of the test environment data required to achieve the test requirement. This allows the address information of the test environment data required to achieve the test requirement to be automatically determined from the test server each time a test is performed, instead of having to manually determine the address information for each test.

[0067] The target test requirement is the test requirement that needs to be performed. In this step, a corresponding requirement identifier can be set in advance for each test requirement. When testing is required, the requirement identifier of the target test requirement can be obtained as the target requirement identifier. The requirement identifier of any test requirement can be the name of the test requirement or a pre-set string, etc.

[0068] In one implementation, the client obtaining the target requirement identifier for the target testing requirement may include the following steps:

[0069] Step A1: Obtain the QR code generated in advance based on the target requirement identifier for the target testing requirements;

[0070] It is understandable that QR codes can carry data information. In this implementation, the data information carried by the QR code can be the requirement identifier itself, or it can be the storage address of the requirement identifier in the network. Therefore, a corresponding QR code can be generated in advance for the requirement identifier of each test requirement. When testing is required, the QR code can be obtained by scanning the QR code through an electronic device with image acquisition function, such as a smartphone.

[0071] Step A2: Parse the obtained QR code to get the target requirement identifier.

[0072] If the data information carried by the QR code is a demand identifier, in this step, the data information carried by the obtained QR code can be parsed and used as the target demand identifier; if the data information carried by the QR code is the storage address of the demand identifier in the network, in this step, the data information carried by the obtained QR code can be parsed first to obtain the storage address of the target demand identifier in the network, and then the target demand identifier can be obtained from that storage address.

[0073] In this implementation, corresponding QR codes are generated in advance for different testing requirements, and the target requirement identifier is obtained by parsing the QR codes, which is easy for users to use and can further improve the efficiency of configuring the testing environment.

[0074] S102, send a target requirement identifier to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; send the address information in the target configuration information to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0075] The test server can be configured with configuration information for various test requirements. After the configuration information for a test requirement is configured on the test server, a correspondence between the requirement identifier and the configuration information can be established. When testing is required, the target requirement identifier can be sent to the test server, so that the test server can determine the target configuration information corresponding to the target requirement identifier based on the target requirement identifier of this test, and then send the address information in the target configuration information to the client.

[0076] S103, Receive the address information sent by the test server, and based on the received address information, filter out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address of each program is: the access address of the data required to run the program.

[0077] After the test server determines and sends the address information to the client, the client can receive the address information sent by the test server.

[0078] Understandably, clients typically have access addresses configured. These addresses serve as the access points for data needed to run a program on the client, and the program can be a pre-developed program running on the client. By pre-configuring access addresses for each program, the client can retrieve the necessary data from the network based on the configured access address. The access address can be a URL (Uniform Resource Locator), allowing the client to directly obtain the required test environment data from the network, which can be the company's intranet or the internet.

[0079] In one implementation, the address information can also be a URL, so that the client can filter out the access addresses to be used based on the received address information. The filtering method can be: filtering out access addresses that are the same as the received address information as the access addresses to be used.

[0080] In another implementation, the address information includes a domain name. In this case, determining the access address to be used from the access addresses configured for each program in the client based on the received address information can be done by: determining the access address containing the domain name in the received address information from the access addresses configured for each program in the client, and using it as the access address to be used.

[0081] The aforementioned address information can be a routing table containing at least one domain name. This is understandable, as a URL consists of a domain name, path, query parameters, etc., meaning each access address contains a domain name. This domain name is the name of a computer or group of computers within a network, composed of a string of names separated by dots. Based on this, after receiving the domain name sent by the test server, the client can use the access address containing the received domain name as the network address to be utilized, thereby intercepting the URL and filtering out URLs relevant to the current test. This solution performs client-side traffic interception and can intercept traffic from various types of pages, such as Native pages, React Native (RN, a mobile platform development framework) pages, and HTML5 (Hypertext Markup Language) pages.

[0082] S104: Based on the access address to be utilized, obtain the test environment data required to achieve the target test requirements, so as to configure the test environment.

[0083] In one implementation, when the access address to be utilized is the access address for test environment data required to achieve the target test requirements, the client can obtain the data stored under that access address, i.e., the test environment data required to achieve the target test requirements, thereby configuring the test environment. The access address to be utilized can be: the access address for test environment data stored in a local database, and / or the access address for test environment data stored on an external network.

[0084] When the access address to be used is the access address for test environment data stored in the local database, the test environment data can be retrieved from the local database. When the access address to be used is the access address for test environment data stored on the external network, the test environment data can be retrieved from the external network. Therefore, this implementation allows for the retrieval of test environment data from either the local database or the external network using different access addresses, depending on the testing requirements, resulting in a richer collection of test environment data.

[0085] In another implementation, the access address to be used can also be the access address to be modified. In this case, the address information obtained by the client can also be the access address modification rules, used to instruct the client to modify the original access address that is unrelated to the target testing requirements to the access address that locates the test environment data that meets the target testing requirements. Thus, the client will no longer obtain data unrelated to the target testing requirements based on the original access address, but will obtain test environment data that meets the target testing requirements based on the modified access address. For example, in an A / B testing scenario, it is necessary to change version A of a program in the client to version B to implement testing of version B of the program. In this case, the access address to be used can be the access address of the data in version A of the program, and thus the access address to be used can be modified to the access address of version B of the program, thereby obtaining the data of version B of the program.

[0086] Once the client obtains the test environment data, it can load the acquired test environment data to complete the test environment configuration, and then use the test environment for testing.

[0087] In this embodiment, since the test server stores pre-configured configuration information for each test requirement, when the client obtains the target requirement identifier of the target test requirement, it can send the target requirement identifier to the test server. This allows the test server to determine the target configuration information that matches the target requirement identifier. The target configuration information is configured for each test requirement, and the configuration information for each test requirement includes the address information of the test environment data required to implement that test requirement. The client can then obtain the address information from the target configuration information and, based on this address information, filter out the access addresses configured for each program in the client to select the access addresses to be used by the programs related to the target test requirement. Therefore, test environment data can be obtained based on these access addresses. This solution allows for rapid acquisition of test environment data by obtaining the requirement identifier of the target test requirement, improving the efficiency of test environment configuration.

[0088] Optionally, in another embodiment of the present invention, the above-described test environment configuration system further includes: a proxy server; in this case, such as Figure 2 As shown, the test environment configuration method provided in this embodiment of the invention may include the following steps:

[0089] S201, Obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier;

[0090] S202, send the target requirement identifier to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; send the address information in the target configuration information to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0091] S203, Receive the address information sent by the test server, and based on the received address information, filter out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address of each program is: the access address of the data required to run the program.

[0092] The steps S201-S203 above are similar to steps S101-S103, and will not be repeated here.

[0093] S204, Send the access address to be used to the proxy server, so that after receiving the access address to be used, the proxy server can obtain the test environment data required to achieve the target test requirements based on the access address to be used, and send the obtained test environment data to the client.

[0094] Normally, a client can directly interact with a client server but cannot directly access other servers. However, in this embodiment, the test environment data that the client needs to obtain may come from different servers. Therefore, in this embodiment, a proxy server can be sent an access address to be used so that the proxy server can obtain the test environment data required to achieve the target test requirements based on the access address to be used. That is, the proxy server can access different servers and obtain the required test environment data, and then forward the obtained test environment data to the client.

[0095] Furthermore, the test server is specifically configured for testing needs and may not reside on the client server. Therefore, a proxy server can also be used to assist the interaction between the client and the test server. Utilizing a proxy server to retrieve data from the network also helps improve client response speed and enhances user experience. The client can pre-filter access addresses to be used, i.e., intercept the URLs to be sent, filtering out those relevant to the current test before sending them to the proxy server, which also reduces the number of requests and lowers bandwidth load.

[0096] In this step, after the client determines the access address to be used, the IP address corresponding to the access address to be used can be modified in the hosts file to the IP address of the proxy server. The domain name contained in the access address to be used is first modified to the domain name of the proxy server, thus enabling the access address to be used to be sent to the proxy server. To ensure that the access address to be used can be restored, the original domain name can be appended to the modified access address. When the proxy server receives the access address to be used with the modified domain name, it can restore the access address to be used based on the original domain name. Specifically, the proxy server's domain name in the modified access address is replaced with the original domain name, and then the original domain name appended to the modified access address is deleted, thus completing the restoration of the access address to be used.

[0097] S205 receives test environment data sent by the proxy server.

[0098] Once the proxy server obtains the test environment data required to achieve the target test requirements, it can send the obtained test environment data to the client. The client can then receive the test environment data sent by the proxy server to configure the test environment.

[0099] This embodiment improves the efficiency of configuring the test environment. Furthermore, by sending the access address to be utilized to the proxy server, the proxy server, upon receiving the access address, obtains the test environment data required to achieve the target test requirements based on the access address, and sends the obtained test environment data to the client, providing a foundation for the client to obtain test environment data and configure the test environment.

[0100] Optionally, in another embodiment of the present invention, the configuration information for each test requirement further includes an address modification rule; the address modification rule included in each configuration information is: indicating that the access address containing the domain name in the configuration information is modified to an access address pointing to the test environment data corresponding to the configuration information; in this case, the above-mentioned obtaining the test environment data required to achieve the target test requirement based on the access address to be utilized may include:

[0101] Step B1: Send the access address to be exploited and the client's client identifier to the proxy server. Upon receiving the access address and client identifier, the proxy server, based on a pre-established second correspondence between the client identifier and target configuration information, retrieves the address modification rules from the target configuration information corresponding to the client identifier from the test server. Following the retrieved address modification rules, the access address to be exploited is modified to obtain the target address. The target address is accessed to obtain the test environment data required to achieve the target test requirements, and the retrieved test environment data is sent to the client. The second correspondence is the correspondence established by the test server between the client identifier and the determined target configuration information after determining the configuration information corresponding to the target requirement identifier as the target configuration information.

[0102] The client identifier mentioned above can be the client's IP (Internet Protocol) address, the client's device ID (Identity document), or other similar identifiers.

[0103] In this step, before sending the access address to be used and the client's client identifier to the proxy server, the client's client identifier can be sent to the test server first. This allows the test server to establish a second correspondence between the client identifier and the target configuration information after determining the target configuration information. In other words, the client identifier is bound to the target configuration information, so that the proxy server can determine the corresponding target configuration information based on the client identifier.

[0104] In this implementation, after the test server determines the target configuration information, it can establish a correspondence between the obtained client identifier and the target configuration information. For example, during the implementation process, an association can be established between the client identifier and the storage address of the target configuration information, so that the storage address of the corresponding target configuration information can be found based on the client identifier. In this way, when multiple clients obtain configuration information from the test server, different clients can be distinguished.

[0105] Since the client will obtain various data required for running the program based on the pre-configured access address, including data unrelated to the target test requirements, and the client also needs to obtain test environment data related to the target test requirements, the access address to be used can be the access address of data unrelated to the target test requirements. By modifying the access address unrelated to the target test requirements to the target address related to the target test requirements, accessing the target address to obtain test environment data, and not obtaining data unrelated to the target test requirements from the access address unrelated to the target test requirements, the configuration of the test environment can be completed.

[0106] In the actual implementation, the process of modifying the access address and retrieving data based on the access address can be performed by the proxy server. After receiving the access address to be exploited and the client identifier, the proxy server can send a request carrying the client identifier to the test server. The test server can then determine the target configuration information based on the client identifier and send the address modification rules in the target configuration information to the proxy server. The proxy server can then modify the access address to be exploited according to the obtained address modification rules to obtain the target address.

[0107] The aforementioned address modification strategy can be an instruction to replace the access address to be modified with an access address pointing to the test environment data corresponding to the configuration information, or it can be an instruction to modify the parameter to be modified in the access address to be modified to a specified parameter, thereby modifying the access address to be modified to an access address pointing to the test environment data corresponding to the configuration information. The proxy server can modify the access address to be used into the target address according to the address modification rules. For example, it can directly replace the access address to be used with the target address according to the modification strategy, or it can modify the parameter to be modified in the access address to be used to a specified parameter, thereby modifying the access address to be used into the target address. Then, it accesses the target address, obtains the test environment data required to achieve the target test requirements, and sends the obtained test environment data to the client.

[0108] Step B2: Receive test environment data sent by the proxy server.

[0109] Once the proxy server obtains the test environment data required to achieve the target test requirements, it can send the obtained test environment data to the client. The client can then receive the test environment data sent by the proxy server to configure the test environment.

[0110] This embodiment improves the efficiency of configuring the test environment. Furthermore, by sending the access address to be exploited and the client's identifier to the proxy server, the proxy server, upon receiving the access address, retrieves the address modification rules from the target configuration information corresponding to the client identifier from the test server. Then, according to the retrieved address modification rules, it modifies the access address to obtain the target address, thereby enabling access to the target address, obtaining the test environment data required to achieve the target test requirements, and sending the obtained test environment data to the client. This provides a foundation for the client to obtain test environment data and configure the test environment. Moreover, by using the proxy server to modify access addresses unrelated to testing into those related to testing, the solution provided in this embodiment can be applied to scenarios where the client needs to replace program data to perform testing, improving the practicality of this solution.

[0111] This invention also provides a test environment configuration system, such as... Figure 3 As shown, the test environment configuration system includes a test server 301 and a client 302. The test server 301 stores configuration information pre-configured for each test requirement. The configuration information for each test requirement includes: the address information of the test environment data required to implement the test requirement; wherein:

[0112] Client 302 is used to obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier; and sends the target requirement identifier to test server 301.

[0113] The test server 301, upon receiving the target requirement identifier, determines the configuration information corresponding to the target requirement identifier from the stored configuration information based on the pre-established first correspondence between the requirement identifier and the configuration information, and uses it as the target configuration information; and sends the address information in the target configuration information to the client 302.

[0114] The client 302 is also used to, after receiving the address information sent by the test server 301, filter out the access addresses to be used from the access addresses configured for each program in the client 302 based on the received address information, and obtain the test environment data required to achieve the target test requirements based on the access addresses to be used, so as to configure the test environment; wherein, the access address of each program is: the access address of the data required to run the program.

[0115] Optionally, the address information includes: a domain name; based on the received address information, client 302 filters out the access addresses to be used from the access addresses configured for each program in client 302, including:

[0116] From the access addresses configured for each program in client 302, determine the access address containing the domain name in the received address information, and use it as the access address to be used.

[0117] Optionally, such as Figure 3 As shown, the test environment configuration system also includes: proxy server 303;

[0118] Client 302 is specifically used to send the access address to be used to the proxy server 303;

[0119] The proxy server 303 is used to obtain the test environment data required to achieve the target test requirements based on the access address to be exploited after receiving the access address to be exploited, and send the obtained test environment data to the client 302.

[0120] Client 302 is specifically used to receive test environment data sent by proxy server 303.

[0121] Optionally, the configuration information for each test requirement also includes address modification rules; the address modification rules included in each configuration information are: indicating that the access address containing the domain name in the configuration information should be modified to the access address pointing to the test environment data corresponding to the configuration information.

[0122] Client 302 is specifically used to send the target requirement identifier and the client identifier of client 302 to the test server 301;

[0123] Test server 301 is specifically used to receive the target requirement identifier and the client identifier, and after determining the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and using it as the target configuration information, establish a second correspondence between the client identifier and the target configuration information.

[0124] Client 302 is specifically used to send the access address to be used and the client identifier to the proxy server 303;

[0125] Proxy server 303 is specifically used to send an address modification rule retrieval instruction to test server 301 after receiving the access address to be used and the client identifier; wherein, the address modification rule retrieval instruction carries the client identifier;

[0126] The test server 301 is also used to, after receiving the information acquisition instruction, determine the target configuration information corresponding to the client identifier carried in the information acquisition instruction based on the second correspondence; and send the address modification rules in the target configuration information to the proxy server 303.

[0127] The proxy server 303 is also used to modify the access address to be used according to the received address modification rules after receiving the address modification rules from the test server 301, so as to obtain the target address; and to obtain the test environment data required to achieve the target test requirements based on the target address.

[0128] Optionally, the client 302 obtains the requirement identifier of the target test requirement, including:

[0129] Obtain a QR code generated in advance based on the requirement identifier of the target testing requirements;

[0130] The obtained QR code is parsed to obtain the requirement identifier of the target test requirement.

[0131] To make it easier to understand, the following will be combined with... Figures 4-5 The test environment configuration system provided in the embodiments of the present invention will be described exemplarily.

[0132] In one implementation, the interaction process between the various parts of the test environment configuration system provided in this embodiment of the invention can be as follows: Figure 4 As shown:

[0133] First, the client obtains the target requirement identifier of the target test requirement (S1); sends the target requirement identifier and the client identifier to the test server (S2); the test server determines the target configuration information based on the target requirement identifier and establishes the correspondence between the client identifier and the target configuration information (S3); and sends the domain name in the target configuration information to the client (S4).

[0134] The client determines the access address containing the received domain name (S5); and sends the determined access address and client identifier to the proxy server (S6).

[0135] The proxy server obtains the target configuration information based on the client identifier (S7); if there is an address modification policy in the target configuration information, it modifies the access address to the target address according to the address modification policy in the target configuration information, and obtains the test environment data based on the target address (S8); finally, it sends the obtained test environment data to the client (S9).

[0136] In practical applications, the test environment configuration system provided in this embodiment of the invention can be as follows: Figure 5 As shown:

[0137] The front-end provides functions for creating, modifying, viewing, and searching configuration information. Configuration can be performed on the front-end page, and after configuring each test requirement, a QR code for that requirement can be generated. This QR code can be uploaded to the PMS (Project Management System) for retrieval when needed. Test environment data, including mock data (simulated data used for program testing), can be pre-stored in the local database.

[0138] When testing is required, a QR code can be obtained from the PMS according to the target test requirements. The client scans the obtained QR code, parses it to obtain the target requirement identifier of the target test requirements, and sends the target requirement identifier and client identifier to the test server to achieve binding with the test server.

[0139] The test server determines the target configuration information based on the target requirement identifier, establishes the correspondence between the client identifier and the target configuration information, and sends the domain name in the target configuration information to the client.

[0140] The client determines the access address containing the received domain name and sends the determined access address and client identifier to the proxy server;

[0141] The proxy server obtains the target configuration information based on the client identifier. If the target configuration information contains an address modification policy, it modifies the access address to the target address according to the address modification policy and obtains the test environment data based on the target address. When the target address is the network address of an external service, the proxy server can obtain data from the external service; when the target address is the network address of a local database, the proxy server can obtain the test environment data from the local database. Finally, it sends the obtained test environment data to the client.

[0142] In the above process, the data required by the test server can be stored in MySQL (a relational database management system); the client connects to the proxy server through a DNS server, and the client can configure test environments for multiple test requirements simultaneously on different pages, switching between different test environments by switching pages. The entire process can also be monitored using a monitoring service.

[0143] In this embodiment, since the test server stores pre-configured configuration information for each test requirement, when the client obtains the target requirement identifier of the target test requirement, it can send the target requirement identifier to the test server. This allows the test server to determine the target configuration information that matches the target requirement identifier. The target configuration information is configured for each test requirement, and the configuration information for each test requirement includes the address information of the test environment data required to implement that test requirement. The client can then obtain the address information from the target configuration information and, based on this address information, filter out the access addresses configured for each program in the client to select the access addresses to be used by the programs related to the target test requirement. Therefore, test environment data can be obtained based on these access addresses. This solution allows for rapid acquisition of test environment data by obtaining the requirement identifier of the target test requirement, improving the efficiency of test environment configuration.

[0144] This invention also provides a test environment configuration device, applied to a client of a test environment configuration system. The test environment configuration system further includes a test server, which stores pre-configured configuration information for each test requirement. The configuration information for each test requirement includes: address information of the test environment data required to implement that test requirement; such as... Figure 6 As shown, the device includes:

[0145] The requirement identifier acquisition module 601 is used to acquire the requirement identifier of the target test requirement and use it as the target requirement identifier.

[0146] The configuration information determination module 602 is used to send the target requirement identifier to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; and sends the address information in the target configuration information to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier;

[0147] The access address filtering module 603 is used to receive the address information sent by the test server, and based on the received address information, filter out the access addresses to be used from the access addresses configured for each program in the client; wherein, the access address of each program is: the access address of the data required to run the program.

[0148] The data acquisition module 604 is used to acquire the test environment data required to achieve the target test requirements based on the access address to be utilized, so as to configure the test environment.

[0149] Optionally, the address information includes: a domain name; the access address filtering module is specifically used for:

[0150] From the access addresses configured for each program in the client, determine the access address containing the domain name in the received address information, and use it as the access address to be used.

[0151] Optionally, the test environment configuration system further includes: a proxy server; the data acquisition module includes:

[0152] The first address sending submodule is used to send the access address to be used to the proxy server, so that after receiving the access address to be used, the proxy server can obtain the test environment data required to achieve the target test requirements based on the access address to be used, and send the obtained test environment data to the client.

[0153] The first data receiving submodule is used to receive test environment data sent by the proxy server.

[0154] Optionally, the configuration information for each test requirement also includes address modification rules; the address modification rules included in each configuration information are: indicating that the access address containing the domain name in the configuration information will be modified to an access address pointing to the test environment data corresponding to the configuration information; the data acquisition module includes:

[0155] The second address sending submodule is used to send the access address to be used and the client identifier of the client to the proxy server, so that after receiving the access address to be used and the client identifier, the proxy server, based on a pre-established second correspondence between the client identifier and the target configuration information, obtains the address modification rule in the target configuration information corresponding to the client identifier from the test server; modifies the access address to be used according to the obtained address modification rule to obtain the target address; accesses the target address to obtain the test environment data required to achieve the target test requirement, and sends the obtained test environment data to the client; wherein, the second correspondence is: after the test server determines the configuration information corresponding to the target requirement identifier as the target configuration information, it establishes a correspondence between the client identifier and the determined target configuration information;

[0156] The second data receiving submodule is used to receive test environment data sent by the proxy server.

[0157] The aforementioned requirement identifier acquisition module includes:

[0158] The QR code acquisition submodule is used to acquire the QR code generated in advance based on the requirement identifier for the target testing needs;

[0159] The parsing submodule is used to parse the acquired QR code to obtain the requirement identifier of the target test requirement.

[0160] This invention also provides an electronic device, such as... Figure 7 As shown, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0161] Memory 703 is used to store computer programs;

[0162] When the processor 701 executes the program stored in the memory 703, it implements the steps of the above-described test environment configuration method.

[0163] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0164] The communication interface is used for communication between the aforementioned terminal and other devices.

[0165] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0166] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0167] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements the above-described test environment configuration method.

[0168] In another embodiment of the present invention, a computer program product including instructions is also provided, which, when run on a computer, causes the computer to execute the above-described test environment configuration method.

[0169] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0170] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0171] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the method embodiments are basically similar to the system embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0172] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for configuring a test environment, characterized in that, A client application for a test environment configuration system, the test environment configuration system further including a test server, the test server storing pre-configured configuration information for each test requirement, the configuration information for each test requirement including: address information of the test environment data required to implement the test requirement, different test requirements being the test environment data requirements of different programs under different test types, the address information including a domain name; the method includes: Obtain the requirement identifier of the target test requirement, and use it as the target requirement identifier; The target requirement identifier is sent to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; the address information in the target configuration information is sent to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier; The system receives address information sent by the test server and determines, from the access addresses configured for each program in the client, the access address containing the domain name in the received address information, as the access address to be used; wherein, the access address is a URL, and the access address for each program is the access address for the data required to run the program. Based on the access address to be utilized, obtain the test environment data required to achieve the target test requirements, so as to configure the test environment.

2. The method according to claim 1, characterized in that, The test environment configuration system also includes: a proxy server; The step of obtaining the test environment data required to achieve the target test requirements based on the access address to be utilized includes: The proxy server sends the access address to be used, so that after receiving the access address to be used, the proxy server obtains the test environment data required to achieve the target test requirements based on the access address to be used, and sends the obtained test environment data to the client. Receive test environment data sent by the proxy server.

3. The method according to claim 2, characterized in that, Each test requirement's configuration information also includes address modification rules; the address modification rules included in each configuration information are: to modify the access address containing the domain name in the configuration information to the access address pointing to the test environment data corresponding to the configuration information; The step of obtaining the test environment data required to achieve the target test requirements based on the access address to be utilized includes: The proxy server sends the access address to be used and the client's client identifier to the proxy server. Upon receiving the access address to be used and the client identifier, the proxy server, based on a pre-established second correspondence between the client identifier and the target configuration information, retrieves the address modification rules from the target configuration information corresponding to the client identifier from the test server. It then modifies the access address to be used according to the retrieved address modification rules to obtain the target address. The proxy server accesses the target address, retrieves the test environment data required to achieve the target test requirement, and sends the retrieved test environment data to the client. The second correspondence is a relationship established by the test server between the client identifier and the determined target configuration information after determining the configuration information corresponding to the target requirement identifier as the target configuration information. Receive test environment data sent by the proxy server.

4. The method according to claim 1, characterized in that, The requirement identifier for obtaining the target test requirement includes: Obtain a QR code generated in advance based on the requirement identifier of the target testing requirements; The requirement identifier of the target test requirement is obtained by parsing the acquired QR code.

5. A test environment configuration system, characterized in that, The test environment configuration system includes a test server and a client. The test server stores pre-configured configuration information for each test requirement. The configuration information for each test requirement includes the address information of the test environment data required to implement that test requirement. Different test requirements represent the test environment data requirements of different programs under different test types. The address information includes a domain name. The client is used to obtain the requirement identifier of the target test requirement as the target requirement identifier; and send the target requirement identifier to the test server. The test server, upon receiving the target requirement identifier, determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and configuration information, and uses this as the target configuration information; and sends the address information in the target configuration information to the client. The client is further configured to, after receiving the address information sent by the test server, determine, from the access addresses configured for each program in the client, an access address containing the domain name in the received address information, as the access address to be used, and based on the access address to be used, obtain the test environment data required to achieve the target test requirements, so as to configure the test environment; wherein, the access address is a URL, and the access address of each program is: the access address of the data required to run the program.

6. The system according to claim 5, characterized in that, The test environment configuration system also includes: a proxy server; The client is specifically used to send the access address to be used to the proxy server; The proxy server is configured to, upon receiving the access address to be exploited, obtain the test environment data required to achieve the target test requirements based on the access address to be exploited, and send the obtained test environment data to the client. The client is specifically used to receive test environment data sent by the proxy server.

7. A test environment configuration device, characterized in that, A client application for a test environment configuration system, the test environment configuration system further including a test server, the test server storing pre-configured configuration information for each test requirement, the configuration information for each test requirement including: address information of the test environment data required to implement the test requirement, different test requirements being the test environment data requirements of different programs under different test types, the address information including a domain name; the device includes: The requirement identifier acquisition module is used to acquire the requirement identifier of the target test requirement, and use it as the target requirement identifier. The configuration information determination module is used to send the target requirement identifier to the test server, so that after receiving the target requirement identifier, the test server determines the configuration information corresponding to the target requirement identifier from the stored configuration information according to the first correspondence between the pre-established requirement identifier and the configuration information, and uses it as the target configuration information; and sends the address information in the target configuration information to the client; wherein, the configuration information corresponding to each requirement identifier is: the configuration information pre-configured for the test requirement marked by the requirement identifier; The access address filtering module is used to receive address information sent by the test server and determine the access address containing the domain name in the received address information from the access addresses configured for each program in the client, as the access address to be used; wherein, the access address is a URL, and the access address of each program is the access address of the data required to run the program. The data acquisition module is used to acquire the test environment data required to achieve the target test requirements based on the access address to be utilized, so as to configure the test environment.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-4.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Test environment accessing method and proxy server

    CN105430108A

  • Data access method, computer equipment and storage medium

    CN111711713A

  • Access method and device of application server and storage medium

    CN113965543A