A multi-environment independent gateway system with isomorphic production and testing and a software testing method

By adopting a multi-environment independent gateway system with production test isomorphism in software testing environment, the configuration problems caused by different domain names of production and test environments in traditional testing environments are solved, and the isomorphism between the test environment and the production environment is realized, and the test environment is improved. stability and human effect.

CN114531323BActive Publication Date: 2024-11-29BEIJING YUNSIZHIXUE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210119456.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-08
Publication Date
2024-11-29
Estimated Expiration
2042-02-08

AI Technical Summary

Technical Problem

Due to the different access domain names of production and testing in traditional software testing, different routing configurations are required for the production and testing gateways. There is a risk that the test environment test passes but does not take effect online. At the same time, the unified gateway configuration error affects the stability of other environments. , and requires high-authority users to modify, making it easy to have single-point bottlenecks.

Method used

Using a production test isomorphic multi-environment independent gateway system, the network request is unified through the inlet gateway and the access domain name is rewrite to the production environment isomorphic domain name, and forward it to the independent gateway. The independent gateway is responsible for forwarding the request to the corresponding software Service, implement a test environment with the same configuration as the production environment.

Benefits of technology

Implement isomorphism of production and testing environments, avoiding the problem of inconsistency between the test environment and the online environment, reducing the cost of deploying the test environment, improving the stability of the test environment, reducing the dependence on high-authority users, and improving the Human effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114531323B_ABST
    Figure CN114531323B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-environment independent gateway system with isomorphic production and testing, including: an entry gateway, which serves as a unified entry for all network requests in a software testing environment; an independent gateway, which forwards network requests to a software service to configure a test environment isomorphic to a production environment, and includes multiple independent gateways, and different independent gateways can forward network requests to different software services to configure different test environments; the entry gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can configure a corresponding test environment according to the test environment requirements, and the independent gateway receives the network request assigned by the entry gateway and forwards it to the corresponding software service, so as to implement testing in a test environment with the same configuration as the production environment. The present invention adopts the implementation of an independent independent gateway isomorphic to the production environment and the method of forwarding from the unified entry gateway to the independent gateway entry, so as to separate responsibilities and achieve simple implementation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing, and in particular to a multi-environment independent gateway system with isomorphic production and testing structure and a software testing method. Background Art

[0002] Production environment: The operating environment of the software that provides services to real online users, including servers, networks, etc.

[0003] Test environment: Software developers need to test software before deploying it to the production environment. The environment where the test software is located is called the test environment. Since it is provided to different developers, there will be multiple environments created by different users (R&D or QA). Each environment is a subset of the production environment software set.

[0004] Gateway: A device that receives all user network request traffic and forwards the requests to specific software services.

[0005] Based on the fact that the production environment and the test environment have different access domain names, the domain name configuration for the test environment in traditional scenarios is modified based on a unified entry gateway configuration, and the access routing rules for the software in all user environments are configured on this gateway. Therefore, the following problems will occur:

[0006] The first problem: In traditional scenarios, due to the different access domain names of production and testing, different routing configurations need to be made for the production and test gateways, which leads to different structures of production and testing. Ultimately, there is a risk that the test environment test passes but does not take effect online.

[0007] The second problem: Since all test environments are configured with a unified gateway entry, when a certain environment has characteristic requirements such as configuration forwarding, current limiting, etc., the unified gateway entry configuration needs to be changed. At this time, there is a risk that incorrect configuration will affect other environments, reducing the stability of the entire test environment.

[0008] The third problem: Since the routing configuration of all environments needs to be changed to a unified gateway entrance, a certain type of user with higher permissions (such as operation and maintenance or test leaders) is required to make the changes, which may easily lead to a single point bottleneck where no one responds because these people are on vacation or busy with work.

[0009] In view of this, the present invention patent is proposed. Summary of the invention

[0010] In order to solve the above problems, the present invention provides a multi-environment independent gateway system and a software testing method for isomorphic production and testing. Specifically, the following technical solutions are adopted:

