Testing method, device, equipment and storage medium for remote multi-active financial system
Through the scenario stress testing method, a comprehensive test of the off-site multi-active financial system was solved, and the stability problem of the system in extreme scenarios was improved and the performance and reliability of the system were improved.
Patent Information
- Application Number
- CN202111267074.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing off-site multi-active financial system may lead to transmission delays in extreme scenarios, affect system stability, and lack effective testing and verification methods.
Using a scenario stress test method, the off-site multi-living financial system is tested by running pre-written test scripts, including routing scenarios for business requests, data synchronization storage scenarios, cross-computer room call scenarios, computer room switching scenarios, cluster mode scenarios, Business split scenarios and performance capacity testing scenarios, obtain and analyze business response data to evaluate system performance and stability.
Through multi-dimensional testing and verification, the stability of the off-site multi-active financial system can be improved, ensuring the reliability and performance of the system in extreme scenarios, and avoiding the impact of delays and failures.
Smart Images

Figure CN114020615B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a testing method, device, equipment and storage medium for a remote multi-active financial system. Background Art
[0002] At present, the technology of replacing manual business processing with data centers is widely used in various industries due to its high efficiency and speed, including financial systems with high stability requirements.
[0003] Existing financial systems generally use data centers with a multi-site active-active architecture to handle business, in order to deal with the problem of partial server failure in extreme scenarios. However, the multi-site active-active architecture itself has the problem of transmission delay, which may cause the stability of the financial system to fail to meet the requirements if it is not tested and verified.
[0004] Therefore, how to achieve testing and verification of multi-site active financial systems is the key to improving the stability of the financial system. Summary of the invention
[0005] The present application provides a testing method, device, equipment and storage medium for a remote multi-active financial system, which are used to implement testing and verification of the remote multi-active financial system.
[0006] In a first aspect, the present application provides a testing method for a multi-site active-active financial system, comprising: based on a scenario stress test, initiating a test to the multi-site active-active financial system by running a pre-written test script; wherein the multi-site active-active financial system includes multiple computer rooms; according to the business response data in the scenario stress test, obtaining a test result of the multi-site active-active financial system in a test scenario; wherein the test scenario includes at least one of the following: a routing scenario for business requests, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario.
[0007] In one possible implementation, the test scenario includes a routing scenario of business requests; obtaining the test results of the remote multi-active financial system in the test scenario based on the business response data in the scenario stress test includes: obtaining the log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; detecting whether the log records of each computer room meet the first test condition, and if so, determining that the test of the remote multi-active financial system in the routing scenario of business requests has passed; wherein the first test condition includes sending business requests initiated by the same user to the same computer room.
[0008] In one possible implementation, the test scenario includes a data synchronization storage scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: obtaining the business flow records and caches in the main computer room database and the slave computer room database; detecting the time window corresponding to the complete consistency of the flow records in the main computer room and the slave computer room, recorded as the first time window; and detecting the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room, recorded as the second time window; based on the first time window and the second time window, evaluating the timeliness of the data storage synchronization of the remote multi-active financial system.
[0009] In one possible implementation, the test scenario includes a cross-computer room call scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: failing the first computer room in the remote multi-active financial system and obtaining the transaction records of the business in the database of each computer room; detecting whether the transaction records of the business in the database of each computer room meet the second test condition, and if so, determining that the remote multi-active financial system has cross-computer room calls; wherein the second test condition includes the continuous occurrence of business response failures in the transaction records.
[0010] In one possible implementation, the test scenario includes a computer room switching scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: failing the second computer room in the remote multi-active financial system and obtaining the business flow records in the database of the computer room; according to the business flow records, based on the time window from error or timeout to success of the business, evaluating the timeliness of the computer room switching of the remote multi-active financial system.
[0011] In one possible implementation, the test scenario includes a cluster mode scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: obtaining the transaction records and cache of the business in the database of the main computer room and the slave computer room; detecting whether the transaction records and cache of the business meet a third test condition, and if so, determining that the strong consistency test of the remote multi-active financial system in the cluster mode scenario has passed; wherein the third test condition includes consistency of the transaction records and cache of the main computer room and the slave computer room.
[0012] In one possible implementation, the test scenario includes a business splitting scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: obtaining the log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; detecting whether the log records of each computer room meet a fourth test condition, and if so, determining that the test of the remote multi-active financial system in the business splitting scenario has passed; wherein the fourth test condition includes that the split processing record of a certain business request is consistent with a predetermined splitting strategy for the business request.
[0013] In one possible implementation, the test scenario includes a performance capacity test scenario; the test result of the remote multi-active financial system in the test scenario is obtained based on the business response data in the scenario stress test, including: performing a stress test on the third computer room in the remote multi-active financial system in a gradient increasing manner, and obtaining the business flow records in the database of the computer room; according to the business flow records, based on the pressure gradient corresponding to the business from success to error, the performance capacity of the remote multi-active financial system is evaluated.
[0014] In a second aspect, the present application provides a testing device for a multi-site active-active financial system, comprising: a testing module, used to initiate a test to the multi-site active-active financial system based on a scenario stress test by running a pre-written test script; wherein the multi-site active-active financial system includes multiple computer rooms; a processing module, used to obtain the test results of the multi-site active-active financial system in a test scenario based on the business response data in the scenario stress test; wherein the test scenario includes at least one of the following: a routing scenario for business requests, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario.
[0015] In one possible implementation, the device also includes: a testing module, specifically used to obtain log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; a processing module, specifically used to detect whether the log records of each computer room meet the first test condition, and if so, determine that the test of the multi-site active-active financial system in the routing scenario of the business request has passed; wherein the first test condition includes that the business request initiated by the same user is sent to the same computer room.
[0016] In one possible implementation, the device also includes: a testing module, which is specifically used to obtain the transaction records and caches of the services in the main computer room database and the slave computer room database; a processing module, which is specifically used to detect the time window corresponding to the complete consistency of the transaction records in the main computer room and the slave computer room, recorded as the first time window; and to detect the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room, recorded as the second time window; the processing module is also specifically used to evaluate the timeliness of the data storage synchronization of the remote multi-active financial system based on the first time window and the second time window.
[0017] In one possible implementation, the device also includes: a testing module, which is specifically used to fault the first computer room in the multi-active financial system and obtain the transaction records of the business in the database of each computer room; a processing module, which is specifically used to detect whether the transaction records of the business in the database of each computer room meet the second test condition. If so, it is determined that there is a cross-computer room call in the multi-active financial system; wherein the second test condition includes the continuous occurrence of business response failures in the transaction records.
[0018] In a possible implementation, the device also includes: a testing module, specifically used to obtain the database of each computer room, wherein the database of the computer room includes a flow record of the business; a processing module, specifically used to detect when a computer room fails, the time window between the business in the database from error reporting or timeout to success; wherein the time window between the business from error reporting or timeout to success represents the timeliness of the computer room switching.
[0019] In a possible implementation, the device further includes: a testing module, specifically used to obtain the database of the main computer room and the slave computer room, wherein the database of the computer room includes the transaction records and cache of the business. A processing module, specifically used to detect whether the database of the main computer room and the slave computer room meets the third test condition, and if so, it is determined that the test of the remote multi-active financial system in the cluster mode scenario has passed; wherein the third test condition includes that the transaction records and cache of the main computer room and the slave computer room are consistent or consistent within a threshold range.
[0020] In one possible implementation, the device also includes: a testing module, specifically used to obtain log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; a processing module, specifically used to detect whether the log records of each computer room meet a fourth test condition. If so, it is determined that the test of the multi-site active-active financial system in the business splitting scenario has passed; wherein the fourth test condition includes that business requests initiated by users in the same area are sent to the same computer room.
[0021] In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement any method described in any one of the first aspects.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor as described in any one of the methods in the first aspect.
[0023] The test method, device, equipment and storage medium of the remote multi-active financial system provided in the present application are based on scenario stress testing, and initiate tests on the remote multi-active financial system by running a pre-written test script. Among them, the remote multi-active financial system includes multiple computer rooms. According to the business response data in the scenario stress test, the test results of the remote multi-active financial system in the test scenario are obtained. Among them, the test scenario includes at least one of the following: a routing scenario for business requests, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario. The above scheme can perform different stress tests according to different test scenarios and obtain test results, thereby comprehensively and multi-dimensionally testing and verifying the remote multi-active financial system and improving the stability of the remote multi-active financial system. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] Figure 1 A schematic diagram of an application scenario of a testing method for a remote multi-active financial system provided in this application;
[0026] Figure 2 A flowchart of a testing method for a remote multi-active financial system provided in Example 1 of the present application;
[0027] Figure 3 This is an example of a single cluster with multiple computer rooms provided in Embodiment 1 of the present application;
[0028] Figure 4 This is a structural example diagram of a testing device for a remote multi-active financial system provided in Example 2 of the present application;
[0029] Figure 5 A device block diagram of a testing device for a remote multi-active financial system provided in Embodiment 3 of the present application;
[0030] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Example 4 of the present application.
[0031] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0033] First, let’s explain the nouns involved:
[0034] Remote multi-active architecture: Remote means establishing independent data centers in different cities, and multi-active means that all computer rooms also need to bear traffic and provide business support in daily operations.
[0035] Figure 1 A schematic diagram of an application scenario of a testing method for a remote multi-active financial system provided in an embodiment of the present application, such as Figure 1 As shown, the scenario includes: a test device 1 and a computer room 2 for a multi-active financial system in different locations.
[0036] Take the scenario shown in the figure as an example: the test device 1 sends a scenario stress test to the computer room 2 of the remote multi-active financial system through a routing or gateway server, and the computer room 2 feeds back the scenario stress test result to the test device 1, thereby realizing the test and verification of the remote multi-active financial system. In actual applications, the computer room 2 can be one or more.
[0037] The scheme of the embodiments of the present application is introduced by way of examples in combination with the following embodiments.
[0038] Embodiment 1
[0039] Figure 2 A flowchart of a method for testing a remote multi-active financial system provided in Example 1 of the present application is provided. The method comprises the following steps:
[0040] S101. Based on scenario stress testing, a test is initiated to the remote multi-active financial system by running a pre-written test script; wherein the remote multi-active financial system includes multiple computer rooms;
[0041] S102. Obtain the test results of the remote multi-active financial system in the test scenario based on the business response data in the scenario stress test; wherein the test scenario includes at least one of the following: a business request routing scenario, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario.
[0042] As an example, the execution subject of this embodiment can be a test device of a remote multi-active financial system, and there are many ways to implement the test device of the remote multi-active financial system. For example, it can be program software, or a medium storing relevant computer programs, such as a USB flash drive, etc.; or, the device can also be a physical device integrated or installed with relevant computer programs, such as a chip, an intelligent terminal, a computer, a server, etc.
[0043] In one example, S101 may specifically include a test device of a remote multi-active financial system initiating a scenario stress test to multiple computer rooms of the remote multi-active financial system through a routing or gateway server; the test device of the remote multi-active financial system receives business response data in the scenario stress test; wherein the business response data includes a database and log records; wherein the database includes a flow record and a cache
[0044] Optionally, the scenario stress test uses a jmeter tool.
[0045] The following is an introduction to different test scenarios using multiple examples.
[0046] In one example, the routing scenario S102 may specifically include: obtaining log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; detecting whether the log records of each computer room meet the first test condition, and if so, determining that the test of the remote multi-active financial system in the routing scenario of the business request has passed; wherein the first test condition includes sending business requests initiated by the same user to the same computer room.
[0047] Taking the scenario as an example, in the absence of a computer room failure, if all service requests initiated by the same user are sent to the same computer room according to the log records of the computer room, it means that a one-to-one correspondence is established between the user and the computer room.
[0048] Through the method in this embodiment, a one-to-one correspondence is established between the verification user and the computer room, which can avoid delays caused by executing services across computer rooms.
[0049] In another example, the data synchronization storage scenario S102 may specifically include: obtaining the transaction records and caches of the business in the main computer room database and the slave computer room database; detecting the time window corresponding to the complete consistency of the transaction records in the main computer room and the slave computer room, recorded as the first time window; and detecting the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room, recorded as the second time window; based on the first time window and the second time window, evaluating the timeliness of the data storage synchronization of the multi-site active-active financial system.
[0050] Combined with the scenario, an example is given for a multi-site, multi-active financial system with a single cluster in multiple data centers. Figure 3 As shown, Figure 3 This is an example of a single cluster with multiple computer rooms. Figure 3 As shown, a cluster contains a main computer room and multiple slave computer rooms. Business can only be written in the main computer room. The main computer room synchronizes the business of the main computer room to the slave computer room, and all computer rooms can read the business. In the absence of a computer room failure, the time window corresponding to the complete consistency of the flow records of the main computer room and the slave computer room is detected, which is recorded as the first time window. And, the time window corresponding to the complete consistency of the cache of the main computer room and the slave computer room is detected, which is recorded as the second time window. The difference between the first time window and the second time window is the network delay, which represents the timeliness of the synchronization of the business of the main computer room to the slave computer room.
[0051] In another example, the cross-computer room call scenario S102 may specifically include: faulting the first computer room in the remote multi-active financial system, and obtaining the transaction records of the business in the database of each computer room. Detecting whether the transaction records of the business in the database of each computer room meet the second test condition, if so, determining that the remote multi-active financial system has cross-computer room calls; wherein the second test condition includes the business that continues to fail to respond in the transaction records.
[0052] Take a scenario as an example. After a period of time, the business has started to operate normally. At this time, one computer room fails. If the computer room flow records continue to show business failures, it means that there are cross-computer room calls. At this time, the business that needs to call data in the failed computer room cannot be executed normally, so the response fails.
[0053] By using the method in this embodiment to verify whether there is a cross-computer room call, it is possible to prevent a computer room failure from affecting the services of available computer rooms.
[0054] In another example, the computer room switching scenario S102 may specifically include: failing in the second computer room of the remote multi-active financial system and obtaining the transaction records of the business in the database of the computer room; based on the transaction records of the business and based on the time window from error or timeout to success of the business, evaluating the timeliness of the computer room switching of the remote multi-active financial system.
[0055] Take the scenario as an example. In the execution scenario, if one computer room fails, the business corresponding to the failed computer room cannot be executed normally and an error will be displayed. The remote multi-active financial system will switch the business corresponding to the failed computer room to the available computer room. When the switch is completed and the business can be executed normally, it will be displayed as successful. By calculating the time window from error or timeout to success in the business flow record, the time required for computer room switching can be obtained, which represents the timeliness of computer room switching.
[0056] In another example, for the cluster mode scenario S102, it can specifically include: obtaining the transaction records and cache of the business in the database of the main computer room and the slave computer room; detecting whether the transaction records and cache of the business meet the third test condition, and if so, determining that the strong consistency test of the multi-site active-active financial system in the cluster mode scenario has passed; wherein the third test condition includes the consistency of the transaction records and cache of the main computer room and the slave computer room.
[0057] In another example, the business splitting scenario S102 may specifically include: obtaining the log records of each computer room, wherein the log records of the computer room include the business request information initiated to the computer room; detecting whether the log records of each computer room meet the fourth test condition, and if so, determining that the test of the multi-site active-active financial system in the business splitting scenario has passed; wherein the fourth test condition includes that the split processing record of a business request is consistent with the predetermined splitting strategy for the business request.
[0058] In this example, in order to reduce the latency of cross-data center calls, the service is split and limited to the data center close to the user according to the user's geographical information. If the split processing record of a service request is consistent with the predetermined split strategy for the service request according to the log record of the data center, it means that the predetermined split strategy has been executed, thereby verifying the effectiveness of the service split.
[0059] Through the method in this embodiment, it is possible to verify whether the remote multi-active financial system executes the predetermined splitting strategy, and problems can be discovered early to avoid delays caused by invalid execution of the splitting strategy.
[0060] In another example, the performance capacity test scenario S102 may specifically include: performing a stress test on the third computer room in the remote multi-active financial system in a gradient increasing manner, and obtaining the transaction records of the business in the database of the computer room; according to the transaction records of the business, based on the pressure gradient corresponding to the business from success to error, evaluating the performance capacity of the remote multi-active financial system.
[0061] As an example, a stress test is performed on a certain computer room in a gradient increasing manner from low to high. If the pressure does not reach the upper limit of the performance capacity of the computer room, the computer room can work normally. If the pressure reaches or exceeds the upper limit of the performance capacity of the computer room, the computer room stops working, and the business flow records in the database of the computer room have errors. At this time, the corresponding pressure is the upper limit of the performance capacity of the computer room.
[0062] Through the method in this embodiment, the performance capacity upper limit of the computer room can be accurately tested by the gradient increase stress test method combined with the transaction record of the business, thereby guiding how much performance capacity to reserve when the multi-site active financial system is working to ensure normal operation.
[0063] In the testing method of the remote multi-active financial system provided in this embodiment, based on the scenario stress test, a test is initiated to the remote multi-active financial system by running a pre-written test script. Wherein, the remote multi-active financial system includes multiple computer rooms. According to the business response data in the scenario stress test, the test results of the remote multi-active financial system in the test scenario are obtained. Wherein, the test scenario includes at least one of the following: a routing scenario for business requests, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario. The above scheme can perform different stress tests according to different test scenarios and obtain test results, thereby comprehensively and multi-dimensionally testing and verifying the remote multi-active financial system and improving the stability of the remote multi-active financial system.
[0064] Embodiment 2
[0065] Figure 4 A schematic diagram of the structure of a testing device for a remote multi-active financial system provided in Embodiment 4 of the present application is shown in FIG. Figure 4 As shown, the testing device of the remote multi-active financial system includes:
[0066] The testing module 61 is used to initiate a test on the remote multi-active financial system based on a scenario stress test by running a pre-written test script; wherein the remote multi-active financial system includes multiple computer rooms;
[0067] Processing module 62 is used to obtain the test results of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test; wherein the test scenario includes at least one of the following: a routing scenario for business requests, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business splitting scenario, and a performance capacity test scenario.
[0068] As an example, there are many ways to implement the test device of the remote multi-active financial system. For example, it can be program software, or a medium storing relevant computer programs, such as a USB flash drive, etc.; or the device can also be a physical device integrated or installed with relevant computer programs, such as a chip, smart terminal, computer, server, etc.
[0069] In one example, the test module 61 is specifically used to initiate a scenario stress test to multiple computer rooms of the remote multi-active financial system through a routing or gateway server; the test device of the remote multi-active financial system receives the business response data in the scenario stress test; wherein the business response data includes a database and log records; wherein the database includes a flow record and a cache
[0070] Optionally, the scenario stress test uses a jmeter tool.
[0071] The following is an introduction to different test scenarios using multiple examples.
[0072] In one example, the routing scenario processing module 62 is specifically used to: obtain the log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; detect whether the log records of each computer room meet the first test condition, and if so, determine that the test of the remote multi-active financial system in the routing scenario of the business request has passed; wherein the first test condition includes that the business request initiated by the same user is sent to the same computer room.
[0073] Taking the scenario as an example, in the absence of a computer room failure, if all service requests initiated by the same user are sent to the same computer room according to the log records of the computer room, it means that a one-to-one correspondence is established between the user and the computer room.
[0074] Through the method in this embodiment, a one-to-one correspondence is established between the verification user and the computer room, which can avoid delays caused by executing services across computer rooms.
[0075] In another example, the data synchronization storage scenario processing module 62 is specifically used to: obtain the transaction records and caches of the business in the main computer room database and the slave computer room database; detect the time window corresponding to the complete consistency of the transaction records in the main computer room and the slave computer room, recorded as the first time window; and detect the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room, recorded as the second time window; based on the first time window and the second time window, evaluate the timeliness of the data storage synchronization of the multi-site active financial system.
[0076] Combined with the scenario, an example is given for a multi-site, multi-active financial system with a single cluster in multiple data centers. Figure 3 As shown, Figure 3 This is an example of a single cluster with multiple computer rooms. Figure 3As shown, a cluster contains a main computer room and multiple slave computer rooms. Business can only be written in the main computer room. The main computer room synchronizes the business of the main computer room to the slave computer room, and all computer rooms can read the business. In the absence of a computer room failure, the time window corresponding to the complete consistency of the flow records of the main computer room and the slave computer room is detected, which is recorded as the first time window. And, the time window corresponding to the complete consistency of the cache of the main computer room and the slave computer room is detected, which is recorded as the second time window. The difference between the first time window and the second time window is the network delay, which represents the timeliness of the synchronization of the business of the main computer room to the slave computer room.
[0077] In another example, the cross-computer room call scenario processing module 62 is specifically used to: fault the first computer room in the remote multi-active financial system, and obtain the transaction records of the business in the database of each computer room. Check whether the transaction records of the business in the database of each computer room meet the second test condition. If so, it is determined that there is a cross-computer room call in the remote multi-active financial system; wherein the second test condition includes the business that continues to fail to respond in the transaction record.
[0078] Take a scenario as an example. After a period of time, the business has started to operate normally. At this time, one computer room fails. If the computer room flow records continue to show business failures, it means that there are cross-computer room calls. At this time, the business that needs to call data in the failed computer room cannot be executed normally, so the response fails.
[0079] By using the method in this embodiment to verify whether there is a cross-computer room call, it is possible to prevent a computer room failure from affecting the services of available computer rooms.
[0080] In another example, the computer room switching scenario processing module 62 is specifically used to: fault the second computer room in the remote multi-active financial system and obtain the transaction flow records of the business in the database of the computer room; based on the transaction flow records of the business and based on the time window from error or timeout to success of the business, evaluate the timeliness of the computer room switching of the remote multi-active financial system.
[0081] Take the scenario as an example. In the execution scenario, if one computer room fails, the business corresponding to the failed computer room cannot be executed normally and an error will be displayed. The remote multi-active financial system will switch the business corresponding to the failed computer room to the available computer room. When the switch is completed and the business can be executed normally, it will be displayed as successful. By calculating the time window from error or timeout to success in the business flow record, the time required for computer room switching can be obtained, which represents the timeliness of computer room switching.
[0082] In another example, the cluster mode scenario processing module 62 is specifically used to: obtain the transaction records and cache of the business in the database of the main computer room and the slave computer room; detect whether the transaction records and cache of the business meet the third test condition, and if so, determine that the strong consistency test of the multi-site active-active financial system in the cluster mode scenario has passed; wherein the third test condition includes the consistency of the transaction records and cache of the main computer room and the slave computer room.
[0083] In another example, the business splitting scenario processing module 62 is specifically used to: obtain the log records of each computer room, wherein the log records of the computer room include the business request information initiated to the computer room; detect whether the log records of each computer room meet the fourth test condition, and if so, determine that the test of the multi-site active-active financial system in the business splitting scenario has passed; wherein the fourth test condition includes that the split processing record of a business request is consistent with the predetermined splitting strategy for the business request.
[0084] In this example, in order to reduce the latency of cross-data center calls, the service is split and limited to the data center close to the user according to the user's geographical information. If the split processing record of a service request is consistent with the predetermined split strategy for the service request according to the log record of the data center, it means that the predetermined split strategy has been executed, thereby verifying the effectiveness of the service split.
[0085] In another example, the performance capacity test scenario processing module 62 is specifically used to: perform stress testing on the third computer room in the remote multi-active financial system in a gradient increasing manner, and obtain the transaction records of the business in the database of the computer room; according to the transaction records of the business, based on the pressure gradient corresponding to the business from success to error, evaluate the performance capacity of the remote multi-active financial system.
[0086] As an example, a stress test is performed on a certain computer room in a gradient increasing manner from low to high. If the pressure does not reach the upper limit of the performance capacity of the computer room, the computer room can work normally. If the pressure reaches or exceeds the upper limit of the performance capacity of the computer room, the computer room stops working, and the business flow records in the database of the computer room have errors. At this time, the corresponding pressure is the upper limit of the performance capacity of the computer room.
[0087] Through the method in this embodiment, the performance capacity upper limit of the computer room can be accurately tested by the gradient increase stress test method combined with the transaction record of the business, thereby guiding how much performance capacity to reserve when the multi-site active financial system is working to ensure normal operation.
[0088] In the test device for the remote multi-active financial system provided in this embodiment, the acquisition module is used to obtain the log records of each computer room, wherein the log records of the computer room include the business request information initiated to the computer room. The detection module is used to detect whether the log records of each computer room meet the first test condition. If so, it is determined that the test of the remote multi-active financial system in the routing scenario of the business request has passed; wherein, the first test condition includes the business request initiated by the same user being sent to the same computer room. The above scheme can perform different stress tests according to different test scenarios and obtain test results, thereby comprehensively and multi-dimensionally testing and verifying the remote multi-active financial system and improving the stability of the remote multi-active financial system.
[0089] Embodiment 3
[0090] Figure 5 It is a device block diagram of a testing device for a remote multi-active financial system according to an exemplary embodiment. The device can be a mobile phone, a computer, a digital broadcast terminal, a message transceiver, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0091] The device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0092] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0093] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0094] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0095] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0096] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0097] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0098] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0099] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0100] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0101] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0102] Embodiment 4
[0103] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6As shown, the electronic device includes:
[0104] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, the memory 292, and the communication interface 293 may communicate with each other through the bus 294. The communication interface 293 may be used for information transmission. The processor 291 may call the logic instructions in the memory 294 to execute the method of the above embodiment.
[0105] In addition, the logic instructions in the above-mentioned memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0106] The memory 292 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, implementing the methods in the above method embodiments.
[0107] The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 292 may include a high-speed random access memory and may also include a non-volatile memory.
[0108] An embodiment of the present application provides a non-temporary computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above embodiment.
[0109] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0110] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A testing method for a remote multi-active financial system, characterized in that: include: Based on the scenario stress test, a test is initiated to the remote multi-active financial system by running a pre-written test script; wherein the remote multi-active financial system includes multiple computer rooms; According to the business response data in the scenario stress test, the test results of the remote multi-active financial system in the test scenario are obtained; wherein the test scenario includes at least one of the following: a business request routing scenario, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business split scenario, and a performance capacity test scenario; The test scenario includes a routing scenario of a business request; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: Obtaining log records of each computer room, wherein the log records of the computer room include service request information initiated to the computer room; Detect whether the log records of each computer room meet the first test condition. If so, determine that the test of the remote multi-active financial system in the routing scenario of the business request has passed; wherein the first test condition includes that the business request initiated by the same user is sent to the same computer room; The test scenario includes a data synchronization storage scenario; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: Obtain the transaction records and cache of the main computer room database and the slave computer room database; The time window corresponding to the complete consistency of the flow records in the main computer room and the slave computer room is recorded as the first time window; and the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room is recorded as the second time window; According to the first time window and the second time window, evaluating the timeliness of data storage synchronization of the remote multi-active financial system; The test scenario includes a cross-computer room call scenario; the test result of the remote multi-active financial system in the test scenario is obtained according to the business response data in the scenario stress test, including: The first computer room in the remote multi-active financial system described in the fault, and obtain the business flow records in the database of each computer room; Detect whether the transaction records of the business in the database of each computer room meet the second test condition. If so, determine that the remote multi-active financial system has cross-computer room calls; wherein the second test condition includes the business that continuously fails to respond in the transaction records; The test scenario includes a computer room switching scenario; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: The second computer room in the remote multi-active financial system is faulty, and the business flow records in the database of the computer room are obtained; According to the transaction records of the business, based on the time window from error or timeout to success of the business, the timeliness of the computer room switching of the remote multi-active financial system is evaluated; The test scenario includes a cluster mode scenario; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: Obtain business flow records and caches from the databases of the main and slave computer rooms; Detect whether the transaction records and cache of the business meet the third test condition. If so, determine that the strong consistency test of the remote multi-active financial system in the cluster mode scenario has passed; wherein the third test condition includes that the transaction records and cache of the main computer room and the slave computer room are consistent; The test scenario includes a business split scenario; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: Obtaining log records of each computer room, wherein the log records of the computer room include service request information initiated to the computer room; Detect whether the log records of each computer room meet the fourth test condition. If so, determine that the test of the remote multi-active financial system in the business split scenario has passed; wherein the fourth test condition includes that the split processing record of a certain business request is consistent with the predetermined split strategy for the business request; The test scenario includes a performance capacity test scenario; and obtaining the test result of the remote multi-active financial system in the test scenario according to the business response data in the scenario stress test includes: Performing a stress test on the third computer room in the remote multi-active financial system in a gradient increasing manner, and obtaining business flow records in the database of the computer room; According to the transaction records of the business, based on the pressure gradient corresponding to the business from success to error, the performance capacity of the remote multi-active financial system is evaluated.
2. A testing device for a remote multi-active financial system, characterized in that: include: A test module, for initiating a test on the remote multi-active financial system based on scenario stress testing by running a pre-written test script; wherein the remote multi-active financial system includes multiple computer rooms; A processing module, configured to obtain a test result of the remote multi-active financial system in a test scenario according to the business response data in the scenario stress test; wherein the test scenario includes at least one of the following: a business request routing scenario, a data synchronization storage scenario, a cross-computer room call scenario, a computer room switching scenario, a cluster mode scenario, a business split scenario, and a performance capacity test scenario; The test scenario includes a routing scenario of a service request; a test module is specifically used to obtain log records of each computer room, wherein the log records of the computer room include service request information initiated to the computer room; The processing module is specifically used to detect whether the log records of each computer room meet the first test condition, and if so, determine that the test of the remote multi-active financial system in the routing scenario of the business request has passed; wherein the first test condition includes that the business request initiated by the same user is sent to the same computer room; The test scenario includes a data synchronization storage scenario; a test module specifically used to obtain the business flow records and caches in the main computer room database and the slave computer room database; The processing module is specifically used to detect the time window corresponding to the complete consistency of the flow records in the main computer room and the slave computer room, which is recorded as the first time window; and to detect the time window corresponding to the complete consistency of the cache in the main computer room and the slave computer room, which is recorded as the second time window; The processing module is further configured to evaluate the timeliness of data storage synchronization of the remote multi-active financial system according to the first time window and the second time window; The test scenario includes a cross-computer room call scenario; a test module is specifically used to fail the first computer room in the remote multi-active financial system and obtain the transaction flow records of each computer room database; The processing module is further configured to detect whether the transaction records of the business in the database of each computer room meet the second test condition, and if so, determine that the remote multi-active financial system has cross-computer room calls; wherein the second test condition includes the business that continuously fails to respond in the transaction records; The test scenario includes a computer room switching scenario; a test module is specifically used to fail the second computer room in the remote multi-active financial system and obtain the transaction flow records in the database of the computer room; A processing module, specifically used to evaluate the timeliness of the computer room switching of the remote multi-active financial system according to the transaction record of the business and based on the time window from error or timeout to success of the business; The test scenario includes a cluster mode scenario; a test module specifically used to obtain business flow records and caches in the databases of the main computer room and the slave computer room; The processing module is specifically used to detect whether the transaction records and cache of the business meet the third test condition. If so, it is determined that the strong consistency test of the remote multi-active financial system in the cluster mode scenario has passed; wherein the third test condition includes that the transaction records and cache of the main computer room and the slave computer room are consistent; The test scenario includes a business split scenario; a test module, specifically used to obtain log records of each computer room, wherein the log records of the computer room include business request information initiated to the computer room; a processing module, specifically used to detect whether the log records of each computer room meet the fourth test condition, and if so, determine that the test of the remote multi-active financial system in the business splitting scenario passes; wherein the fourth test condition includes that the splitting processing record of a certain business request is consistent with the predetermined splitting strategy for the business request; The test scenario includes a performance capacity test scenario; a test module, specifically used to perform a stress test on the third computer room in the remote multi-active financial system in a gradient increasing manner, and obtain the transaction flow records in the database of the computer room; The processing module is specifically used to evaluate the performance capacity of the remote multi-active financial system according to the transaction records of the business and based on the pressure gradient corresponding to the business from success to error.
3. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to claim 1.
4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to claim 1 when executed by a processor.
Citation Information
Patent Citations
Test method and device for service system
CN111984519A
Service scene test method and device, electronic equipment and storage medium
CN112988600A
Test method and device for data acquisition service
CN113064777A
Apparatus, method and recoding medium for measuring performance of application
KR1020180063765A
Validating software characteristics
US20150143180A1
