CN111858297A - Method and device for constructing online simulation test environment and computer-readable storage medium - Google Patents

Method and device for constructing online simulation test environment and computer-readable storage medium Download PDF

Info

Publication number
CN111858297A
CN111858297A CN202010072321.8A CN202010072321A CN111858297A CN 111858297 A CN111858297 A CN 111858297A CN 202010072321 A CN202010072321 A CN 202010072321A CN 111858297 A CN111858297 A CN 111858297A
Authority
CN
China
Prior art keywords
simulation test
service system
environment
test environment
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010072321.8A
Other languages
Chinese (zh)
Inventor
綦晓颖
郭帅琪
王志宇
王东洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN202010072321.8A priority Critical patent/CN111858297A/en
Publication of CN111858297A publication Critical patent/CN111858297A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

Abstract

The invention provides a method and a device for constructing an online simulation test environment based on a micro-service architecture and a computer readable storage medium. The method for constructing the online simulation test environment based on the micro-service architecture comprises the following steps: determining a service system under test among service system topologies including a plurality of service systems; determining a downstream service system corresponding to the tested service system; and according to the on-line environment of the downstream service system, constructing an on-line simulation test environment aiming at the tested service system. By adopting the technical scheme of the invention, the test efficiency can be improved and the test period can be shortened in the test work aiming at the tested service system.

Description