[0011] A multi-environment independent gateway system with homogeneous production and testing, comprising:

[0012] The entry gateway serves as a unified entry point for all network requests in the software testing environment;

[0013] An independent gateway forwards network requests to a software service to configure a test environment that is isomorphic to the production environment. The independent gateway includes multiple independent gateways, and different independent gateways can forward network requests to different software services to configure different test environments.

[0014] The entry gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can be configured with the corresponding test environment according to the test environment requirements. The independent gateway receives the network request assigned by the entry gateway and forwards the received network request to the corresponding software service, thereby realizing testing in a test environment with the same configuration as the production environment.

[0015] As an optional implementation mode of the present invention, in a multi-environment independent gateway system with isomorphic production and testing described in this embodiment, the access domain name of the network request received by the entry gateway is composed of the access domain name of the production environment and the test environment name, and the entry gateway parses the test environment name in the access domain name of the network request, and forwards the network request to the independent gateway that can be configured with the corresponding test environment according to the test environment name;

[0016] Optionally, the format of the access domain name of the network request is: www.xx-{env}.domain name suffix, where the xx part is the access domain name of the production environment, and the {env} part is the name of the test environment.

[0017] As an optional implementation of the present invention, in a multi-environment independent gateway system with isomorphic production and testing described in this embodiment, the entry gateway further includes: rewriting the access domain name of the network request to the access domain name of the production environment before forwarding the network request to the independent gateway that can be configured with the corresponding test environment;

[0018] Optionally, before forwarding the network request to an independent gateway that can be configured with a corresponding test environment, the entry gateway rewrites the access domain name "www.xx-{env}.domain name suffix" of the network request into the access domain name "www.xx.domain name suffix" of the production environment.

[0019] As an optional implementation of the present invention, the present embodiment describes a multi-environment independent gateway system with isomorphic production and testing, wherein the software testing environment has multiple software services, and the independent gateway configures accessible software services according to the required test environment; each independent gateway configures a corresponding test environment that is independent of each other.

[0020] As an optional implementation of the present invention, the present embodiment describes a multi-environment independent gateway system with isomorphic production and testing. After the test environment is configured, the independent gateway can be reconfigured according to the user's personal environment configuration or the need for modification before going online.

[0021] The present invention also provides a method for performing software testing using the multi-environment independent gateway system with isomorphic production and testing, comprising:

[0022] The entry gateway uniformly accesses all network requests for software testing;

[0023] The entry gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can be configured with the corresponding test environment according to the test environment requirements;

[0024] The independent gateway receives the network request assigned by the ingress gateway, and forwards the received network request to the corresponding software service, and configures and implements the test environment with the same configuration as the production environment for testing.

[0025] As an optional implementation manner of the present invention, in the method for software testing described in this embodiment, the access domain name of the network request received by the ingress gateway is composed of the access domain name of the production environment and the name of the test environment;

[0026] The entry gateway resolves the test environment name in the access domain name of the network request;

[0027] Rewrite the access domain name of the network request to the access domain name of the production environment;

[0028] According to the test environment name, the network request is rewritten into the access domain name of the production environment and forwarded to an independent gateway that can be configured with the corresponding test environment.

[0029] As an optional implementation manner of the present invention, the software testing method described in this embodiment is characterized in that the multi-environment independent gateway system with isomorphic production and testing presets multiple different test environments, and each test environment corresponds to a different independent gateway;

[0030] The domain name of the network request is generated by combining the access domain name in the production environment received from the user and the test environment name corresponding to the selected preset test environment. The generated domain name of the network request can be accessed by the entry gateway.

[0031] As an optional implementation of the present invention, in the software testing method described in this embodiment, after the independent gateway forwards the network request to the corresponding software service and configures the test environment,

[0032] When receiving the user's personal environment configuration or pre-launch transformation instructions, the independent gateway can be configured according to the instructions to build a new test environment that meets the personal environment configuration or pre-launch transformation requirements;

[0033] The network request is forwarded by the independent gateway to a new test environment for testing.

[0034] The present invention also provides a storage medium storing a computer executable program, and when the computer executable program is executed, the software testing method is implemented.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The present invention provides a multi-environment independent gateway system with isomorphism between production and testing. The entire test environment is provided with a unified entry gateway, and each test environment is provided with an independent gateway as an independent gateway entry. The unified entry gateway has only one function, which is to forward network requests to the independent gateway of the corresponding test environment, and rewrite the network request domain name to the domain name of the production environment. At this time, the network request received by the independent gateway entry of the personal environment will have the same domain name as the production environment, thus achieving the purpose of isomorphism between production and testing. At this time, as long as the independent gateway entry uses the same configuration as the gateway of the production environment, the behaviors of production and testing can be completely consistent.

[0037] The present invention provides a multi-environment independent gateway system with isomorphism in production and testing. Since the network request traffic of each personal environment is received by an independent gateway entrance, the special needs of the personal environment and the transformation before going online can be configured on this independent gateway, so that other test environments will not be affected at all. There is no need for a person with high authority to operate it, and it can be operated by the owner of the environment himself.

[0038] Therefore, the multi-environment independent gateway system of the present invention, which is isomorphic to production and testing, uses an independent gateway that is isomorphic to the production environment and forwards from a unified entry gateway to an independent gateway entry, and has the following technical effects:

[0039] First of all, the unified entry gateway only needs to forward network requests to the independent gateway entry of each environment. It no longer needs to forward them to the specific software services of each environment. This separates responsibilities and makes implementation simple.

[0040] Secondly, the independent gateway entrance of each environment is responsible for receiving network requests of this environment and forwarding them to specific software services. It is completely consistent with the gateway behavior of the production environment, which can reduce the cost of deploying a set of test environments. The isomorphic conditions also eliminate the risk of inconsistency in production testing.

[0041] Finally, each test environment is independent of each other, which also reduces the corresponding gateway permissions. It is no longer necessary for certain users with high permissions to perform unified maintenance, thus improving labor efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A system diagram of a multi-environment independent gateway system with homogeneous production and testing according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] To make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0044] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the invention claimed for protection, but merely represents some embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0046] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0047] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the invention product is usually placed when in use, or the orientation or positional relationship commonly understood by those skilled in the art. Such terms are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0048] See also Figure 1 As shown, a multi-environment independent gateway system with homogeneous production and testing in this embodiment includes:

[0049] The entry gateway serves as a unified entry point for all network requests in the software testing environment;

[0050] An independent gateway forwards network requests to a software service to configure a test environment that is isomorphic to the production environment. The independent gateway includes multiple independent gateways, and different independent gateways can forward network requests to different software services to configure different test environments.

[0051] The entry gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can be configured with the corresponding test environment according to the test environment requirements. The independent gateway receives the network request assigned by the entry gateway and forwards the received network request to the corresponding software service, thereby realizing testing in a test environment with the same configuration as the production environment.

[0052] In this embodiment, a multi-environment independent gateway system with isomorphism between production and testing is provided. A unified entry gateway is set for the entire test environment, and an independent gateway is set for each test environment as an independent gateway entry. The unified entry gateway has only one function, which is to forward the network request to the independent gateway of the corresponding test environment, and rewrite the network request domain name to the domain name of the production environment. At this time, the network request received by the independent gateway entry of the personal environment will have the same domain name as the production environment, thus achieving the purpose of isomorphism between production and testing. At this time, as long as the independent gateway entry uses the same configuration as the gateway of the production environment, the behavior of production and testing can be completely consistent. In this way, the first problem in the background technology is perfectly solved: in traditional scenarios, due to the different access domain names of production and testing, different routing configurations need to be made for the gateways of production and testing, which leads to different structures of production and testing, and ultimately there is a risk that the test environment test passes but does not take effect online.

[0053] Next, since the network request traffic of each personal environment is received by an independent gateway entrance, the special needs of the personal environment and the transformation before going online can be configured on this independent gateway, so that other test environments will not be affected at all, and there is no need for a class of people with high authority to operate, and the environment owner can operate it himself. In this way, the second technical problem in the background technology is solved: since all test environments are configured by a unified gateway entrance, when a certain environment has characteristic requirements such as configuration forwarding, current limiting, etc., it is necessary to modify the unified gateway entrance configuration. At this time, there is a risk that the wrong configuration affects other environments, reducing the stability of the entire test environment; and the third technical problem: since the routing configuration of all environments needs to be changed to the unified gateway entrance, a certain type of user with higher authority (such as operation and maintenance or test leader) is required to make modifications, which is prone to single-point bottlenecks caused by no response due to these people being on vacation or busy at work.

[0054] Therefore, a multi-environment independent gateway system with isomorphic production and testing in this embodiment adopts the implementation of an independent gateway that is isomorphic to the production environment and forwards from a unified entry gateway to an independent gateway entry, which has the following technical effects:

[0055] First of all, the unified entry gateway only needs to forward network requests to the independent gateway entry of each environment. It no longer needs to forward them to the specific software services of each environment. This separates responsibilities and makes implementation simple.

[0056] Secondly, the independent gateway entrance of each environment is responsible for receiving network requests of the test environment and forwarding them to specific software services. It is completely consistent with the gateway behavior of the production environment, which can reduce the cost of deploying a set of test environments. The isomorphic conditions also eliminate the risk of inconsistency in production testing.

[0057] Finally, each test environment is independent of each other, which also reduces the corresponding gateway permissions. It is no longer necessary for certain users with high permissions to perform unified maintenance, thus improving labor efficiency.

[0058] As an optional implementation of this embodiment, the access domain name of the network request received by the entry gateway is composed of the access domain name of the production environment and the test environment name. The entry gateway parses the test environment name in the access domain name of the network request, and forwards the network request to an independent gateway that can be configured with the corresponding test environment according to the test environment name.

[0059] In order to ensure that all network requests are uniformly accessed by the entry gateway, unified requirements are set for the access domain name format of network requests. The access domain name of network requests consists of the access domain name of the production environment and the name of the test environment. The access domain name of the production environment is used to make the test environment the same as the production environment, and the test environment name is used to facilitate the entry gateway to forward network requests to the corresponding independent gateway.

[0060] In order to facilitate the entry gateway to parse the test environment name in the access domain name of the network request, the test environment name in the access domain name of the network request in this embodiment is separately identified by an identifier. Optionally, the format of the access domain name of the network request is: www.xx-{env}.domain name suffix, where the xx part is the access domain name of the production environment, and the {env} part is the name of the test environment. The domain name suffix, also known as the top-level domain name, refers to a symbol representing a domain name type. Domain names with different suffixes have different meanings. Domain names are divided into two categories: country domain names (ccTLD), such as China's .cn, the United States' .us, Russia's .ru, and international general domain names (gTLD), such as .com, .xyz, .top, .wang, pub, .xin, .net, etc. There are more than 1,000 types. All domain name suffixes have the same function, only the appearance and the meaning themselves are different.

[0061] In a multi-environment independent gateway system with isomorphic production and testing of this embodiment, the entry gateway further includes: rewriting the access domain name of the network request to the access domain name of the production environment before forwarding the network request to the independent gateway that can be configured with the corresponding test environment. Since the name of the test environment in the access domain name of this embodiment (the {env} part) is only used by the entry gateway to identify the test environment to be accessed by the network request, it can be deleted after the entry gateway completes the identification. After deletion, it will not affect the integrity of the access domain name of the network request, and the access domain name with the name of the test environment deleted is completely consistent with the access domain name of the production environment, so that the purpose of isomorphism between production and testing is achieved. At this time, as long as the independent gateway entrance uses the same configuration as the gateway of the production environment, the behavior of production and testing can be completely consistent. Optionally, before forwarding the network request to the independent gateway that can be configured with the corresponding test environment, the entry gateway rewrites the access domain name "www.xx-{env}.domain name suffix" of the network request to the access domain name "www.xx.domain name suffix" of the production environment.

[0062] As an optional implementation of this embodiment, the software testing environment has multiple software services, and the independent gateway configures accessible software services according to the required testing environment; each independent gateway configures a corresponding testing environment that is independent of each other.

[0063] like Figure 1 As shown, the software test environment of this embodiment has software service a, software service b and software service c, and the independent gateway of this embodiment includes a first independent gateway, a second independent gateway and a third independent gateway. The first independent gateway is used to forward network requests to the test environment x composed of software service a, software service b and software service c, the second independent gateway is used to forward network requests to the test environment y composed of software service a and software service c, and the third independent gateway is used to forward network requests to the test environment z composed of software service a and software service b. The test environments x, y and z of this embodiment are independent of each other, and network requests are forwarded by the independent first independent gateway, the second independent gateway and the third independent gateway respectively.

[0064] As an optional implementation of this embodiment, the multi-environment independent gateway system with isomorphic production and testing described in this embodiment can be reconfigured according to the user's personal environment configuration or the need for pre-launch modification after the test environment is configured. Since the multi-environment independent gateway system with isomorphic production and testing described in this embodiment configures all test environments with independent independent gateways, when a certain test environment has characteristic requirements such as configuration forwarding, current limiting, etc., it is necessary to change the independent gateway entry configuration of the test environment, which will not affect other test environments, thereby improving the stability of the entire test environment.

[0065] In addition, since the routing configuration of each test environment is implemented by maintenance personnel with general permissions by modifying their respective independent gateways, the test environment no longer requires a certain type of user with higher permissions (such as operation and maintenance or test leaders) to make modifications, avoiding single-point bottlenecks where no one responds because these people are on vacation or busy with work.

[0066] This embodiment also provides a method for performing software testing using the multi-environment independent gateway system with isomorphic production and testing, including:

[0067] The entry gateway uniformly accesses all network requests for software testing;

[0068] The ingress gateway forwards the received network request to an independent gateway that can be configured with a corresponding test environment according to the test environment requirements;

[0069] The independent gateway receives the network request assigned by the ingress gateway, forwards the received network request to the corresponding software service, and configures a test environment isomorphic to the production environment for testing.

[0070] The method of software testing in this embodiment adopts a multi-environment independent gateway system with isomorphism between production and testing. A unified entry gateway is set for the entire test environment, and an independent gateway is set for each test environment as an independent gateway entry. The unified entry gateway only performs one function, which is to forward the network request to the independent gateway of the corresponding test environment, and rewrite the network request domain name to the domain name of the production environment. At this time, the network request received by the independent gateway entry of the personal environment will have the same domain name as the production environment, so that the purpose of isomorphism between production and testing is achieved. At this time, as long as the independent gateway entry uses the same configuration as the gateway of the production environment, the behavior of production and testing can be completely consistent. In this way, the first problem in the background technology is perfectly solved: in traditional scenarios, due to the different access domain names of the software testing environment and the production environment, different routing configurations need to be made for the gateways of production and testing, which leads to different structures of production and testing, and ultimately there is a risk that the test environment passes the test but does not take effect online.

[0071] Next, in the software testing method of this embodiment, since the network request traffic of each personal environment is received by an independent gateway entrance, the special needs of the personal environment and the transformation before going online can be configured on this independent gateway, so that other test environments will not be affected at all, and there is no need for a class of people with high permissions to operate it, and it can be operated by the owner of the environment himself.

[0072] In this way, in the software testing method of this embodiment, each test environment is configured by its own independent gateway. When a certain environment has characteristic requirements such as configuration forwarding, current limiting, etc., it is only necessary to modify the independent gateway entry configuration corresponding to the test environment. Other test environments will not be affected by the incorrect configuration of a certain independent gateway, thereby improving the stability of the entire test environment.

[0073] In the software testing method of this embodiment, each test environment is configured by its own independent gateway. When the gateway of a test environment needs to be modified, any maintenance personnel can achieve it by modifying the independent gateway corresponding to the test environment. There is no need to modify it through a certain type of user with higher authority (such as operation and maintenance or test leader), avoiding single-point bottlenecks where no one responds due to these people being on vacation or busy at work.

[0074] Therefore, in the software testing method of this embodiment, a mutually independent software testing environment is constructed by a multi-environment independent gateway system that is isomorphic to production and testing. The multi-environment independent gateway system that is isomorphic to production and testing uses an independent gateway that is isomorphic to the production environment and forwards from a unified entry gateway to an independent gateway entry, which has the following technical effects:

[0075] First of all, the unified entry gateway of the production and testing isomorphic multi-environment independent gateway system only needs to forward network requests to the independent gateway entry of each environment, and no longer needs to forward them to the specific software services of each environment, which separates responsibilities and simplifies implementation.

[0076] Secondly, the independent gateway entrance of each test environment is responsible for receiving network requests of this environment and forwarding them to specific software services. It is completely consistent with the gateway behavior of the production environment, which can reduce the cost of deploying a set of test environments. The isomorphic conditions also eliminate the risk of inconsistency in production testing.

[0077] Finally, each test environment is independent of each other, which also reduces the corresponding gateway permissions. It is no longer necessary for certain users with high permissions to perform unified maintenance, thus improving labor efficiency.

[0078] As an optional implementation of this embodiment, in the software testing method described in this embodiment:

[0079] The access domain name of the network request received by the ingress gateway is composed of the access domain name of the production environment and the name of the test environment;

[0080] The entry gateway resolves the test environment name in the access domain name of the network request;

[0081] Rewrite the access domain name of the network request to the access domain name of the production environment;

[0082] According to the test environment name, the network request is rewritten into the access domain name of the production environment and forwarded to an independent gateway that can be configured with the corresponding test environment.

[0083] In order to ensure that all network requests are uniformly accessed by the entry gateway, unified requirements are set for the access domain name format of network requests. The access domain name of network requests consists of the access domain name of the production environment and the name of the test environment. The access domain name of the production environment is used to make the test environment the same as the production environment, and the test environment name is used to facilitate the entry gateway to forward network requests to the corresponding independent gateway.

[0084] In order to facilitate the ingress gateway to parse out the test environment name in the access domain name of the network request, the test environment name in the access domain name of the network request in this embodiment is separately identified by an identifier.

[0085] Optionally, the format of the access domain name of the network request is: www.xx-{env}.domain name suffix, where the xx part is the access domain name of the production environment, and the {env} part is the name of the test environment. The domain name suffix, also known as the top-level domain name, refers to the symbol that represents a domain name type. Domain names with different suffixes have different meanings. Domain names are divided into two categories: country domain names (ccTLD), such as China's .cn, the United States' .us, Russia's .ru, and international generic domain names (gTLD), such as .com, .xyz, .top, .wang, pub, .xin, .net and more than 1,000 types. All domain name suffixes have the same function, only the appearance and the meaning themselves are different.

[0086] In addition, since the name of the test environment in the access domain name of this embodiment (the {env} part) is only used by the entry gateway to identify the test environment to be accessed by the network request, it can be deleted after the entry gateway completes the identification. The deletion will not affect the integrity of the access domain name of the network request, and the access domain name with the name of the test environment deleted remains completely consistent with the access domain name of the production environment, thus achieving the purpose of production and test isomorphism. At this time, as long as the independent gateway entry uses the same configuration as the gateway of the production environment, the production and test behaviors can be completely consistent. Optionally, the entry gateway rewrites the access domain name "www.xx-{env}.domain name suffix" of the network request to the access domain name "www.xx.domain name suffix" of the production environment before forwarding the network request to the independent gateway that can be configured with the corresponding test environment.

[0087] As an optional implementation of this embodiment, the software testing method described in this embodiment, the multi-environment independent gateway system for production and testing isomorphism presets multiple different test environments, each test environment corresponds to a different independent gateway; each independent gateway is configured with a test environment that is independent of each other.

[0088] As shown in the figure, the software testing environment of this embodiment has software service a, software service b and software service c. The independent gateways of this embodiment include a first independent gateway, a second independent gateway and a third independent gateway. The first independent gateway is used to forward network requests to the test environment x composed of software service a, software service b and software service c, the second independent gateway is used to forward network requests to the test environment y composed of software service a and software service c, and the third independent gateway is used to forward network requests to the test environment z composed of software service a and software service b. The test environments x, y and z of this embodiment are independent of each other, and network requests are forwarded by the independent first independent gateway, the second independent gateway and the third independent gateway respectively.

[0089] As an optional implementation of this embodiment, the software testing method described in this embodiment, the domain name of the network request is generated by combining the access domain name in the production environment received as input by the user and the test environment name corresponding to the selected preset test environment, and the generated domain name of the network request can be accessed by the entry gateway.

[0090] Therefore, when conducting software testing, you only need to enter the network request domain name in the production environment. The test environment name can be selected from the preset test environment name in the system, which greatly reduces the learning difficulty of testers and makes it easier to operate. Furthermore, when you need to reconfigure and modify a certain test environment, you only need to select the corresponding test environment through the system and enter the configuration interface of the changed test environment to modify and configure it.

[0091] As an optional implementation of this embodiment, the software testing method described in this embodiment is characterized in that after the independent gateway forwards the network request to the corresponding software service to configure the test environment,

[0092] When receiving the user's personal environment configuration or pre-launch transformation instructions, the independent gateway can be configured according to the instructions to build a new test environment that meets the personal environment configuration or pre-launch transformation requirements;

[0093] The network request is forwarded by the independent gateway to a new test environment for testing.

[0094] Since the software testing method described in this embodiment configures all test environments with independent independent gateways, when a test environment has characteristic requirements such as configuration forwarding, current limiting, etc., it is necessary to change the independent gateway entry configuration of the test environment. At this time, it will not affect other test environments, thereby improving the stability of the entire test environment.

[0095] In addition, since the routing configuration of each test environment is implemented by maintenance personnel with general permissions by modifying their respective independent gateways, the test environment no longer requires a certain type of user with higher permissions (such as operation and maintenance or test leaders) to make modifications, avoiding single-point bottlenecks where no one responds because these people are on vacation or busy with work.

[0096] This embodiment also provides a storage medium storing a computer executable program, and when the computer executable program is executed, the software testing method is implemented.

[0097] The storage medium described in the present embodiment may include a data signal propagated in a baseband or as a part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0098] This embodiment further provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer executable program, and when the computer program is executed by the processor, the processor executes the software testing method.

[0099] The electronic device is presented in the form of a general-purpose computing device. The processor may be one or more than one and work in coordination. The present invention does not exclude distributed processing, that is, the processor may be dispersed in different physical devices. The electronic device of the present invention is not limited to a single entity, but may also be the sum of multiple physical devices.

[0100] The memory stores a computer executable program, which is usually a machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least part of the steps in the method.

[0101] The memory includes a volatile memory, such as a random access memory unit (RAM) and / or a cache memory unit, and may also be a non-volatile memory, such as a read-only memory unit (ROM).

[0102] It should be understood that the electronic device of the present invention may also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons, keyboards, etc. As long as the electronic device can execute the computer-readable program in the memory to implement the method of the present invention or at least part of the steps of the method, it can be considered as an electronic device covered by the present invention.

[0103] Through the above description of the implementation mode, it is easy for those skilled in the art to understand that the present invention can be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. contained in the system. The present invention can also be implemented by computer software that executes the method of the present invention, such as control software executed by a microprocessor, an electronic control unit, a client, a server, etc. However, it should be noted that the computer software that executes the method of the present invention is not limited to being executed by one or a specific hardware entity, and it can also be implemented in a distributed manner by unspecified specific hardware. For computer software, the software product can be stored in a computer-readable storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and can also be distributed and stored on the network, as long as it can enable the electronic device to execute the method according to the present invention.

[0104] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described in the present invention. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the above specific implementation methods. Therefore, any modification or equivalent replacement of the present invention; and all technical solutions and improvements thereof that do not depart from the spirit and scope of the invention are included in the scope of the claims of the present invention.

Claims

1. A multi-environment independent gateway system with homogeneous production and testing, characterized in that: include: The entry gateway serves as a unified entry point for all network requests in the software testing environment; An independent gateway forwards network requests to a software service to configure a test environment that is isomorphic to the production environment. The independent gateway includes multiple independent gateways, and different independent gateways can forward network requests to different software services to configure different test environments. The ingress gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can be configured with the corresponding test environment according to the test environment requirements. The independent gateway receives the network request assigned by the ingress gateway and forwards the received network request to the corresponding software service, so as to implement testing in the test environment with the same configuration as the production environment; The access domain name of the network request received by the ingress gateway is composed of the access domain name of the production environment and the name of the test environment. The ingress gateway parses the test environment name in the access domain name of the network request, and forwards the network request to an independent gateway that can be configured with the corresponding test environment according to the test environment name; Before forwarding the network request to the independent gateway that can be configured with the corresponding test environment, the ingress gateway further includes: rewriting the access domain name of the network request into the access domain name of the production environment; the format of the access domain name of the network request is: www.xx-{env}.domain name suffix, where the xx part is the access domain name of the production environment, and the {env} part is the name of the test environment; Before forwarding the network request to the independent gateway that can be configured with the corresponding test environment, the entry gateway rewrites the access domain name "www.xx-{env}.domain name suffix" of the network request to the access domain name www.xx.domain name suffix of the production environment; After configuring the test environment, the independent gateway can be reconfigured according to the user's personal environment configuration or the need for pre-launch transformation.

2. According to claim 1, a multi-environment independent gateway system with isomorphic production and testing is characterized in that: The software testing environment has multiple software services, and the independent gateway configures the accessible software services according to the required testing environment; each independent gateway configures a test environment that is independent of each other.

3. A method for software testing using a multi-environment independent gateway system with isomorphic production and testing as described in any one of claims 1-2, characterized in that: include: The entry gateway uniformly accesses all network requests for software testing; The entry gateway rewrites the access domain name of the received network request to be isomorphic to the production environment, and forwards it to an independent gateway that can be configured with the corresponding test environment according to the test environment requirements; The independent gateway receives the network request assigned by the ingress gateway, and forwards the received network request to the corresponding software service, and configures and implements the test environment with the same configuration as the production environment for testing; The access domain name of the network request received by the ingress gateway is composed of the access domain name of the production environment and the name of the test environment; The entry gateway resolves the test environment name in the access domain name of the network request; Rewrite the access domain name of the network request to the access domain name of the production environment; Rewrite the network request into the access domain name of the production environment according to the test environment name and forward it to an independent gateway that can be configured with the corresponding test environment; After the independent gateway forwards the network request to the corresponding software service and configures the test environment, When receiving the user's personal environment configuration or pre-launch transformation instructions, the independent gateway can be configured according to the instructions to build a new test environment that meets the personal environment configuration or pre-launch transformation requirements; The network request is forwarded by the independent gateway to a new test environment for testing.

4. The software testing method according to claim 3, characterized in that: The multi-environment independent gateway system with isomorphic production and testing has multiple different test environments preset, and each test environment corresponds to a different independent gateway; The domain name of the network request is generated by combining the access domain name in the production environment received from the user and the test environment name corresponding to the selected preset test environment. The generated domain name of the network request can be accessed by the entry gateway.

5. A storage medium storing a computer executable program, characterized in that: When the computer executable program is executed, a software testing method as described in any one of claims 3 to 4 is implemented.

Citation Information

Patent Citations

  • Request service isolating method and system

    CN106453296A

  • Micro-service testing method and device, computer equipment and storage medium

    CN110647469A