CN116955172A - Gray scale test method and device - Google Patents
Gray scale test method and device Download PDFInfo
- Publication number
- CN116955172A CN116955172A CN202310897202.XA CN202310897202A CN116955172A CN 116955172 A CN116955172 A CN 116955172A CN 202310897202 A CN202310897202 A CN 202310897202A CN 116955172 A CN116955172 A CN 116955172A
- Authority
- CN
- China
- Prior art keywords
- version
- gray
- target
- resource
- target webpage
- 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
Links
- 238000010998 test method Methods 0.000 title description 22
- 238000004519 manufacturing process Methods 0.000 claims abstract description 106
- 238000000034 method Methods 0.000 claims abstract description 42
- 238000012360 testing method Methods 0.000 claims abstract description 39
- 230000002159 abnormal effect Effects 0.000 claims description 15
- 230000006870 function Effects 0.000 description 9
- 235000014510 cooky Nutrition 0.000 description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000003068 static effect Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 241000287219 Serinus canaria Species 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/2895—Intermediate processing functionally located close to the data provider application, e.g. reverse proxies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/566—Grouping or aggregating service requests, e.g. for unified processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application provides a gray level testing method and device, and relates to the technical field of computers. The method comprises the following steps: acquiring pre-cached gray scale version configuration information of the target webpage according to information of the target user in a login request aiming at the target webpage, wherein the gray scale version configuration information is used for indicating whether the target user has gray scale version resource use permission of the target webpage; if the gray version configuration information indicates that the target user has the gray version resource use authority of the target webpage, acquiring the gray version resource of the target webpage from the first production server through the proxy server; and displaying the content page of the target webpage by loading the gray version resource of the target webpage. The application can realize the test of the new version in a small range and ensure the stable upgrade of the webpage.
Description
Technical Field
The application relates to the technical field of computers, in particular to a gray level testing method and device.
Background
With the development of computer network technology, the number of users using web pages has increased dramatically.
Before the new version of the webpage is released, in order to test the receiving degree of the user on the new version and the possible problems of the new version in the using process, the new version needs to be tested, if the new version is released at one time to be used for the full amount of users, once production accidents occur, the influence on the users is great.
Therefore, a testing method is needed to be provided, stable upgrading of the webpage is guaranteed, and influences on users when problems occur are minimized.
Disclosure of Invention
The application aims to provide a gray level testing method and device for testing new versions in a small range so as to ensure stable upgrading of webpages.
In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a gray scale test method, applied to a browser client, where the method includes:
acquiring pre-cached gray scale version configuration information of a target webpage according to information of the target user in a login request aiming at the target webpage, wherein the gray scale version configuration information is used for indicating whether the target user has gray scale version resource use permission of the target webpage;
if the gray version configuration information indicates that the target user has the gray version resource use authority of the target webpage, acquiring the gray version resource of the target webpage from a first production server through a proxy server;
and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
Optionally, the method further comprises:
if the gray version configuration information indicates that the target user does not have the gray version resource use authority, acquiring an original version resource of the target webpage from a second production server through the proxy server;
and displaying the content page of the target webpage by loading the original version resource of the target webpage.
Optionally, if the target web page includes a plurality of service systems, and if the gray version configuration information indicates that the target user has the gray version resource usage rights of the target web page, acquiring, by the proxy server, the gray version resource of the target web page from the first production server includes:
determining that the target user has the gray version resource use authority of a target service system in the target webpage according to the system domain name information in the gray version configuration information, wherein the system domain name information is used for indicating the domain name of the target service system;
acquiring gray scale version resources of the target service system from the first production server through the proxy server;
the displaying the content page of the target webpage by loading the gray version resource of the target webpage comprises the following steps:
And displaying the content page of the target service system by loading the gray version resource of the target service system.
Optionally, the determining that the target user has the gray scale version resource usage right of the target service system in the target webpage according to the system domain name information in the gray scale version configuration information includes:
if the system domain name information includes: a complete system domain name, and determining that the target user has the gray version resource use authority of a unique service system corresponding to the complete system domain name; or,
if the system domain name information includes: and determining that the target user has gray scale version resource use rights of a plurality of service systems corresponding to the partial system domain name.
Optionally, after the content page of the target webpage is displayed by loading the gray version resource of the target webpage, the method further includes:
receiving a rollback instruction sent by the proxy server, wherein the rollback instruction is sent to the proxy server when the production server determines that the gray version resource is abnormal;
and updating the gray scale version configuration information according to the rollback instruction, so that the updated gray scale version configuration information indicates that the target user does not have the gray scale version resource use permission.
In a second aspect, an embodiment of the present application further provides a gray scale test method, applied to a proxy server, where the method includes:
receiving a version resource acquisition request, sent by a browser client, of a target user aiming at a target webpage, wherein the version resource acquisition request at least comprises: version identification; the version resource obtaining request is a request sent by the browser client according to the information of the target user in the login request aiming at the target webpage and the pre-cached gray version configuration information of the target webpage;
and if the version identifier indicates that the required version of the target user is a gray version, forwarding the version resource acquisition request to a first production server so that the browser client acquires the gray version resource of the target webpage from the first production server, and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
Optionally, the method further comprises:
and if the version identifier indicates that the required version of the target user is an original version, forwarding the version resource acquisition request to a second production server, so that the browser client acquires the original version resource of the target webpage from the second production server, and displaying the content page of the target webpage by loading the original version resource of the target webpage.
Optionally, after the forwarding the version resource obtaining request to the first production server, the method further includes:
receiving a rollback instruction sent by the first production server when the gray version resource is determined to be abnormal;
and sending the rollback instruction to the browser client to instruct the browser client to update the gray scale version configuration information according to the rollback instruction, wherein the updated gray scale version configuration information indicates that the target user does not have the gray scale version resource use permission.
In a third aspect, an embodiment of the present application further provides a gray scale test device, applied to a browser client, where the device includes:
the configuration information acquisition module is used for acquiring pre-cached gray version configuration information of a target webpage according to information of the target user in a login request aiming at the target webpage, wherein the gray version configuration information is used for indicating whether the target user has gray version resource use permission of the target webpage;
the gray scale version resource acquisition module is used for acquiring gray scale version resources of the target webpage from a production server through a proxy server if the gray scale version configuration information indicates that the target user has the gray scale version resource use authority of the target webpage;
And the gray version resource loading module is used for displaying the content page of the target webpage by loading the gray version resource of the target webpage.
Optionally, the apparatus further includes:
the original version resource acquisition module is used for acquiring the original version resource of the target webpage from a second production server through the proxy server if the gray version configuration information indicates that the target user does not have the gray version resource use permission;
and the original version resource loading module is used for displaying the content page of the target webpage by loading the original version resource of the target webpage.
Optionally, if the target web page includes a plurality of service systems, the gray scale version resource obtaining module includes:
a system authority determining unit, configured to determine, according to system domain name information in the gray version configuration information, that the target user has a gray version resource usage authority of a target service system in the target web page, where the system domain name information is used to indicate a domain name of the target service system;
a system resource obtaining unit, configured to obtain, by using the proxy server, a gray version resource of the target service system from the first production server;
The gray scale version resource loading module is specifically configured to display a content page of the target service system by loading gray scale version resources of the target service system.
Optionally, the system permission determining unit is specifically configured to, if the system domain name information includes: a complete system domain name, and determining that the target user has the gray version resource use authority of a unique service system corresponding to the complete system domain name; alternatively, if the system domain name information includes: and determining that the target user has gray scale version resource use rights of a plurality of service systems corresponding to the partial system domain name.
Optionally, after the grayscale version resource loading module, the apparatus further includes:
the rollback instruction receiving module is used for receiving a rollback instruction sent by the proxy server, wherein the rollback instruction is sent to the proxy server when the production server determines that the gray version resource is abnormal;
and the configuration information updating module is used for updating the gray scale version configuration information according to the rollback instruction, so that the updated gray scale version configuration information indicates that the target user does not have the gray scale version resource use permission.
In a fourth aspect, an embodiment of the present application further provides a gray scale test device, applied to a proxy server, where the device includes:
the resource acquisition request receiving module is used for receiving a version resource acquisition request, sent by the browser client, of a target user aiming at a target webpage, wherein the version resource acquisition request at least comprises: version identification; the version resource obtaining request is a request sent by the browser client according to the information of the target user in the login request aiming at the target webpage and the pre-cached gray version configuration information of the target webpage;
and the resource acquisition request forwarding module is used for forwarding the version resource acquisition request to a first production server if the version identification indicates that the required version of the target user is a gray version, so that the browser client acquires the gray version resource of the target webpage from the first production server, and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
Optionally, the resource obtaining request forwarding module is further configured to forward the version resource obtaining request to a second production server if the version identifier indicates that the required version of the target user is an original version, so that the browser client obtains the original version resource of the target webpage from the second production server, and displays the content page of the target webpage by loading the original version resource of the target webpage.
Optionally, after the resource acquisition request forwarding module, the apparatus further includes:
the rollback instruction acquisition module is used for receiving a rollback instruction sent by the first production server when the gray version resource is determined to be abnormal;
and the rollback instruction forwarding module is used for sending the rollback instruction to the browser client to instruct the browser client to update the gray scale version configuration information according to the rollback instruction, and the updated gray scale version configuration information indicates that the target user does not have gray scale version resource use permission.
In a fifth aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium and a bus, the storage medium storing program instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the program instructions to perform the steps of the greyscale testing method according to any of the first aspect, or the steps of the greyscale testing method according to any of the second aspect.
In a sixth aspect, embodiments of the present application further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the greyscale testing method according to any of the first aspect, or the steps of the greyscale testing method according to any of the second aspect.
The beneficial effects of the application are as follows:
according to the gray level testing method and device provided by the application, whether the gray level version resource of the target webpage is loaded in the browser client is determined according to whether the target user has the gray level version resource use permission of the target webpage, so that the new version is tested among users with small range of the gray level version resource use permission, the use opinion of the user for the new version is collected in advance, the function of the new version is perfected in time, the stable upgrading of the new version of the webpage is ensured, the influence range on the user is controlled within the minimum range when the new version has problems, most users are not influenced, and the experience of the users is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a gray scale test system according to an embodiment of the present application;
Fig. 2 is a schematic flow chart of a gray scale test method according to an embodiment of the present application;
FIG. 3 is a second flowchart of a gray scale test method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a gray scale test method according to an embodiment of the present application;
fig. 5 is a flow chart of a gray scale test method according to an embodiment of the present application;
fig. 6 is a flowchart of a gray scale test method according to an embodiment of the present application;
fig. 7 is a flowchart of a gray scale test method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a gray scale testing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a gray scale test device according to a second embodiment of the present application;
fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Furthermore, the terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
Before the gray level testing method and the gray level testing device provided by the application are introduced, in order to better understand the scheme, a gray level testing system related to the application is introduced.
Referring to fig. 1, an architecture diagram of a gray scale test system according to an embodiment of the present application is shown in fig. 1, where the gray scale test system includes: browser client 10, proxy server 20, production server cluster 30. Wherein the proxy server 20 is respectively connected with the browser client 10 and the production server cluster 30.
The browser client 10 acts as a web-side for loading static resources of a target web page to display content pages of the target web page, the target web page having a unique uniform location resource identifier (Uniform Resource Locator, URL), the static resources of the target web page being loadable from a production server according to the URL of the target web page.
The gray version configuration information of the target webpage is cached in advance in the browser client 10, the gray version configuration information is used for indicating whether to load gray version resources of the target webpage in the browser client 10, and the browser client 10 may send a version resource acquisition request to the proxy server 20 according to the gray version configuration information, where the version resource acquisition request may at least include: URL and version identification of the target web page.
If the gray version configuration information is used for indicating that the gray version resource of the target webpage is loaded in the browser client 10, the version resource acquisition request is used for indicating that the static resource loaded from the production server is the gray version resource; if the gray version configuration information is used to indicate that the original version resource of the target web page is loaded in the browser client 10, the version resource acquisition request is used to indicate that the static resource loaded from the production server is the original version resource.
In the embodiment of the present application, when loading the static resource of the target webpage in the browser client 10, firstly, loading the login interface of the target webpage in the browser client, and generating the login request of the target user for the target webpage by inputting the identity information in the login interface, and determining whether the target user has the gray scale version resource use authority of the target webpage from the gray scale version configuration information of the target webpage based on the login request, wherein the gray scale version resource use authority of the target webpage is used for indicating whether the gray scale version resource of the target webpage is loaded in the browser client 10.
In some embodiments, if the target web page is used in the enterprise unit, it may be determined, according to the enterprise information of the target user, whether the enterprise of the target user has the gray-scale version resource usage right of the target web page.
The proxy server 20 is used as a front end server of the browser client 10, and has proxy forwarding functions of loading and caching static resources and a network interface, and in the embodiment of the present application, the proxy server 20 may forward the version resource acquisition request to a production server where the version resource corresponding to the version identifier is located according to the version resource acquisition request sent by the browser client 10.
In some embodiments, an nginx server is used as the proxy server 20, and the version identifier is obtained from the version resource obtaining request through the nginx server, so that forwarding of the version resource obtaining request is achieved according to the version identifier.
The production server cluster 30 is composed of a plurality of production servers, each for storing resources of a different web page or different versions of the same web page, in an embodiment of the present application, a first production server in the production server cluster 30 is for storing grayscale version resources of a target web page, and a second production server is for storing raw version resources of the target web page.
In some embodiments, the gray scale version directory (canary) is newly built in the first production server, and the script is built in the automation tool so that when the gray scale version resource is generated by the target webpage, the code of the gray scale version resource is automatically pushed to the gray scale version directory of the first production server through the script. By way of example, the automation tool may employ a Jenkins tool, for example.
Based on the above gray scale test system, the following describes a specific implementation manner of the gray scale test method applied to the browser client according to the present application with reference to the drawings and the embodiments.
Referring to fig. 2, a first flowchart of a gray scale test method according to an embodiment of the present application is shown in fig. 2, and the method may include:
s101: and acquiring the pre-cached gray version configuration information of the target webpage according to the information of the target user in the login request aiming at the target webpage.
The gray version configuration information is used for indicating whether the target user has gray version resource use permission of the target webpage.
In this embodiment, in response to a click operation for a target webpage, a login page of the target webpage is displayed in a browser client, and a target user inputs identity information in a login interface to generate a login request of the target user for the target webpage, and acquires gray version configuration information of the target webpage based on the login request of the target user.
The method comprises the steps that whether a target user has gray scale version resource use permission of the target webpage is used for expressing whether the gray scale version resource of the target webpage is loaded for the target user in a browser client.
In some embodiments, the gray version resource usage rights may be configured in the gray version configuration information in advance when providing the target user with the usage function of the target web page, or may be automatically generated according to a preset gray version pushing rule, and if the target user meets the gray version pushing rule, the target user is configured to have the gray version resource usage rights in the gray version configuration information; if the target user does not meet the gray version pushing rule, the target user is configured in the gray version configuration information to have no gray version resource use permission. The gray version pushing rule may be: a list of users (or enterprises) having the gray scale version resource usage rights, and a condition of the users (or enterprises) having the gray scale version resource usage rights, for example, a certain area.
For example, in an embodiment of the present application, the gray scale version configuration information of the target web page may be obtained from cookie data of the browser client, where in the cookie data, the version identifier indicates whether the target user has the gray scale version resource usage right of the target web page, for example, the version identifier is_canary=1 indicates that the target user has the gray scale version resource usage right of the target web page, and the version identifier is_canary=0 indicates that the target user does not have the gray scale version resource usage right of the target web page.
S102: if the gray version configuration information indicates that the target user has the gray version resource use authority of the target webpage, the gray version resource of the target webpage is obtained from the first production server through the proxy server.
In this embodiment, the browser client generates a version resource acquisition request based on the gray version configuration information, where the version resource acquisition request includes: the method comprises the steps that a browser client sends a version resource acquisition request to a proxy server, the proxy server determines a production server where a version resource corresponding to the version identifier of a target webpage is located according to the URL and the version identifier of the target webpage, and the version resource acquisition request is sent to the production server where the version resource corresponding to the version identifier of the target webpage is located through an application program interface (Application Program Interface, API) of the production server.
Specifically, if the gray version configuration information indicates that the target user has the gray version resource use authority of the target webpage, it is determined that the gray version resource of the target webpage is loaded for the target user in the browser client, the version identifier in the version resource acquisition request is the gray identifier, the proxy server determines, according to the URL and the gray identifier of the target webpage, the production server where the gray version resource corresponding to the gray identifier of the target webpage is located is the first production server, and the version resource acquisition request is forwarded to the first production server so as to acquire the gray version resource of the target webpage from the first production server.
S103: and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
In this embodiment, the gray version resource of the target web page obtained from the first production server through the proxy server is loaded in the browser client, so that the content page of the target web page is displayed in the display area of the browser client, and the static resource displayed in the content page is the gray version resource.
In a possible implementation manner, please refer to fig. 3, which is a second flowchart of a gray scale test method according to an embodiment of the present application, as shown in fig. 3, the method may further include:
S104: and if the gray version configuration information indicates that the target user does not have the gray version resource use authority, acquiring the original version resource of the target webpage from the second production server through the proxy server.
In this embodiment, if the gray version configuration information indicates that the target user does not have the gray version resource usage right of the target web page, it is determined that the original version resource of the target web page is loaded for the target user in the browser client, the version identifier in the version resource acquisition request is the original identifier, and the proxy server determines, according to the URL and the original identifier of the target web page, the production server where the original version resource corresponding to the original identifier of the target web page is located is the second production server, and forwards the version resource acquisition request to the second production server, so as to acquire the original version resource of the target web page from the second production server. The original version resource is a resource corresponding to a stable version of the target webpage.
S105: and displaying the content page of the target webpage by loading the original version resource of the target webpage.
In this embodiment, the original version resource of the target web page obtained from the second production server through the proxy server is loaded in the browser client, so that a content page of the target web page is displayed in a display area of the browser client, and the static resource displayed in the content page is the original version resource.
According to the gray level testing method provided by the embodiment, whether the gray level version resources of the target webpage are loaded in the browser client is determined according to whether the target user has the gray level version resource use permission of the target webpage, so that the new version is tested among users with small ranges of the gray level version resource use permission, the use opinion of the users for the new version is collected in advance, the functions of the new version are perfected in time, the stable upgrading of the new version of the webpage is ensured, the influence range on the users is controlled within the minimum range when the new version has problems, most users are not influenced, and the experience of the users is ensured.
In one possible implementation, the target webpage includes a plurality of service systems, and version resources loaded by each service system can be determined according to gray scale version configuration information for the plurality of service systems.
Referring to fig. 4, a third flowchart of the gray scale test method according to the embodiment of the present application, as shown in fig. 4, if the gray scale version configuration information indicates that the target user has the gray scale version resource usage right of the target web page, the process of obtaining the gray scale version resource of the target web page from the first production server through the proxy server may include:
S121: and determining that the target user has the gray version resource use authority of the target service system in the target webpage according to the system domain name information in the gray version configuration information.
The system domain name information is used for indicating the domain name of the target service system.
In this embodiment, system domain name information of a service system having a grey scale version resource usage right may be configured in advance in grey scale version configuration information of a target web page, and based on a login request for the target web page, the grey scale version resource usage right of the target service system corresponding to the system domain name information of the target user is determined from the grey scale version resource configuration information of the target web page.
In some embodiments, the version identifier may be configured as a gray scale identifier in the cookie data of the browser client, and the domain name of the target service system is set in the domain attribute of the cookie data, so that it is determined from the cookie data that the target service system corresponding to the system domain name information configured in the domain attribute has the gray scale version resource use authority.
S122: and acquiring gray scale version resources of the target service system from the first production server through the proxy server.
In this embodiment, the browser client generates a first version resource acquisition request and a second version resource acquisition request based on the gray version configuration information, where the first version resource acquisition request includes: the system domain name and gray scale identification of the target service system, and the second version resource acquisition request comprises: the method comprises the steps that a proxy server determines a production server where a gray version resource corresponding to a gray scale identifier of a target service system is located as a first production server according to a system domain name and an original identifier of other service systems, and forwards a first version resource acquisition request to the first production server so as to acquire the gray version resource of the target service system from the first production server; and the proxy server also determines a production server where the original version resource corresponding to the original identifier of the other service system is located as a second production server according to the system domain name and the original identifier of the other service system, and forwards the second version resource acquisition request to the second production server so as to acquire the original version resource of the other service system from the second production server.
The step S103 of displaying the content page of the target web page by loading the gray scale version resource of the target web page may include:
s131: and displaying the content page of the target service system by loading the gray version resource of the target service system.
In this embodiment, gray version resources of a target service system and original version resources of other service systems are cached in a proxy server, and when the target service system is opened in a browser client, gray version resources of the target service system are loaded from the proxy server so as to display a content page of the target service system in a display area of the browser client; when other business systems are opened in the browser client, original version resources of the other business systems are loaded from the proxy server so as to display content pages of the other business systems in a display area of the browser client.
In one possible implementation manner, the loading of the gray scale version resource for each service system may be divided into the loading of the gray scale version resource for all service systems or the loading of the gray scale version for a single service system, where if the gray scale version resource is for all service systems, all service systems have the gray scale version resource usage rights; if the gray version resource is aimed at a single service system, only the single service system has the gray version resource use authority, and the user can configure the gray version configuration information of the target webpage according to the update target of the gray version resource.
The implementation manner of loading the gray version resources of each service system is described below with reference to the embodiments.
In some embodiments, the step S121 of determining that the target user has the gray scale version resource usage rights of the target service system in the target web page according to the system domain name information in the gray scale version configuration information may include:
if the system domain name information includes: and determining that the target user has the gray version resource use authority of the unique service system corresponding to the complete system domain name.
In this embodiment, because the domain name of each service system is unique, if the system domain name information in the gray version configuration information is a complete system domain name, it is determined that the only service system corresponding to the complete system domain name is the target service system, and the target user has the gray version resource usage rights of the only service system corresponding to the complete system domain name, and the target user does not have the gray version resource usage rights of other service systems. In this case, the version resource acquisition request includes: complete system domain name and gray scale identification, other business systems except the business system corresponding to the complete system domain name default to the original identification.
For example, if the version identifier is configured as the gray identifier in the cookie data of the browser client and the complete system domain name is set in the domain attribute of the cookie data, the gray identifier is determined to be effective only for the service system corresponding to the complete system domain name, and the service systems corresponding to other domain names are not interfered, that is, only the service system corresponding to the complete system domain name has the gray version resource use permission, and the service systems corresponding to other domain names do not have the gray version resource use permission.
In other embodiments, the step S121 of determining that the target user has the gray scale version resource usage rights of the target service system in the target web page according to the system domain name information in the gray scale version configuration information may include:
if the system domain name information includes: and determining that the target user has gray scale version resource use rights of a plurality of service systems corresponding to the partial system domain name.
In this embodiment, if the system domain name information is a partial system domain name, that is, the domain name does not have a unique corresponding service system, the service system sharing gray-scale version resource usage rights with the partial system domain name are determined according to the system domain name of each service system, and the target user has the gray-scale version resource usage rights with a plurality of service systems corresponding to the partial system domain name. In this case, the version resource acquisition request includes: partial system domain name and gray scale identification.
In some embodiments, the system domain name of each business system is formed in the form of a primary domain name, a secondary domain name and a tertiary domain name, the primary domain names are connected by preset connectors "," wherein the tertiary domain name precedes the first preset connector "," the secondary domain name precedes the two preset connectors "," the primary domain name follows the second preset connector "," wherein the "tertiary domain name, the secondary domain name, the primary domain name" is a complete system domain name, the method comprises the steps that a unique service system is represented, a second-level domain name and a first-level domain name are partial system domain names, a plurality of service systems are represented, if the system domain name information in the version resource configuration information is a third-level domain name, a second-level domain name and a first-level domain name, the gray version resource use permission is only valid for the unique service system corresponding to the system domain name information, and other service systems do not have gray version resource use permission; and if the system domain name information in the version resource configuration information is the 'second-level domain name, the first-level domain name', the gray scale version resource use permission is shared among a plurality of service systems in a cross-domain manner.
By way of example, the plurality of business systems are divided into a main system and at least one subsystem, the system domain name of the main system is: www.xxxxxxx.com, the system domain names of the subsystems are respectively boss, xxxxxxx, ea, xxxxx, com and datav, xxxxx, com, wherein 'www', 'boss', 'ea', 'datav' are three-level domain names, 'xxxxxxx' is a two-level domain name, 'com' is a first-level domain name, and if the system domain name information in the gray-scale version resource configuration information is 'www.xxxxxxx.com', only the main system corresponding to 'www.xxxxxxx.com' has gray-scale version resource use authority; if the system domain name information in the gray scale version resource configuration information is 'ea.xxxxxx.com', only the subsystem corresponding to the 'ea.xxxxxx.com' has gray scale version resource use permission; if the system domain name information in the gray-scale version resource configuration information is ". Xxxxx.com", all the systems corresponding to ". Xxxxx.com" have gray-scale version resource use permission.
According to the gray scale test method provided by the embodiment, the target service system with the gray scale version resource use permission is determined based on the system domain name information set in the gray scale version configuration information, the loading of the gray scale version resource is realized for the target service system, in one case, the gray scale version resource use permission is only effective for a single service system through setting the complete system domain name, in the other case, the cross-domain sharing of the gray scale version resource use permission is realized through setting part of the system domain name, and therefore the loading mode of the version resource is flexibly set according to the version updating requirement.
In one possible implementation, when there is a problem with the grayscale version resource, it is necessary to ensure that the user can continue to use the target web page.
In some embodiments, please refer to fig. 5, which is a flowchart of a gray scale testing method according to an embodiment of the present application, as shown in fig. 5, after the step S103 of displaying the content page of the target web page by loading the gray scale version resource of the target web page, the method may further include:
s201: and receiving a rollback instruction sent by the proxy server, wherein the rollback instruction is sent to the proxy server when the production server determines that the gray version resource is abnormal.
S202: and updating the gray scale version configuration information according to the rollback instruction, so that the updated gray scale version configuration information indicates that the target user does not have the gray scale version resource use authority.
In this embodiment, when the log system of the production server monitors that the gray scale version of the target web page running in the browser client is abnormal, it is determined that the gray scale version is severely abnormal, and at this time, the rights of all users having the gray scale version resource use rights of the target web page need to be cancelled.
Specifically, a rollback instruction is sent to the browser client through the proxy server, the rollback instruction is used for indicating the browser client to stop using the gray version resources of the target webpage, after the browser client receives the rollback instruction, gray version configuration information of the target webpage is modified, so that the target user does not have gray version resource use permission, in this case, when a new operation step is executed in the target webpage, the browser client obtains the original version resources of the target webpage from the second generation server through the proxy server, and the content page of the target webpage is displayed by loading the original version resources of the target webpage. The new operation step may be, for example, performing a re-login or page refreshing operation on the target webpage, so that the background is switched to the original version without perception, thereby realizing the normal function of the target webpage and ensuring the user experience.
Similarly, the authority of other users configured to have the gray scale version resource use authority in the gray scale version configuration information can be cancelled, after the other users log in the target webpage, the gray scale version resource use authority of the target webpage is not indicated by the gray scale version resource configuration information, and the original version resource can be acquired and loaded from the second production server through the proxy server, so that the user experience of the other users is ensured not to be applied when the test version has a problem.
In other embodiments, in addition to the error reporting information or the abnormal operation monitored through the system log of the production server, the target user or the tester may find an error when using the gray version, in which case, the target user or the tester may modify the gray version configuration information of the target web page to have no gray version resource usage authority of the target web page in the browser client.
In one possible implementation manner, the transmission of the rollback instruction IS performed between the nginx server, the browser client and the production server through websocket interfaces, and after the browser client receives the rollback instruction, the version identifier is_canary in the cookie data IS modified from 1 to 0.
According to the gray level testing method provided by the embodiment, when the gray level version resource is determined to be abnormal, the gray level version configuration information is updated according to the rollback instruction, so that the updated gray level version resource configuration information indicates that the target user does not have the gray level version resource use authority, the target user continues to use the original version resource, the normal function of the target webpage is realized, and the user experience is ensured.
Based on the above gray scale test system, the following describes a specific implementation manner of the gray scale test method applied to the proxy server according to the present application with reference to the drawings and the embodiments.
Referring to fig. 6, a fifth flowchart of a gray scale test method according to an embodiment of the present application is shown in fig. 6, and the method may include:
s301: receiving a version resource acquisition request, sent by a browser client, of a target user aiming at a target webpage, wherein the version resource acquisition request at least comprises: version identification.
The version resource obtaining request is a request sent by the browser client according to information of a target user in a login request aiming at a target webpage and according to pre-cached gray version configuration information of the target webpage.
In this embodiment, if the gray version configuration information indicates that the target user has the gray version resource usage right of the target web page, the version identifier in the version resource acquisition request is the gray identifier, and if the gray version configuration information indicates that the target user does not have the gray version resource usage right of the target web page, the version identifier in the version resource acquisition request is the original identifier.
S302: if the version identification indicates that the required version of the target user is a gray version, forwarding a version resource acquisition request to a first production server so that the browser client side acquires gray version resources of the target webpage from the first production server, and displaying a content page of the target webpage by loading the gray version resources of the target webpage.
In this embodiment, if the version identifier is a gray scale identifier, determining that the required version of the target user is a gray scale version, the version resource obtaining request further includes: the method comprises the steps that a proxy server determines a production server where a gray version resource corresponding to a gray scale identifier of a target webpage is located as a first production server according to the URL of the target webpage and the gray scale identifier, and forwards a version resource acquisition request to the first production server, so that a browser client side acquires the gray scale version resource of the target webpage from the first production server.
In one possible implementation, the method may further include:
if the version identification indicates that the required version of the target user is the original version, forwarding a version resource acquisition request to a second production server so that the browser client side acquires the original version resource of the target webpage from the second production server, and displaying the content page of the target webpage by loading the original version resource of the target webpage.
In this embodiment, if the version identifier is an original identifier, determining that the required version of the target user is the original version, and the version resource obtaining request further includes: the proxy server determines that the production server where the original version resource corresponding to the original identifier of the target webpage is located is a second production server according to the URL of the target webpage and the original identifier, and forwards the version resource acquisition request to the second production server so that the browser client side acquires the original version resource of the target webpage from the second production server.
For example, when the nginx server is used as a proxy server, the following is a code for implementing forwarding of the version resource acquisition request according to the version identifier:
set $IS_CANARY ""; defining gray scale configuration
if ($http_cookie) = ([ \w- ] +
set$IS_CANARY"$1";
}
set $WEB_ROOT/usr/local/WEB/angular; setting default root directory of resource, and forwarding resource obtaining request of default version to second production server
if ($is_canary=1) {// if a gray scale identification IS matched, forwarding the version resource acquisition request to the first production server
set$WEB_ROOT/usr/local/web/angular_canary;
}
root$WEB_ROOT;
index login-common.html.
According to the gray level testing method provided by the embodiment, whether the gray level version resource of the target webpage is loaded in the browser client is determined according to the version identification in the version resource acquisition request, and the test of the new version among users with small range of gray level version resource use authorities is realized, so that the use opinion of the users for the new version is collected in advance, the function of the new version is perfected in time, the stable upgrading of the new version of the webpage is ensured, the influence range of the users is controlled within the minimum range when the new version has problems, most users are not influenced, and the experience of the users is ensured.
In a possible implementation manner, please refer to fig. 7, which is a flowchart of a gray scale test method according to an embodiment of the present application, as shown in fig. 7, after the step S302 of forwarding the version resource obtaining request to the first production server, the method may further include:
s303: and receiving a rollback instruction sent by the first production server when the gray version resource is determined to be abnormal.
S304: and sending a rollback instruction to the browser client to instruct the browser client to update the gray version configuration information according to the rollback instruction, wherein the updated gray version configuration information indicates that the target user does not have gray version resource use permission.
In this embodiment, the proxy server forwards the rollback instruction sent by the first production server to the browser client, so that the browser client modifies the gray version configuration information of the target webpage according to the rollback instruction, so that the target user does not have the gray version resource use authority, and the process can refer to S201-S202 described above, which is not described herein.
The proxy server, the first production server and the browser client can forward the rollback instruction through a websocket interface.
According to the gray level testing method provided by the embodiment, when the gray level version resource is determined to be abnormal, the rollback instruction is forwarded to the browser client, so that the browser client updates the gray level version configuration information according to the rollback instruction, the updated gray level version resource configuration information indicates that the target user does not have the gray level version resource use permission, the target user continues to use the original version resource, the normal function of the target webpage is realized, and the user experience is ensured.
On the basis of the method embodiment, the embodiment of the application also provides a gray scale testing device which is applied to the browser client. Referring to fig. 8, a first schematic structural diagram of a gray scale testing apparatus according to an embodiment of the present application is shown in fig. 8, and the apparatus may include:
a configuration information obtaining module 101, configured to obtain, according to information of a target user in a login request for a target web page, pre-cached gray version configuration information of the target web page, where the gray version configuration information is used to indicate whether the target user has a gray version resource usage right of the target web page;
the gray scale version resource obtaining module 102 is configured to obtain gray scale version resources of the target webpage from the production server through the proxy server if the gray scale version configuration information indicates that the target user has the gray scale version resource use authority of the target webpage;
the gray scale version resource loading module 103 is configured to display a content page of the target web page by loading a gray scale version resource of the target web page.
Optionally, the apparatus further comprises:
the original version resource acquisition module is used for acquiring original version resources of the target webpage from the second production server through the proxy server if the gray version configuration information indicates that the target user does not have gray version resource use permission;
And the original version resource loading module is used for displaying the content page of the target webpage by loading the original version resource.
Optionally, if the target web page includes a plurality of service systems, the gray scale version resource obtaining module 102 includes:
the system permission determining unit is used for determining that the target user has the gray version resource use permission of the target service system in the target webpage according to the system domain name information in the gray version configuration information, wherein the system domain name information is used for indicating the domain name of the target service system;
the system resource acquisition unit is used for acquiring gray version resources of the target service system from the first production server through the proxy server;
the gray scale version resource loading module 103 is specifically configured to display a content page of the target service system by loading a gray scale version resource of the target service system.
Optionally, the system permission determining unit is specifically configured to, if the system domain name information includes: the method comprises the steps of determining a gray version resource use authority of a unique service system corresponding to a complete system domain name of a target user; alternatively, if the system domain name information includes: and determining that the target user has gray scale version resource use rights of a plurality of service systems corresponding to the partial system domain name.
Optionally, after the grayscale version resource loading module 103, the apparatus further includes:
the rollback instruction receiving module is used for receiving a rollback instruction sent by the proxy server, wherein the rollback instruction is sent to the proxy server when the production server determines that the gray version resource is abnormal;
and the configuration information updating module is used for updating the gray version configuration information according to the rollback instruction so that the updated gray version configuration information indicates that the target user does not have gray version resource use permission.
On the basis of the method embodiment, the embodiment of the application also provides a gray scale testing device which is applied to the proxy server. Referring to fig. 9, a second schematic structural diagram of a gray scale testing apparatus according to an embodiment of the present application is shown in fig. 9, and the apparatus may include:
the resource acquisition request receiving module 301 is configured to receive a version resource acquisition request for a target webpage, sent by a browser client, where the version resource acquisition request at least includes: version identification; the version resource acquisition request is a request sent by a browser client according to information of a target user in a login request aiming at a target webpage and according to pre-cached gray version configuration information of the target webpage;
The resource obtaining request forwarding module 302 is configured to forward the version resource obtaining request to the first production server if the version identifier indicates that the required version of the target user is a gray version, so that the browser client obtains the gray version resource of the target webpage from the first production server, and displays the content page of the target webpage by loading the gray version resource of the target webpage.
Optionally, the resource obtaining request forwarding module 302 is further configured to forward the version resource obtaining request to the second production server if the version identifier indicates that the required version of the target user is the original version, so that the browser client obtains the original version resource of the target webpage from the second production server, and displays the content page of the target webpage by loading the original version resource of the target webpage.
Optionally, after the resource acquisition request forwarding module 302, the apparatus further includes:
the rollback instruction acquisition module is used for receiving a rollback instruction sent by the first production server when the gray version resource is determined to be abnormal;
and the rollback instruction forwarding module is used for sending a rollback instruction to the browser client to instruct the browser client to update the gray version configuration information according to the rollback instruction, wherein the updated gray version configuration information indicates that the target user does not have gray version resource use permission.
The foregoing apparatus is used for executing the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The above modules may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASICs), or one or more microprocessors, or one or more field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGAs), etc. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processor that may invoke the program code. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
On the basis of the embodiment, the embodiment of the application also provides electronic equipment. Referring to fig. 10, a schematic diagram of an electronic device according to an embodiment of the present application is shown in fig. 10, where the electronic device 100 includes: the processor 110, the storage medium 120, and the bus, the storage medium 120 stores program instructions executable by the processor 110, and when the electronic device 100 is running, the processor 110 communicates with the storage medium 120 through the bus, and the processor 110 executes the program instructions to perform an embodiment of the gray scale test method applied to the browser client as described above, or an embodiment of the gray scale test method applied to the proxy server as described above. The specific implementation manner and the technical effect are similar, and are not repeated here.
Optionally, an embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor performs an embodiment of a gray scale test method applied to a browser client as described above, or an embodiment of a gray scale test method applied to a proxy server as described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.
The integrated units implemented in the form of software functional units described above may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention. And the aforementioned storage medium includes: u disk, mobile hard disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing is merely illustrative of embodiments of the present invention, and the present invention is not limited thereto, and any changes or substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and the present invention is intended to be covered by the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. A gray scale testing method, applied to a browser client, comprising:
acquiring pre-cached gray scale version configuration information of a target webpage according to information of the target user in a login request aiming at the target webpage, wherein the gray scale version configuration information is used for indicating whether the target user has gray scale version resource use permission of the target webpage;
if the gray version configuration information indicates that the target user has the gray version resource use authority of the target webpage, acquiring the gray version resource of the target webpage from a first production server through a proxy server;
and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
2. The method according to claim 1, wherein the method further comprises:
if the gray version configuration information indicates that the target user does not have the gray version resource use authority, acquiring an original version resource of the target webpage from a second production server through the proxy server;
and displaying the content page of the target webpage by loading the original version resource of the target webpage.
3. The method of claim 1, wherein if the target web page includes a plurality of business systems, the obtaining, by a proxy server, the grayscale version resource of the target web page from a first production server if the grayscale version configuration information indicates that the target user has grayscale version resource usage rights for the target web page, comprises:
determining that the target user has the gray version resource use authority of a target service system in the target webpage according to the system domain name information in the gray version configuration information, wherein the system domain name information is used for indicating the domain name of the target service system;
acquiring gray scale version resources of the target service system from the first production server through the proxy server;
the displaying the content page of the target webpage by loading the gray version resource of the target webpage comprises the following steps:
and displaying the content page of the target service system by loading the gray version resource of the target service system.
4. The method according to claim 3, wherein the determining that the target user has the gray scale version resource usage right of the target service system in the target web page according to the system domain name information in the gray scale version configuration information comprises:
If the system domain name information includes: a complete system domain name, and determining that the target user has the gray version resource use authority of a unique service system corresponding to the complete system domain name; or,
if the system domain name information includes: and determining that the target user has gray scale version resource use rights of a plurality of service systems corresponding to the partial system domain name.
5. The method of claim 1, wherein after the displaying the content page of the target web page by loading the grayscale version resource of the target web page, the method further comprises:
receiving a rollback instruction sent by the proxy server, wherein the rollback instruction is sent to the proxy server when the production server determines that the gray version resource is abnormal;
and updating the gray scale version configuration information according to the rollback instruction, so that the updated gray scale version configuration information indicates that the target user does not have the gray scale version resource use permission.
6. A greyscale testing method, applied to a proxy server, comprising:
receiving a version resource acquisition request, sent by a browser client, of a target user aiming at a target webpage, wherein the version resource acquisition request at least comprises: version identification; the version resource obtaining request is a request sent by the browser client according to the information of the target user in the login request aiming at the target webpage and the pre-cached gray version configuration information of the target webpage;
And if the version identifier indicates that the required version of the target user is a gray version, forwarding the version resource acquisition request to a first production server so that the browser client acquires the gray version resource of the target webpage from the first production server, and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
7. The method of claim 6, wherein the method further comprises:
and if the version identifier indicates that the required version of the target user is an original version, forwarding the version resource acquisition request to a second production server, so that the browser client acquires the original version resource of the target webpage from the second production server, and displaying the content page of the target webpage by loading the original version resource of the target webpage.
8. The method of claim 6, wherein after forwarding the version resource acquisition request to a first production server, the method further comprises:
receiving a rollback instruction sent by the first production server when the gray version resource is determined to be abnormal;
And sending the rollback instruction to the browser client to instruct the browser client to update the gray scale version configuration information according to the rollback instruction, wherein the updated gray scale version configuration information indicates that the target user does not have gray scale version resource use permission.
9. A gray scale testing apparatus for application to a browser client, said apparatus comprising:
the configuration information acquisition module is used for acquiring pre-cached gray version configuration information of a target webpage according to information of the target user in a login request aiming at the target webpage, wherein the gray version configuration information is used for indicating whether the target user has gray version resource use permission of the target webpage;
the gray scale version resource acquisition module is used for acquiring gray scale version resources of the target webpage from a production server through a proxy server if the gray scale version configuration information indicates that the target user has the gray scale version resource use authority of the target webpage;
and the gray version resource loading module is used for displaying the content page of the target webpage by loading the gray version resource of the target webpage.
10. A greyscale testing apparatus for use with a proxy server, the apparatus comprising:
the resource acquisition request receiving module is used for receiving a version resource acquisition request, sent by the browser client, of a target user aiming at a target webpage, wherein the version resource acquisition request at least comprises: version identification; the version resource obtaining request is a request sent by the browser client according to the information of the target user in the login request aiming at the target webpage and the pre-cached gray version configuration information of the target webpage;
and the resource acquisition request forwarding module is used for forwarding the version resource acquisition request to a first production server if the version identification indicates that the required version of the target user is a gray version, so that the browser client acquires the gray version resource of the target webpage from the first production server, and displaying the content page of the target webpage by loading the gray version resource of the target webpage.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310897202.XA CN116955172A (en) | 2023-07-20 | 2023-07-20 | Gray scale test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310897202.XA CN116955172A (en) | 2023-07-20 | 2023-07-20 | Gray scale test method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116955172A true CN116955172A (en) | 2023-10-27 |
Family
ID=88461437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310897202.XA Pending CN116955172A (en) | 2023-07-20 | 2023-07-20 | Gray scale test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116955172A (en) |
-
2023
- 2023-07-20 CN CN202310897202.XA patent/CN116955172A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109787830B (en) | Gray scale distribution control method, device, system, electronic device and storage medium | |
US10103931B2 (en) | Session-based matching of mutable browser identifiers | |
US9444899B2 (en) | Use of internet information services logging to collect user information in an asynchronous manner | |
US8375383B2 (en) | Rolling upgrades in distributed applications | |
CN113204730B (en) | Resource acquisition method, webvpn proxy server, system and server | |
CN113094136A (en) | Page display control method and device, storage medium and electronic equipment | |
CN111913738A (en) | Access request processing method, device, computing equipment and medium | |
CN110647335B (en) | Software gray level release method and device, electronic equipment and storage medium | |
CN114697304B (en) | Gray release method, system, device, equipment and storage medium | |
CN115168162B (en) | Multi-gray-scale issuing method and device based on ingess controller in container environment and storage medium | |
CN111431767A (en) | Multi-browser resource synchronization method and device, computer equipment and storage medium | |
CN103684977A (en) | Information transmission method and device and information display method and device | |
CN111783005B (en) | Method, device and system for displaying web page, computer system and medium | |
US9348923B2 (en) | Software asset management using a browser plug-in | |
CN116955172A (en) | Gray scale test method and device | |
CN108287792B (en) | Method and apparatus for outputting information | |
KR20100113975A (en) | Method of an xml document management to cancel a specific past operation selectively, and system using the same | |
CN113132447A (en) | Reverse proxy method and system | |
CN110874433A (en) | Information processing method and system, computer system and computer readable medium | |
CN115314552B (en) | Data processing method and device, electronic equipment and storage medium | |
CN117411847B (en) | Mail out-link picture transfer method, system and medium | |
US20220391465A1 (en) | System and Method to Update a Bookmarked Document Link and Avoid a Broken Link | |
CN115426394A (en) | Communication connection method, communication connection device, electronic equipment and storage medium | |
CN117131295A (en) | Resource management method, system, device, electronic equipment and storage medium | |
CN115643253A (en) | Cross-domain file request method and device and business service system |
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 |