Method and device for constructing online simulation test environment and computer-readable storage medium
Technical Field
The invention relates to the technical field of computer science, in particular to a method and a device for constructing an online simulation test environment based on a micro-service architecture and a computer-readable storage medium.
Background
As online services move to microservice, a request from a client may need to be processed by multiple service systems.
With current microservice frameworks, when testing is required for a certain service system, the tested service relies on multiple downstream services, which rely on several more downstream services.
The problem that this brings is that the related art needs very complicated upstream and downstream environment support to complete the test work for one tested service system completely, thereby resulting in the problems of low test efficiency and long test period.
Disclosure of Invention
The present invention is directed to solving at least one of the above problems.
Therefore, the first purpose of the invention is to provide an online simulation test environment construction method.
The second purpose of the invention is to provide an online simulation test environment construction device.
A third object of the present invention is to provide a computer-readable storage medium.
In order to achieve the first object of the present invention, an embodiment of the present invention provides a method for constructing an online simulation test environment based on a microservice architecture, which includes the following steps: determining a service system under test among service system topologies including a plurality of service systems; determining a downstream service system corresponding to the tested service system; and according to the on-line environment of the downstream service system, constructing an on-line simulation test environment aiming at the tested service system.
According to the embodiment, the test environment for the upstream tested service system can be constructed according to the online environment of the downstream service system, so that the efficiency of test work is improved, and the period of test work is shortened.
In addition, the technical solution provided by the above embodiment of the present invention may further have the following additional technical features:
in the above technical solution, the number of the tested service systems is at least two, and the step of determining the downstream service system corresponding to the tested service system specifically includes: and respectively determining the downstream service systems corresponding to the tested service systems aiming at all the tested service systems so as to obtain all the downstream service systems.
The embodiment can construct a complete on-line simulation test environment for a plurality of tested service systems, and further improve the test efficiency.
In any of the above technical solutions, the step of constructing an online simulation test environment for the tested service system according to the online environment of the downstream service system specifically includes: and according to the on-line environment of all the downstream service systems, acquiring an on-line simulation test environment cluster aiming at all the tested service systems, and constructing an on-line simulation test environment according to the on-line simulation test environment cluster.
In this embodiment, by establishing the on-line simulation test environment cluster, an on-line simulation test environment for a plurality of tested service systems can be established.
In any of the above technical solutions, in the step of determining the downstream service system corresponding to the tested service system: the tested service system corresponds to a plurality of downstream service systems.
The embodiment can ensure the integrity and the completeness of the on-line simulation test environment so as to ensure the stability and the completeness of the test.
In any of the above technical solutions, the step of constructing an online simulation test environment for the tested service system according to the online environment of the downstream service system specifically includes: and adopting elastic cloud equipment to mirror and construct an on-line simulation test environment aiming at the on-line environment of the downstream service system.
The on-line environment is mirrored to construct an on-line simulation test environment, so that the tested service system and the on-line environment are completely consistent, and the accuracy of a test result is ensured.
In any of the above technical solutions, the method for constructing an online simulation test environment based on a micro service architecture further includes the following steps: and adding a routing group suitable for managing the topological structure of the service system through service registration and discovery, and configuring the routing of the tested service system to point to the online simulation test environment.
The embodiment can effectively manage the continuously changing inter-link topology structure under the distributed architecture of the microservice.
In any of the above technical solutions, the method for constructing an online simulation test environment based on a micro service architecture further includes the following steps: distributing corresponding test domain names aiming at the on-line simulation test environment; and forwarding the test request from the front end to the online simulation test environment according to the test domain name.
The embodiment can effectively and accurately identify the test request from the front end so as to test the tested service system through the on-line simulation test environment.
In any of the above technical solutions, forwarding the test request from the front end to the online simulation test environment according to the test domain name specifically includes the following steps: the router identifies a domain name from the front end as a test domain name; the router forwards a test request corresponding to the test domain name to the simulation environment proxy server; the simulation environment proxy server forwards the test request to the on-line simulation test environment.
The embodiment ensures the flexibility and the extensibility of the online simulation environment under the condition of not influencing the online service through the setting of the simulation environment proxy server.
To achieve the second object of the present invention, an embodiment of the present invention provides an online simulation test environment construction apparatus based on a microservice architecture, including: a memory storing a computer program; a processor executing a computer program; when executing the computer program, the processor implements the steps of the method for constructing the on-line simulation test environment based on the microservice architecture according to any embodiment of the present invention.
The on-line simulation test environment construction device based on the micro-service architecture of the embodiment of the present invention implements the steps of the on-line simulation test environment construction method based on the micro-service architecture of any embodiment of the present invention, and therefore, has all the beneficial effects of the on-line simulation test environment construction method based on the micro-service architecture of any embodiment of the present invention, and is not described herein again.
To achieve the third object of the present invention, an embodiment of the present invention provides a computer-readable storage medium including: the computer readable storage medium stores a computer program, and when the computer program is executed, the steps of the method for constructing the on-line simulation test environment based on the microservice architecture according to any embodiment of the present invention are implemented.
The computer-readable storage medium according to the embodiment of the present invention implements the steps of the method for constructing an online simulation test environment based on a micro service architecture according to any embodiment of the present invention, and therefore, the method for constructing an online simulation test environment based on a micro service architecture according to any embodiment of the present invention has all the advantages, and details are not repeated herein.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flowchart of a first step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 2 is a relational diagram of a plurality of service systems in accordance with some embodiments of the invention;
FIG. 3 is a flowchart of a second step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 4 is a flowchart of a third step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 5 is a flowchart illustrating a fourth step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 6 is a flowchart illustrating a fifth step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 7 is a flowchart illustrating a sixth step of a method for constructing an on-line simulation test environment based on a microservice architecture according to some embodiments of the present invention;
FIG. 8 is a schematic diagram of a system configuration of an on-line simulation test environment building apparatus based on a microservice architecture according to some embodiments of the present invention;
fig. 9 is a basic framework diagram of a method for constructing an online simulation test environment based on a microservice architecture according to some embodiments of the present invention.
Wherein, the correspondence between the reference numbers and the names of the components in fig. 8 is:
100: on-line simulation test environment construction device based on micro-service architecture, 102: memory, 104: a processor.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
The technical solutions of some embodiments of the present invention are described below with reference to fig. 1 to 9.
The embodiment of the invention provides a method for constructing an online simulation test environment based on a micro-service architecture, an online simulation test environment constructing device based on the micro-service architecture and a computer readable storage medium.
The method for constructing the on-line simulation test environment provided by the embodiment of the invention is suitable for a micro-service architecture. The goal of microservice architecture design is to break the business so that each service system can run independently. Among them, the micro service architecture is increasingly widely used in the field of online services such as a network car booking service.
The advantages of the microservice architecture are: it is more efficient in using computing resources than traditional applications, and developers need only deploy computing resources for additional components, rather than a completely new iteration of deploying a complete application. Furthermore, another advantage of the microservice architecture is that it can be updated faster and more easily, allowing developers to update individual components of an application without affecting other parts.
The above advantages of the microservice architecture are achieved by breaking down individual service systems and coordinating their relative associations. However, the problem is that as online services move to microservices, a single request from the client may need to go through multiple services. Accordingly, when a technical development and operation maintenance person needs to test a certain service, the service may rely on a plurality of upstream and downstream services, which in turn rely on more services. Therefore, to test a certain service completely under the micro-service architecture, very complex upstream and downstream environment support is required. Moreover, many services do not have a perfect and stable testing environment, so that it is very difficult to test a certain service under the micro-service architecture.
Therefore, embodiments of the present invention are directed to providing an on-line simulation test environment construction method suitable for a microservice architecture. Specifically, in the field of online services, an online environment providing services to users is referred to as a production environment, an online environment in which complete online service codes are deployed but only test traffic is referred to as a preview environment, and the preview environment can be used to support online function regression. And testing the deployable service by using the online environment for testing the code which is not online as the simulation environment. The embodiment of the invention provides the on-line simulation test environment construction method, so that the efficiency of test work is improved in the test work aiming at the tested service system, the period of the test work is shortened, and a higher-quality production environment is provided for users.
Example 1
As shown in fig. 1, the embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, which includes the following steps:
step S100: determining a service system under test among service system topologies including a plurality of service systems;
step S200: determining a downstream service system corresponding to the tested service system;
step S300: and according to the on-line environment of the downstream service system, constructing an on-line simulation test environment aiming at the tested service system.
In this embodiment, the service system refers to service providers under the micro-service architecture, which are independent and coordinated with each other. For example, the network car-booking online service is used, and the micro-service architecture of the network car-booking can comprise hundreds of service systems such as a message system, a distributed storage system, an account system, an order system, a driver system, a scheduling engine and the like, and the services jointly form a very complex service system topological structure. The topology of this embodiment refers to a network structure formed by the service system nodes and the communication medium. When a user initiates a request from the front end to a back end service system, it may need to go through tens or even hundreds of service systems to process the request.
For example, as shown in fig. 2, when a user initiates an APP request from a front end to an application a of a back end, the application a needs to rely on a plurality of downstream service systems including an application B, an application C, and an application D to provide corresponding services to the front end. Whereas application B, application C and application D need to rely on more downstream service systems, e.g. application E, application F, application G and application H, respectively. Although the above service system topology can facilitate efficient use of computing resources and better provide services to users, it results in problems of inefficient testing and long testing period.
For example, when testing application a, testing for application a requires support that relies on a full set of environments downstream from application a. A common solution in the related art is to test application a through a offline environment. Although the offline environment has the advantages of convenience and flexibility, the stability and integrity of the offline environment are difficult to ensure. The direct effect of the offline environmental instability is an increase in test time and a decrease in test efficiency.
In order to improve the testing efficiency and shorten the testing time, the embodiment provides a technical scheme for constructing the online simulation testing environment of the upstream service system according to the online environment of the downstream service system. Specifically, the embodiment first determines the service systems to be tested, which need to be tested, from among a plurality of service systems, and the number of the service systems to be tested may be one or more. After determining the tested service system, the embodiment further determines a downstream service system corresponding to the tested service system. The downstream service system comprises a downstream service system directly corresponding to the tested service system and a downstream service system corresponding to the downstream service system directly corresponding to the tested service system. After determining all the downstream service systems corresponding to one or more tested service systems, the present embodiment constructs an online simulation test environment for the tested service system according to the online environments of the downstream service systems. Therefore, the embodiment can isolate the traffic of the tested service system, thereby constructing a complete on-line simulation test environment.
For example, as shown in fig. 2, when a test needs to be performed on an application a, if the downstream service system of the application a, i.e., the application B, the application C, and the application D, is not changed, the embodiment isolates the traffic of the application a depending on the downstream online environment of the application a. Therefore, the embodiment perfectly solves the problems of poor stability and low perfection caused by testing the application A through the offline environment, and does not add any maintenance cost to the downstream service system.
In summary, according to the above technical solution, the test environment for the upstream tested service system can be constructed according to the online environment of the downstream service system, so that the efficiency of the test operation is improved, and the period of the test operation is shortened.
Example 2
As shown in fig. 3, the present embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of the above embodiment 1, the present embodiment further includes the following technical features.
The number of the tested service systems is at least two, and the step of determining the downstream service system corresponding to the tested service system specifically comprises the following steps:
step S202: and respectively determining the downstream service systems corresponding to the tested service systems aiming at all the tested service systems so as to obtain all the downstream service systems.
In other words, in the present embodiment, the number of the tested service systems is plural. When a plurality of service systems under test are tested, the present embodiment determines the downstream service system corresponding to each service system under test, and thereby obtains all the downstream service systems integrating the downstream service systems corresponding to each service system under test. Therefore, when testing a plurality of service systems under test, the present embodiment performs traffic isolation on the plurality of service systems under test and all the corresponding downstream service systems together, so as to construct an on-line simulation test environment for all the service systems under test by reason of the on-line environment of all the downstream service systems. The embodiment can construct a complete on-line simulation test environment for a plurality of tested service systems so as to further improve the test efficiency.
Example 3
As shown in fig. 4, the present embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of the above embodiment 2, the present embodiment further includes the following technical features.
The step of constructing an online simulation test environment for the tested service system according to the online environment of the downstream service system specifically comprises:
Step S302: and according to the on-line environment of all the downstream service systems, acquiring an on-line simulation test environment cluster aiming at all the tested service systems, and constructing an on-line simulation test environment according to the on-line simulation test environment cluster.
In other words, when testing a plurality of service systems under test, the present embodiment uses the online environments of all the downstream service systems to construct an online simulation test environment cluster, and opens the online simulation test environment cluster and the online environment that depends on the online simulation test environment cluster, thereby constructing a complete online simulation test environment for the plurality of service systems under test.
For example, as shown in fig. 2, when an application a, an application B, and an application C are modified in a project, when testing is performed on the application a, the application B, and the application C, the test environments of the application a, the application B, and the application C form a test cluster, the test cluster is opened to the on-line environment on which the test cluster depends, and thus the test environments for the application a, the application B, and the application C are constructed.
In this embodiment, by establishing the on-line simulation test environment cluster, an on-line simulation test environment for a plurality of tested service systems can be established.
Example 4
The embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of any one of the embodiments, the embodiment further includes the following technical features.
In the step of determining the downstream service system corresponding to the tested service system: the tested service system corresponds to a plurality of downstream service systems.
For example, as shown in fig. 2, in the service system topology structure of the present embodiment, there is an association relationship between a plurality of service systems in the upstream and downstream. The application A is an upstream service system of an application B, an application C and an application D, the application B is an upstream service system of an application E, the application C is an upstream service system of an application F and an application G, and the application D is an upstream service system of an application F and an application H. The information processed or output by each application enters a unit comprising a database, a cache or a characteristic storage for storage or cache. Thus, multiple applications and multiple storage or cache units together form a complex service system topology. In other words, when the application a is a tested service system, the tested service system corresponds to not only a plurality of direct downstream service systems including the application B, the application C, and the application D, but also more indirect downstream service systems including the application E, the application F, the application G, and the application H. The application B, the application C, the application D, the application E, the application F, the application G and the application H form a downstream service system of the application A. When testing the application a, this embodiment needs to perform traffic isolation on all service systems including the application a, the application B, the application C, the application D, the application E, the application F, the application G, and the application H, and depends on all online environments of the direct downstream service system and the indirect downstream service system of the application a to jointly serve as an online simulation test environment of the application a.
The embodiment can ensure the integrity and the completeness of the on-line simulation test environment so as to ensure the stability and the completeness of the test.
Example 5
The embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of any one of the embodiments, the embodiment further includes the following technical features.
The step of constructing an online simulation test environment for the tested service system according to the online environment of the downstream service system specifically comprises: and adopting elastic cloud equipment to mirror and construct an on-line simulation test environment aiming at the on-line environment of the downstream service system.
The cloud computing architecture of the elastic cloud equipment has the characteristic of elastic expansion, namely, available cloud resources of the elastic cloud equipment can be flexibly changed and freely lifted along with the requirements of users. The elastic cloud equipment of the embodiment can support users to freely schedule computing resources, and is not limited by traditional hardware equipment. In addition, the services of the elastic cloud equipment are dispersed in a plurality of hosts and even a plurality of machine rooms, so that the elastic cloud equipment is not easy to completely shut down and has strong disaster-resistant and fault-tolerant capabilities.
The embodiment transitions the online service from physical machine deployment to elastic cloud deployment, while the testing environment for functional testing does not require excessively high machine configuration. Therefore, the present embodiment may use the lowest configured elastic cloud machine to build an on-line simulation test environment. In addition, the environment construction mode of the on-line simulation environment of the tested service system is completely consistent with that of the on-line simulation environment. The on-line environment is mirrored to construct an on-line simulation test environment, so that the tested service system and the on-line environment are completely consistent, and the accuracy of a test result is ensured.
Example 6
As shown in fig. 5, the embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of any of the above embodiments, the embodiment further includes the following technical features.
The method for constructing the online simulation test environment based on the micro-service architecture further comprises the following steps:
step S400: and adding a routing group suitable for managing the topological structure of the service system through service registration and discovery, and configuring the routing of the tested service system to point to the online simulation test environment.
One of the problematic issues that is difficult to solve under the distributed architecture of microservices is the management of routes between links. A difficulty with managing the service system topology is that the topology often changes between links. Moreover, in order to support project tests of different forms, the topological structures of simulation test environments on each set of lines are not completely consistent.
In order to manage the service system topology which changes frequently, the present embodiment solves the topology change problem through service registration and discovery. Specifically, each time an online simulation test environment is added, the embodiment firstly registers and discovers a new routing group for the service, manages the environment topology through the routing group, secondly, directs the routing configuration of the tested service system to the newly constructed tested machine, and keeps all other downstream service systems pointing to the online service unchanged.
Through the technical scheme, the embodiment can effectively manage the continuously changing inter-link topological structure under the distributed architecture of the microservice.
Example 7
As shown in fig. 6, the embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of any of the above embodiments, the embodiment further includes the following technical features. The method for constructing the online simulation test environment based on the micro-service architecture further comprises the following steps:
step S500: distributing corresponding test domain names aiming at the on-line simulation test environment;
step S600: and forwarding the test request from the front end to the online simulation test environment according to the test domain name.
The embodiment separately allocates the testing domain names required by the test according to the testing requirements of the tested service system. When the tested service system is tested, the Router (English name: Router) directly forwards the test request to the on-line simulation test environment when recognizing that the domain name corresponding to the test request from the front end is the test domain name, so as to realize the test for the tested service system.
For example, the front end of the present embodiment may be a passenger end or a driver end of the online car booking service. When a driver system under the network appointment car micro-service architecture needs to be tested, the embodiment allocates a corresponding test domain name for the test.
Therefore, when the router receives a test request from the driver end, the router identifies the domain name corresponding to the test request and knows that the domain name is the test domain name. And further, the router forwards the test request from the driver end to an online simulation test environment for testing.
The embodiment can effectively and accurately identify the test request from the front end so as to test the tested service system through the on-line simulation test environment.
Example 8
As shown in fig. 7, the embodiment provides a method for constructing an online simulation test environment based on a microservice architecture, and in addition to the technical features of any of the above embodiments, the embodiment further includes the following technical features. The method for constructing the online simulation test environment based on the micro-service architecture further comprises the following steps:
according to the test domain name, the step of forwarding the test request from the front end to the online simulation test environment specifically comprises the following steps:
step S602: the router identifies a domain name from the front end as a test domain name;
step S604: the router forwards a test request corresponding to the test domain name to the simulation environment proxy server;
step S606: the simulation environment proxy server forwards the test request to the on-line simulation test environment.
The front end of this embodiment may be a mobile application program operated by a user, and when the mobile application program initiates a service request, the mobile application program will first access an online router, and the online router acts as a proxy to a back end service, that is: the transmission path of the service request is from the mobile phone application program to the router and from the router to the back-end service.
When an individual testing domain name is applied or allocated for the online simulation testing environment, and a layer of simulation environment proxy server is added between the online router and the back-end service system, the router of this embodiment recognizes that the domain name from the front end is the testing domain name, forwards the corresponding testing request to the simulation environment proxy server, and forwards the testing request to the online simulation testing environment by the simulation environment proxy server, that is: the transmission path of the test request is from the mobile phone application program to the router, from the router to the simulation environment proxy server, and from the simulation environment proxy server to the on-line simulation test environment of the tested service system.
Example 9
As shown in fig. 8, the present embodiment provides an online simulation test environment building apparatus 100 based on micro service architecture, including: a memory 102 and a processor 104. The memory 102 stores a computer program. The processor 104 executes the computer program. Wherein, the processor 104, when executing the computer program, implements the steps of the method for constructing the on-line simulation test environment based on the microservice architecture according to any embodiment of the present invention.
Example 10
The present embodiments provide a computer-readable storage medium, comprising: the computer readable storage medium stores a computer program, and when the computer program is executed, the steps of the method for constructing the on-line simulation test environment based on the microservice architecture according to any embodiment of the present invention are implemented.
DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
The embodiment provides a method for constructing an online simulation test environment based on a micro-service architecture, and a specific basic architecture of the method is shown in fig. 9. The method for constructing an online simulation test environment based on a micro-service architecture in this embodiment constructs an online simulation test environment for a tested service system according to the online environments of all downstream service systems corresponding to one or more tested service systems. Table 1 lists user appeal and current situation of the on-line simulation test environment in this embodiment, and the present embodiment performs landing of a product scheme on the basis of the following user appeal and current situation.
TABLE 1
Figure BDA0002377611810000121
The application scenario and advantages of the method for constructing the online simulation test environment based on the micro-service architecture in the service development are as follows.
Firstly, in the development of self-test process, the routing identification (RD for short) may bring about very high self-test cost due to environmental problems. The online simulation test environment of the embodiment is adopted to support development and testing, so that the test cost brought by the environment can be greatly saved, and the research and development efficiency is improved.
In addition, in the joint debugging test, a large project relates to a plurality of upstream and downstream modules or upstream and downstream service systems, so that the joint debugging environment which is particularly dependent on the whole set can be kept stable, and the capability of the whole set of joint debugging environment to be consistent with the online is greatly depended. The testing environment with low simulation degree may cause insufficient testing, and there is a great hidden danger after the project is online. The on-line simulation test environment of the embodiment is adopted for testing, so that the stability of the test environment and the simulation degree of one hundred percent are ensured. Therefore, the embodiment can better provide quality guarantee for large projects.
Finally, in the pressure test, only the same machine configuration as that of the on-line simulation test environment is used for constructing the on-line simulation test environment, and the single module environment which is completely consistent with the on-line simulation test environment can be obtained. When the pressure test is carried out in the environment, the simulation degree of the pressure test can be well ensured, and the performance debugging is convenient to carry out in the test environment.
In summary, the embodiment of the invention has the following beneficial effects:
1. according to the embodiment of the invention, an online simulation test environment for the tested service system is constructed according to the online environment of the downstream service system. Therefore, the embodiment of the invention only isolates the tested service system, and other services depend on the on-line environment to carry out high-simulation test. Therefore, the embodiment of the invention can improve the test efficiency and shorten the test period in the test work aiming at the tested service system.
2. The embodiment of the invention allocates the corresponding testing domain name aiming at the on-line simulation testing environment, and the router identifies the domain name from the front end as the testing domain name. Thus, the router may forward a test request corresponding to the test domain name to the simulation environment proxy server. Therefore, the embodiment of the invention ensures the flexibility and the extensibility of the on-line simulation environment under the condition of not influencing the on-line service by setting the simulation environment proxy server.
In the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance; the term "plurality" means two or more unless expressly limited otherwise.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for constructing an online simulation test environment based on a micro-service architecture is characterized by comprising the following steps:
determining a service system under test among service system topologies including a plurality of service systems;
determining a downstream service system corresponding to the tested service system;
and according to the online environment of the downstream service system, constructing the online simulation test environment aiming at the tested service system.
2. The method for constructing an online simulation test environment based on a micro-service architecture according to claim 1, wherein the number of the tested service systems is at least two, and the step of determining the downstream service system corresponding to the tested service system specifically includes:
and respectively determining the downstream service systems corresponding to the tested service systems aiming at all the tested service systems so as to obtain all the downstream service systems.
3. The method for constructing an online simulation test environment based on a micro-service architecture according to claim 2, wherein the step of constructing the online simulation test environment for the tested service system according to the online environment of the downstream service system specifically comprises:
and according to the on-line environment of all the downstream service systems, obtaining an on-line simulation test environment cluster aiming at all the tested service systems, and according to the on-line simulation test environment cluster, constructing the on-line simulation test environment.
4. The method for constructing the on-line simulation test environment based on the micro-service architecture according to any one of claims 1 to 3, wherein in the step of determining the downstream service system corresponding to the tested service system:
the tested service system corresponds to a plurality of downstream service systems.
5. The method according to any of claims 1 to 3, wherein the step of constructing the on-line simulation test environment for the tested service system according to the on-line environment of the downstream service system specifically comprises:
And adopting elastic cloud equipment to construct the online simulation test environment by mirroring aiming at the online environment of the downstream service system.
6. The method for constructing the on-line simulation test environment based on the micro-service architecture according to any one of claims 1 to 3, further comprising the following steps:
and adding a routing group suitable for managing the topological structure of the service system through service registration and discovery, and configuring the routing of the tested service system to point to the online simulation test environment.
7. The method for constructing the on-line simulation test environment based on the micro-service architecture according to any one of claims 1 to 3, further comprising the following steps:
distributing corresponding test domain names aiming at the on-line simulation test environment;
and forwarding a test request from a front end to the on-line simulation test environment according to the test domain name.
8. The method for constructing an online simulation test environment based on a micro-service architecture according to claim 6, wherein the step of forwarding the test request from the front end to the online simulation test environment according to the test domain name specifically comprises:
the router identifies the domain name from the front end as the test domain name;
The router forwards the test request corresponding to the test domain name to a simulation environment proxy server;
and the simulation environment proxy server forwards the test request to the online simulation test environment.
9. An on-line simulation test environment construction device based on a micro-service architecture is characterized by comprising the following components:
a memory storing a computer program;
a processor executing the computer program;
wherein the processor, when executing the computer program, implements the steps of the microservice architecture-based online simulation test environment construction method according to any of claims 1 to 8.
10. A computer-readable storage medium, comprising:
the computer readable storage medium stores a computer program which, when executed, implements the steps of the microservice architecture-based online simulation test environment construction method of any of claims 1 to 8.
CN202010072321.8A 2020-01-21 2020-01-21 Method and device for constructing online simulation test environment and computer-readable storage medium Pending CN111858297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010072321.8A CN111858297A (en) 2020-01-21 2020-01-21 Method and device for constructing online simulation test environment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010072321.8A CN111858297A (en) 2020-01-21 2020-01-21 Method and device for constructing online simulation test environment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111858297A true CN111858297A (en) 2020-10-30

