A verification method for a service platform and related devices
By receiving data access requests carrying domain names in the server and determining the target database from the production database and verification database based on preset rules, the problem of difficulty in verifying the business platform in the production environment is solved, and efficient verification of the online business platform and timely resolution of the problems is achieved.
Patent Information
- Application Number
- CN202010180487.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-19
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-03-19
AI Technical Summary
The existing technology is difficult to verify the business platform in a production environment, which leads to the fact that the problem is discovered later after it is launched and cannot be solved in time.
By receiving data access requests carrying domain names in the server, determining the target database from the production database and verification database based on preset selection rules, and performing data operations, verification of the business platform is achieved.
It realizes efficient verification of the online business platform in the production environment, timely discovers and solves problems, and ensures the normal operation of the business platform.
Smart Images

Figure CN111475400B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a verification method for a service platform and related equipment. Background Art
[0002] When the business platform is developed or the version is updated, it is usually necessary to verify the business platform before going online. However, the deployment status, network status, historical data, configuration and other information of the test and development environment are difficult to be completely consistent with the configuration of the production environment. After the business platform is launched, the development, testing, operation and other personnel cannot verify the business platform in the production environment (i.e. after the launch). It is unknown whether the content of the online change is normal and whether the functional process can be used normally. It can only be exposed when ordinary users use it, and problems cannot be discovered and solved in time. Therefore, how to verify the business platform in the production environment has become an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present application provide a method and related equipment for verifying a service platform, which can efficiently verify the service platform after it goes online.
[0004] In a first aspect, an embodiment of the present application provides a method for verifying a service platform, the method being applied to a server corresponding to the service platform, the method comprising:
[0005] Receiving a data access request carrying a domain name sent by the business platform after going online, the domain name includes a verification domain name or a production domain name, the verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in the production environment;
[0006] Determine a target database matching the domain name from at least two preset databases based on a preset selection rule;
[0007] The data operation corresponding to the data access request is executed through the target database, and the data operation includes data query and / or data writing.
[0008] In one embodiment, the at least two preset databases include a production database and a verification database, and the specific implementation of determining the target database matching the domain name from the at least two preset databases based on the preset database selection rule is:
[0009] If it is detected that the domain name carried in the data access request is a verification domain name, then the verification token carried in the data access request is compared with a preset verification token under the verification domain name;
[0010] If the verification token matches the preset verification token through comparison, the verification database is determined as a target database matching the verification domain name from at least two preset databases.
[0011] In one embodiment, after comparing the verification token carried in the data access request with the preset verification token under the verification domain name, if the comparison shows that the verification token does not match the preset verification token, the production database is determined as the target database matching the verification domain name from at least two preset databases.
[0012] In one embodiment, the at least two preset databases include a production database and a verification database, and the specific implementation method of determining the target database matching the domain name from at least two preset databases based on the preset database selection rule is: if it is detected that the domain name carried in the data access request is a production domain name, the production database is determined as the target database matching the production domain name from at least two preset databases.
[0013] In one embodiment, the business platform after going online can also be verified in a production environment through at least one test case; if it is detected that the verification of the business platform after going online by the first test case fails, it is determined that the current version of the business platform has an operation error, and the first test case is any one of the at least one test case; a version rollback operation is performed on the current version of the business platform.
[0014] In one embodiment, before performing a version rollback operation on the current version of the business platform, the corresponding exception type for which the verification fails can also be detected; if the exception type is a preset type, the step of performing a version rollback operation on the current version of the business platform is triggered, and the preset type includes a null pointer exception or a business exception.
[0015] In one embodiment, if it is detected that the first test case fails the verification of the business platform after going online, it is determined whether the exception type corresponding to the failure of the verification is a sub-module exception or a log exception of the business platform; if it is determined that the exception type corresponding to the failure of the verification is a sub-module exception or a log exception, an alarm message is output.
[0016] In a second aspect, an embodiment of the present application provides a verification device for a service platform, and the verification device for the service platform includes a module for executing the method of the first aspect above.
[0017] In a third aspect, an embodiment of the present application provides a server, comprising a processor, a network interface and a memory, wherein the processor, network interface and memory are interconnected, wherein the network interface is controlled by the processor for sending and receiving messages, and the memory is used to store a computer program that supports the server to execute the above method, wherein the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method of the above first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method of the first aspect above.
[0019] In the embodiment of the present application, when the server receives a data access request sent by the business platform after going online, it can determine a target database that matches the domain name carried in the data access request from at least two preset databases based on a preset selection rule, and perform a data operation corresponding to the data access request through the target database. For data access based on different domain names, different target databases can be used to perform data operations, thereby efficiently realizing the verification of the business platform after going online. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 It is a structural diagram of a verification system of a business platform provided in an embodiment of the present application;
[0022] Figure 2 It is a flowchart of a verification method of a business platform provided in an embodiment of the present application;
[0023] Figure 3 It is a flowchart of another verification method of a business platform provided in an embodiment of the present application;
[0024] Figure 4 It is a schematic block diagram of a verification device for a business platform provided in an embodiment of the present application;
[0025] Figure 5 It is a schematic block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] See also Figure 1 , is a verification system for a business platform provided in an embodiment of the present application, the verification system includes a business platform 100 and a server 200 corresponding to the business platform, the server pre-sets at least two databases, including a production database and a verification database. In one embodiment, a production domain name and a verification domain name can be pre-configured, the verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in a production environment. Among them, the first user can be understood as a person who needs to verify the business platform for development, testing, operation, etc. The first user uses the verification domain name to access the business platform after it goes online, and verifies the business platform in the production environment through the verification domain name; the second user is an ordinary user using the business platform, and the second user uses the production domain name to access the business platform after it goes online.
[0028] Further, the first user or the second user can send a data access request carrying the domain name corresponding to itself to the server 200 through the business platform 100. When the server 200 receives the data access request carrying the domain name sent by the business platform 100 after going online, it can determine the target database matching the domain name from at least two preset databases based on the preset selection rules, and perform the data operation corresponding to the data access request through the target database, and the data operation includes data query and / or data writing. Among them, the target database includes a production database or a verification database. When implementing the embodiment of the present application, when receiving data access requests from different domain names, the target database matching the domain name can be used to perform the data operation corresponding to the data access request. On the one hand, the data generated by the data access under different domain names are isolated from each other and will not be contaminated by each other; on the other hand, the first user can verify the business platform under the production environment by verifying the domain name, and efficiently realize the verification of the business platform under the production environment.
[0029] It can be understood that the verification system of the business platform described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0030] See also Figure 2 , Figure 2 : is a flow chart of a verification method of a service platform provided in an embodiment of the present application. The method is applied to a server and can be executed by the server. As shown in the figure, the verification method of the service platform may include:
[0031] S201: Receive a data access request carrying a domain name sent by the business platform after going online. The domain name includes a verification domain name or a production domain name. The verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in a production environment.
[0032] In one embodiment, developers can pre-configure a production domain name and a verification domain name. The verification domain name is used by the first user to verify the business platform in the production environment, and the production domain name is used by the second user to access the business platform in the production environment. The first user can be understood as a person who needs to verify the business platform, such as developers, testers, and operators. The first user uses the verification domain name to access the business platform after it goes online, and verifies the business platform in the production environment through the verification domain name; the second user is an ordinary user who uses the business platform, and the second user uses the production domain name to access the business platform after it goes online.
[0033] In one embodiment, the first user can access the service platform through the verification domain name. In this case, the service platform can generate a data access request carrying the verification domain name and send the data access request carrying the verification domain name to the server corresponding to the service platform.
[0034] In one embodiment, the second user can access the service platform through the production domain name. In this case, the service platform can generate a data access request carrying the production domain name and send the data access request carrying the production domain name to the server corresponding to the service platform.
[0035] S202: Determine a target database matching the domain name from at least two preset databases based on a preset selection rule.
[0036] S203: Execute a data operation corresponding to the data access request through the target database, where the data operation includes querying data and / or writing data.
[0037] Among them, the above-mentioned at least two preset databases include a production database and a verification database. In one embodiment, the server can determine a target database matching the domain name from at least two preset databases based on a preset selection rule, and the target database includes a production database or a verification database. Further, the data operation corresponding to the data access request is performed through the target database. Using a target database matching the domain name to perform data operations corresponding to the data access request can make the data generated by data access based on different domain names in the business platform stored in different target databases, so that the data are isolated from each other and will not be contaminated by each other, which is not only conducive to ensuring efficient verification of the business platform in the production environment, but also ensures that the data generated by the verification process does not affect the access of the second user, thereby ensuring the performance of the business platform.
[0038] In the embodiment of the present application, when the server receives a data access request sent by the business platform after going online, it can determine a target database that matches the domain name carried in the data access request from at least two preset databases based on a preset selection rule, and perform a data operation corresponding to the data access request through the target database. For data access based on different domain names, different target databases can be used to perform data operations, thereby efficiently realizing the verification of the business platform after going online.
[0039] See also Figure 3 , Figure 3 is a schematic diagram of another verification method of a service platform provided in an embodiment of the present application. The method is applied to a server and can be executed by the server. As shown in the figure, the verification method of the service platform may include:
[0040] S301: Receive a data access request carrying a domain name sent by the business platform after going online. The domain name includes a verification domain name or a production domain name. The verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in a production environment.
[0041] S302: If it is detected that the domain name carried in the data access request is a verification domain name, the verification token carried in the data access request is compared with a preset verification token under the verification domain name.
[0042] S303: If the verification token matches the preset verification token, the verification database is determined as a target database matching the domain name from at least two preset databases, wherein the at least two preset databases include a production database and a verification database.
[0043] In one embodiment, after the server compares the verification token carried in the data access request with the preset verification token under the verification domain name, if the verification token obtained by comparison does not match the preset verification token, the production database is determined as the target database matching the domain name from at least two preset databases.
[0044] In one embodiment, all requests for access through the verification domain name will carry a request header of validation-token, and developers can pre-configure the verification token under the verification domain name (i.e., the preset verification token). In this case, when the server receives a data access request carrying the domain name sent by the business platform after going online, it can detect whether there is a verification token from the request header of the data access request. If it exists, the verification token carried by the data access request is compared with the preset verification token. If the comparison shows that the verification token carried by the data access request is the same as the preset verification token, it can be determined that the verification token matches the preset verification token. If the comparison shows that the verification token carried by the data access request is different from the preset verification token, it can be determined that the verification token does not match the preset verification token.
[0045] In another embodiment, if the server detects that the domain name carried in the data access request is a production domain name, the server may determine the production database as a target database matching the production domain name from at least two preset databases.
[0046] S304: Execute a data operation corresponding to the data access request through the target database, where the data operation includes querying data and / or writing data.
[0047] In one embodiment, after the target database is determined, all data queries and writes in this data access process are completed through the target database, thereby achieving verification of the business platform in a production environment.
[0048] In one embodiment, the data access request in step S301 is issued when verifying the online business platform in a production environment based on at least one test case. In this case, the server can
[0049] The service platform after going online is verified in a production environment through at least one test case, and if it is detected that the verification of the service platform after going online by the first test case fails, it is determined that the current version of the service platform is running incorrectly, and the first test case is any one of the at least one test case. Further, the server performs a version rollback operation on the current version of the service platform.
[0050] In one embodiment, the specific implementation method of the above-mentioned server performing a version rollback operation on the current version of the business platform is: obtaining the deployment file of the previous historical version of the business platform corresponding to the current version, canceling the launch of the current version of the business platform, and redeploying the previous historical version of the business platform based on the deployment file, thereby implementing the version rollback operation on the current version of the business platform.
[0051] For example, the verification domain name of the business platform is https: / / ************.com. In this case, after the new version is launched, testers, developers and other personnel can access the business platform through the https: / / ************.com domain name at any time. Test cases are used to verify whether the functional parts that have been changed after the version is launched can be used normally. If there are test cases that fail, it means that the current version still has problems that affect the normal operation of the application. Forcing it to go online will inevitably have a certain impact on user use. At this time, the version is rolled back, the application that ran well last time is redeployed, and the current launch is canceled.
[0052] For example, assuming that the current version of the service platform is a 2.1 version service platform, if a version rollback operation is required on the current version of the service platform, the 2.1 version service platform may be cancelled and the 2.0 version service platform may be redeployed.
[0053] In one implementation, before the server performs a version rollback operation on the current version of the business platform, it can also detect the corresponding exception type that fails the verification. If the exception type is a preset type, it triggers the step of performing a version rollback operation on the current version of the business platform. The preset type includes a null pointer exception or a business exception.
[0054] In another embodiment, if the server detects that the first test case fails to verify the online business platform, it determines whether the exception type corresponding to the verification failure is a submodule exception or a log exception of the business platform, and if it is determined that the exception type corresponding to the verification failure is a submodule exception or a log exception, an alarm message is output. The alarm message is used to prompt the submodule exception or the log exception.
[0055] In one embodiment, if the server determines that the exception type corresponding to the verification failure is a submodule exception, a version rollback operation can be performed on the submodule, where the submodule can be a functional module corresponding to the business platform, or a subsystem (such as a user login system).
[0056] In one embodiment, during the above test process, in order to prevent the server overload in the production environment from affecting the service platform, the maximum load capacity of the production environment can be verified through stress testing. Specifically, the server can call the stress testing tool to verify the maximum concurrency and throughput of the production environment, so as to adjust the hardware configuration of the production environment to ensure that the system can operate normally under high concurrency and high throughput conditions.
[0057] In the embodiment of the present application, when the server detects that the domain name carried in the data access request is a verification domain name, the verification token carried in the data access request can be compared with the preset verification token under the verification domain name. If the verification token matches the preset verification token, the verification database is determined as the target database matching the domain name from at least two preset databases, and the data operation corresponding to the data access request is performed through the verification database. The verification of the business platform in the production environment can be efficiently tested.
[0058] The present application also provides a verification device for a service platform. The device includes a device for executing the aforementioned Figure 2 or Figure 3 The module of the method is configured on the server. Figure 4 , is a schematic block diagram of a verification device for a service platform provided in an embodiment of the present application. The verification device for the service platform of this embodiment includes:
[0059] The communication module 40 is used to receive a data access request carrying a domain name sent by the service platform after going online, wherein the domain name includes a verification domain name or a production domain name, wherein the verification domain name is used by a first user to verify the service platform in a production environment, and the production domain name is used by a second user to access the service platform in the production environment;
[0060] A processing module 41, configured to determine a target database matching the domain name from at least two preset databases based on a preset selection rule;
[0061] The processing module 41 is further configured to execute a data operation corresponding to the data access request through the target database, wherein the data operation includes querying data and / or writing data.
[0062] In one embodiment, the at least two preset databases include a production database and a verification database, and the processing module 41 is specifically used to compare the verification token carried in the data access request with the preset verification token under the verification domain name if it is detected that the domain name carried in the data access request is a verification domain name; if the comparison shows that the verification token matches the preset verification token, the verification database is determined as a target database matching the verification domain name from at least two preset databases.
[0063] In one embodiment, the processing module 41 is further configured to determine the production database as a target database matching the verification domain name from at least two preset databases if the verification token does not match the preset verification token after comparison.
[0064] In one embodiment, the at least two preset databases include a production database and a verification database, and the processing module 41 is specifically used to determine the production database as a target database matching the production domain name from at least two preset databases if it is detected that the domain name carried in the data access request is a production domain name.
[0065] In one embodiment, the processing module 41 is also used to verify the business platform after it goes online in a production environment through at least one test case; if it is detected that the verification of the business platform after it goes online by the first test case fails, it is determined that the current version of the business platform has an operation error, and the first test case is any one of the at least one test case; and a version rollback operation is performed on the current version of the business platform.
[0066] In one embodiment, the processing module 41 is further used to detect the abnormal type corresponding to the failure of the verification;
[0067] If the exception type is a preset type, the step of performing a version rollback operation on the current version of the service platform is triggered, and the preset type includes a null pointer exception or a service exception.
[0068] In one embodiment, the processing module 41 is also used to determine whether the exception type corresponding to the failure of the verification is a sub-module exception or a log exception of the business platform if it is detected that the first test case fails the verification of the business platform after going online; if it is determined that the exception type corresponding to the failure of the verification is a sub-module exception or a log exception, an alarm message is output.
[0069] It should be noted that the functions of the various functional modules of the verification device of the business platform described in the embodiment of the present application can be based on Figure 2 or Figure 3 The specific implementation process of the method in the method embodiment can be referred to Figure 2 or Figure 3 The relevant description of the method embodiment will not be repeated here.
[0070] In the embodiment of the present application, when the communication module 40 receives a data access request sent by the business platform after going online, the processing module 41 can determine a target database that matches the domain name carried in the data access request from at least two preset databases based on a preset selection rule, and perform a data operation corresponding to the data access request through the target database. For data access based on different domain names, different target databases can be used to perform data operations, thereby efficiently realizing the verification of the business platform after going online.
[0071] See also Figure 5 , Figure 5 is a schematic block diagram of a server provided in an embodiment of the present application, such as Figure 5 As shown, the server includes a processor 501, a memory 502 and a network interface 503. The processor 501, the memory 502 and the network interface 503 can be connected via a bus or other means. Figure 5 Take the connection through the bus as an example. Wherein, the network interface 503 is controlled by the processor to send and receive messages, the memory 502 is used to store computer programs, the computer program includes program instructions, and the processor 501 is used to execute the program instructions stored in the memory 502. Wherein, the processor 501 is configured to call the program instructions to execute: receiving a data access request carrying a domain name sent by the business platform after going online through the network interface 503, the domain name includes a verification domain name or a production domain name, the verification domain name is used by the first user to verify the business platform in the production environment, and the production domain name is used by the second user to access the business platform in the production environment; based on the preset selection rules, determine the target database matching the domain name from at least two preset databases; perform the data operation corresponding to the data access request through the target database, and the data operation includes data query and / or data writing.
[0072] In one embodiment, the at least two preset databases include a production database and a verification database, and the processor 501 is specifically used to compare the verification token carried in the data access request with the preset verification token under the verification domain name if it is detected that the domain name carried in the data access request is a verification domain name; if the comparison shows that the verification token matches the preset verification token, the verification database is determined as a target database matching the verification domain name from at least two preset databases.
[0073] In one embodiment, the processor 501 is further configured to determine the production database as a target database matching the verification domain name from at least two preset databases if the verification token does not match the preset verification token after comparison.
[0074] In one embodiment, the at least two preset databases include a production database and a verification database, and the processor 501 is specifically used to determine the production database as a target database matching the production domain name from at least two preset databases if it is detected that the domain name carried in the data access request is a production domain name.
[0075] In one embodiment, the processor 501 is also used to verify the business platform after it goes online in a production environment through at least one test case; if it is detected that the verification of the business platform after it goes online by the first test case fails, it is determined that the current version of the business platform has an operation error, and the first test case is any one of the at least one test case; and a version rollback operation is performed on the current version of the business platform.
[0076] In one embodiment, the processor 501 is further configured to detect an exception type corresponding to the verification failure;
[0077] If the exception type is a preset type, the step of performing a version rollback operation on the current version of the service platform is triggered, and the preset type includes a null pointer exception or a service exception.
[0078] In one embodiment, the processor 501 is also used to determine whether the exception type corresponding to the failure of the verification is a sub-module exception or a log exception of the business platform if it is detected that the first test case fails the verification of the business platform after going online; if it is determined that the exception type corresponding to the failure of the verification is a sub-module exception or a log exception, an alarm message is output.
[0079] It should be understood that in the embodiment of the present application, the processor 501 may be a central processing unit (CPU), and the processor 501 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0080] The memory 502 may include a read-only memory and a random access memory, and provide instructions and data to the processor 501. A portion of the memory 502 may also include a non-volatile random access memory. For example, the memory 502 may also store information about the device type.
[0081] In a specific implementation, the processor 501, the memory 502 and the network interface 503 described in the embodiment of the present application can execute the Figure 2 or Figure 3 The implementation method described in the method embodiment can also execute the implementation method of the verification device of the business platform described in the embodiment of the present application, which will not be repeated here.
[0082] In the embodiment of the present application, when the network interface 503 receives a data access request sent by the business platform after going online, the processor 501 can determine a target database that matches the domain name carried in the data access request from at least two preset databases based on a preset selection rule, and perform a data operation corresponding to the data access request through the target database. For data access based on different domain names, different target databases can be used to perform data operations, thereby efficiently realizing the verification of the business platform after going online.
[0083] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the following are achieved: receiving a data access request carrying a domain name sent by the business platform after going online, wherein the domain name includes a verification domain name or a production domain name, wherein the verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in the production environment; determining a target database matching the domain name from at least two preset databases based on a preset selection rule; and executing a data operation corresponding to the data access request through the target database, wherein the data operation includes querying data and / or writing data.
[0084] The computer-readable storage medium may be an internal storage unit of the server described in any of the foregoing embodiments, such as a hard disk or memory of the server. The computer-readable storage medium may also be an external storage device of the server, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the server. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the server and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the server. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0086] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.
Claims
1. A verification method for a business platform, It is characterized in that The method comprises: Receiving a data access request carrying a domain name sent by the business platform after going online, the domain name includes a verification domain name or a production domain name, the verification domain name is used by a first user to verify the business platform in a production environment, and the production domain name is used by a second user to access the business platform in the production environment; Based on a preset selection rule, a target database matching the domain name is determined from at least two preset databases; wherein the at least two preset databases include a production database and a verification database, and the method for determining the target database includes: if it is detected that the domain name carried in the data access request is a verification domain name, then the verification token carried in the data access request is compared with the preset verification token under the verification domain name; if the comparison shows that the verification token matches the preset verification token, then the verification database is determined as the target database matching the verification domain name from at least two preset databases; if the comparison shows that the verification token does not match the preset verification token, then the production database is determined as the target database matching the verification domain name from at least two preset databases; if it is detected that the domain name carried in the data access request is a production domain name, then the production database is determined as the target database matching the production domain name from at least two preset databases; Executing the data operation corresponding to the data access request through the target database, the data operation including data query and / or data writing; the method further includes: Verify the business platform in a production environment after it goes online through at least one test case; If it is detected that the verification of the online business platform by the first test case fails, determining that the current version of the business platform has an operation error, the first test case being any one of the at least one test case; Detecting the abnormality type corresponding to the failure of the verification; If the exception type is a preset type, a version rollback operation is performed on the current version of the business platform, and the preset type includes a null pointer exception or a business exception.
2. The method according to claim 1, It is characterized in that The method further comprises: If it is detected that the first test case fails to verify the online business platform, determining whether the exception type corresponding to the verification failure is a submodule exception or a log exception of the business platform; If it is determined that the exception type corresponding to the failure of the verification is the submodule exception or the log exception, an alarm message is output.
3. A verification device for a business platform, It is characterized in that The device comprises: A communication module, used to receive a data access request carrying a domain name sent by the service platform after going online, wherein the domain name includes a verification domain name or a production domain name, wherein the verification domain name is used by a first user to verify the service platform in a production environment, and the production domain name is used by a second user to access the service platform in the production environment; A processing module, used to determine a target database matching the domain name from at least two preset databases based on a preset selection rule; wherein the at least two preset databases include a production database and a verification database, and a method for determining the target database includes: if it is detected that the domain name carried in the data access request is a verification domain name, then comparing the verification token carried in the data access request with a preset verification token under the verification domain name; if the comparison shows that the verification token matches the preset verification token, then determining the verification database as the target database matching the verification domain name from at least two preset databases; if the comparison shows that the verification token does not match the preset verification token, then determining the production database as the target database matching the verification domain name from at least two preset databases; if it is detected that the domain name carried in the data access request is a production domain name, then determining the production database as the target database matching the production domain name from at least two preset databases; The processing module is further used to execute the data operation corresponding to the data access request through the target database, and the data operation includes data query and / or data writing; The processing module is also used to verify the business platform after it goes online in a production environment through at least one test case; if it is detected that the verification of the business platform after it goes online by the first test case fails, it is determined that the current version of the business platform has an operation error, and the first test case is any one of the at least one test case; detect the exception type corresponding to the failure of the verification; if the exception type is a preset type, perform a version rollback operation on the current version of the business platform, and the preset type includes a null pointer exception or a business exception.
4. A server, It is characterized in that The method comprises a processor and a memory, wherein the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 2.
5. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Website test method, device and system
CN107154976A
Method and system for software-as-a-service platform lessee data isolation and sharing
CN108038390A
Service testing method and device
CN108075911A