Family

ID=72984840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010072321.8A Pending CN111858297A (en) 2020-01-21 2020-01-21 Method and device for constructing online simulation test environment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111858297A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326186A (en) * 2021-05-19 2021-08-31 网易(杭州)网络有限公司 Software testing method and device, electronic equipment and storage medium
EP4095700A1 (en) * 2021-05-25 2022-11-30 Nio Technology (Anhui) Co., Ltd Method and system for micro-service testing, and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326186A (en) * 2021-05-19 2021-08-31 网易(杭州)网络有限公司 Software testing method and device, electronic equipment and storage medium
EP4095700A1 (en) * 2021-05-25 2022-11-30 Nio Technology (Anhui) Co., Ltd Method and system for micro-service testing, and storage medium

Similar Documents

Publication Publication Date Title
Mayer et al. Fogstore: Toward a distributed data store for fog computing
US20210314276A1 (en) System and method to control a cross domain workflow based on a hierachical engine framework
US20160359700A1 (en) Interactive hierarchical network chord diagram for application dependency mapping
CN105453492A (en) Switch clusters having layer-3 distributed router functionality
CN111858297A (en) Method and device for constructing online simulation test environment and computer-readable storage medium
WO2018145559A1 (en) Method and system for generating continuous integration pipeline
US10225159B2 (en) Dynamic graph-based structure for representing a communications network
US20210119880A1 (en) Generating and implementing a platform-neutral cloud-native application model
US20210152433A1 (en) Systems and methods for determining entry points for mapping a network
CN112631614B (en) Application deployment method, device, computer equipment and storage medium
CN110601949B (en) Multi-virtual equipment container networking method
CN103346910A (en) Method and device for managing available mode of servers
US20230236954A1 (en) Information processing method and apparatus, computer device, and storage medium
CN105591782B (en) The management method and device of test equipment
CN103036934A (en) Wide area network clustered deployment system and method based on mirror image
CN111641521A (en) Ambari-based method for deploying big data clusters on cloud
Aral et al. Simulators and emulators for edge computing
Malik et al. Latency based group discovery algorithm for network aware cloud scheduling
CN114553867A (en) Cloud-native cross-cloud network monitoring method and device and storage medium
CN113849361A (en) Method, device, equipment and storage medium for testing service node
CN107730125B (en) Laboratory management system
CN107547605A (en) A kind of message reading/writing method and node device based on node queue
CN113364633B (en) Container cluster dynamic construction method oriented to high-mobility environment
Srinivasan et al. Communications Data Distribution and other Goodies in the HLA Performance Model
Lim et al. A design of network mobility management on cloud native tactical edge cloud

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination