A link segmentation performance testing method and device
By conducting link segmentation and performance testing on the service link of the service system, combined with full-link testing of the Mock virtual machine, the problem of difficulty in achieving full-link performance testing in the existing technology is solved, and the testing efficiency and result accuracy are improved.
Patent Information
- Application Number
- CN202110690825.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-22
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-06-22
AI Technical Summary
The prior art is difficult to implement full-link performance testing in complex business service systems, resulting in poor test results and low credibility in results.
By obtaining service call information from the business service system, link segmentation of the service link, using the preset link segmentation policy to place the service node into the performance test queue for performance testing, and using the Mock virtual machine to perform full-link testing.
It realizes segmented disassembly and performance testing of the service links when the full-link test cannot be performed directly, improves testing efficiency, and generates fine-grained and refined performance test reports. At the same time, a full-link performance test was conducted with relatively accurate results by simulating production performance indicators by virtual machines.
Smart Images

Figure CN113392011B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software testing and can be used in the financial field, specifically a link segmentation performance testing method and device. Background Art
[0002] With the popularization of distributed system architecture, the scale of business service systems continues to expand, business scenarios become more complex, and the complexity of service links has also increased significantly. In the process of testing business service systems, existing testing methods make it difficult to implement full-link performance testing on the complete link formed by the series of various business scenarios. Faced with this dilemma, testers often disassemble the link and then test the disassembled link in sections. However, this method has many problems such as high labor cost, high time cost, high communication cost, low efficiency, lack of refined management of test cases and results, and poor testing results.
[0003] In addition, the existing full-link testing methods usually require that many prerequisites be met at the same time. These prerequisites include but are not limited to consistency between upstream and downstream data, normal test environment, and consistent resource allocation with production. Considering that the probability of these prerequisites being met at the same time in actual testing is often low, this testing method is difficult and the credibility of the test results is relatively low. Summary of the invention
[0004] In response to the problems in the prior art, the present application provides a link segmentation performance testing method and device, which can segment the service link based on the service call information obtained from the business service system, thereby completing the link segmentation performance testing.
[0005] In order to solve the above technical problems, this application provides the following technical solutions:
[0006] In a first aspect, the present application provides a link segment performance testing method, comprising:
[0007] Segment the service link according to the preset link segmentation strategy and the service call information obtained from the business service system;
[0008] According to the link segmentation result, the service nodes in the service link are placed in a performance test queue for performance testing.
[0009] Furthermore, the service call information includes at least a service name, a call address, a request message, a response message, and a response time; and segmenting the service link according to a preset link segmentation strategy and the service call information obtained from the business service system includes:
[0010] Obtaining the service call relationship between the service nodes according to the service name, call address, request message and response message;
[0011] Generate a service call information tree according to the service call relationship;
[0012] The service link is segmented according to the link segmentation strategy and the service call information tree.
[0013] Furthermore, before placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes:
[0014] Traversing each service node in the service call information tree;
[0015] A response test is performed on the service nodes in the traversal order to obtain a service node with a normal response.
[0016] Further, placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result includes:
[0017] The service node that responds normally is put into the performance test queue according to the link segmentation result.
[0018] Further, placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result includes:
[0019] Traversing each service node in the service call information tree according to the link segmentation result;
[0020] Put the service node into the performance test queue according to the traversal order to perform performance test, and put the obtained performance test result of the service node into the performance test result processing queue;
[0021] The performance test results in the performance test result processing queue are analyzed.
[0022] Further, after placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes:
[0023] A full-link test is performed using a Mock virtual machine; wherein the full link includes service nodes that respond normally and service nodes that fail to respond.
[0024] Furthermore, the full-link test is performed using the Mock virtual machine, including:
[0025] Traversing each service node in the service call information tree;
[0026] Perform response test on the service nodes in the traversal order to obtain the service nodes that failed to respond;
[0027] Start the Mock virtual machine on the service node that failed to respond to the reply;
[0028] Utilize the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the reply, and run through the entire link;
[0029] Perform a performance test on the root service node of the entire link to obtain a performance test result of the entire link.
[0030] In a second aspect, the present application provides a link segment performance testing device, comprising:
[0031] A link segmentation unit, used to segment the service link according to a preset link segmentation strategy and service call information obtained from the business service system;
[0032] The performance testing unit is used to put the service nodes in the service link into a performance testing queue for performance testing according to the link segmentation result.
[0033] Furthermore, the service call information at least includes a service name, a call address, a request message, a response message and a response time; and the link segmentation unit includes:
[0034] A call relationship generation module, used to obtain the service call relationship between each service node according to the service name, call address, request message and response message;
[0035] A call information tree generation module, used to generate a service call information tree according to the service call relationship;
[0036] The link segmentation module is used to segment the service link according to the link segmentation strategy and the service call information tree.
[0037] Furthermore, the link segment performance testing device further includes:
[0038] A node traversal unit, used for traversing each service node in the service call information tree;
[0039] The response response testing unit is used to perform a response response test on the service nodes in a traversal order to obtain a service node with a normal response response.
[0040] Furthermore, the performance testing unit is specifically used for:
[0041] The service node that responds normally is put into the performance test queue according to the link segmentation result.
[0042] Furthermore, the performance testing unit comprises:
[0043] A node traversal module, used for traversing each service node in the service call information tree according to the link segmentation result;
[0044] A performance testing module, used to place the service nodes into the performance testing queue in a traversal order for performance testing, and place the obtained performance testing results of the service nodes into a performance testing result processing queue;
[0045] The test result analysis module is used to analyze the performance test results in the performance test result processing queue.
[0046] Furthermore, the link segment performance testing device further includes:
[0047] The full-link test unit is used to perform a full-link test using a Mock virtual machine; wherein the full link includes a service node that responds normally and a service node that fails to respond.
[0048] Furthermore, the full-link test unit includes:
[0049] A node traversal module, used for traversing each service node in the service call information tree;
[0050] A response response test module, used to perform a response response test on the service nodes in a traversal order to obtain the service nodes that failed to respond;
[0051] A virtual machine startup module, used to start the Mock virtual machine on the service node that failed to respond to the reply;
[0052] A full-link connection module, used to use the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the reply, and connect the full link;
[0053] The performance test result generation module is used to perform a performance test on the root service node of the entire link to obtain the performance test result of the entire link.
[0054] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the link segmentation performance testing method when executing the program.
[0055] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the link segmentation performance testing method when executed by a processor.
[0056] In response to the problems in the prior art, the link segmentation performance testing method and device provided in the present application can segment and disassemble the service link in service scenarios where full-link testing cannot be performed directly, conduct link segmentation performance testing, improve testing efficiency, and generate fine-grained and refined performance testing reports; at the same time, it can use virtual machines to simulate production performance indicators and conduct full-link performance testing with relatively accurate results, and has a wide range of applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 This is one of the flow charts of the link segment performance testing method in an embodiment of the present application;
[0059] Figure 2 This is a flow chart of link segmentation in an embodiment of the present application;
[0060] Figure 3 This is the second flowchart of the link segment performance testing method in the embodiment of the present application;
[0061] Figure 4 This is a flow chart of the performance test performed in the embodiment of the present application;
[0062] Figure 5 This is a flowchart of performing a full-link test in an embodiment of the present application;
[0063] Figure 6 This is one of the structural diagrams of the link segment performance testing device in the embodiment of the present application;
[0064] Figure 7 This is a structural diagram of a link segmentation unit in an embodiment of the present application;
[0065] Figure 8 This is the second structural diagram of the link segment performance testing device in the embodiment of the present application;
[0066] Fig. 9 This is a structural diagram of a performance test unit in an embodiment of the present application;
[0067] Fig.10 This is a structural diagram of the full-link test unit in an embodiment of the present application;
[0068] Fig.11 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0069] Fig.12 This is an application scenario diagram in an embodiment of the present application. DETAILED DESCRIPTION
[0070] 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 only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0071] It should be noted that the link segmentation performance testing method and device provided in the present application can be used in the financial field, and can also be used in any field other than the financial field. The application field of the link segmentation performance testing method and device provided in the present application is not limited.
[0072] See also Figure 1 In order to segment the service link based on the service call information obtained from the business service system, thereby completing the link segmentation performance test, the present application provides a link segmentation performance test method, including:
[0073] S101: segmenting a service link according to a preset segmentation strategy and service call information obtained from a business service system;
[0074] It is understandable that the service scenarios in the financial industry often involve a large number of business service systems, which cover many service nodes, and these service nodes form a series of service links. The so-called performance testing of the business service system can actually be understood as the performance testing of each service node in the service link. Sometimes, due to the complexity of the service link or the performance failure of individual service nodes in the service link, the performance test of the entire link cannot be achieved.
[0075] In order to meet the business service system performance test in this case, this application provides a link segment performance test method that can be widely applied to financial industry service scenarios. The execution subject of this method can be Fig.12The test scheduling center shown in . The test scheduling center is used to perform performance testing on the business service system. The test scheduling center specifically includes but is not limited to a call information collection server 4, a service node function simulation server (Mock Server) 5, a test control server 6, a distributed storage database 7 and a system configuration server 8. The call information collection server 4 is used to collect service call information; the service node function simulation server (Mock Server) 5 is used to simulate a service node with a functional failure to complete the corresponding service; the test control server 6 is used to execute the performance test control program stored in the distributed storage database 7 to complete the performance test; the distributed storage database 7 is at least used to store the performance test control program and service call information; the system configuration server 8 is at least used to configure a preset link segmentation strategy and configure the Mock mode.
[0076] In an embodiment of the present application, the test scheduling center can segment the service link according to a preset link segmentation strategy and the service call information obtained from the business service system. In the application scenario described in the embodiment of the present application, the link segmentation strategy at least includes segmentation according to service functions and segmentation according to application fields. For example, the so-called service function may include but is not limited to a transfer function and an asset liquidation function; the so-called application field may include but is not limited to an online banking application field and a credit card application field. Service nodes with a service call relationship can be divided into the same service function or the same application field. Among them, the service call information includes at least a service name, a call address, a request message, a response message and a response time. The service call relationship can be determined through the service call information.
[0077] S102: according to the link segmentation result, the service nodes in the service link are placed into a performance test queue for performance testing.
[0078] It is understandable that, based on the link segmentation results, the test scheduling center can learn which service nodes belong to the same service link, and then can put the service nodes belonging to the same service link into the performance test queue in sequence according to the service call relationship, so as to achieve the purpose of centrally placing the relevant service nodes on the same service link, which is convenient for subsequent link segmentation performance testing. The specific performance testing method is described below.
[0079] From the above description, it can be seen that the link segmentation performance testing method provided in the present application can segment and disassemble the service link in service scenarios where full-link testing cannot be performed directly, perform link segmentation performance testing, improve testing efficiency, and generate fine-grained and refined performance testing reports; at the same time, it can use virtual machines to simulate production performance indicators and perform full-link performance testing with relatively accurate results, and has a wide range of applicability.
[0080] See also Figure 2, segment the service link according to the preset link segmentation strategy and the service call information obtained from the business service system, including:
[0081] S201: Obtaining the service call relationship between service nodes according to the service name, call address, request message and response message;
[0082] S202: Generate a service call information tree according to the service call relationship;
[0083] S203: segment the service link according to the link segmentation strategy and the service call information tree.
[0084] It is understandable that, considering that in actual business services, in order to realize business service functions, calls between service nodes occur at any time. When these calls occur, the call information collection server 4 can deploy information probes at the JVM level of the service node of the business service system to obtain service call information including service name, call address, request message and response message from the business service system, so as to grasp the service call relationship between each service node. For example, in Fig.12 In the business service system shown, service A calls service B, service B calls service C, and finally the business service result is output by the external output interface of service A. The service call relationship can be represented by arrows.
[0085] A service call information tree may be generated based on the service call relationship. Specifically, each service node may be arranged into a tree structure for storage based on the arrow relationship. In the generated service call information tree, according to the link segmentation strategy described in S101, tree branches belonging to the same service function or the same application field are divided into the same service link, thereby realizing link segmentation of the service link according to the link segmentation strategy and the service call information tree.
[0086] It can be seen from the above description that the link segmentation performance testing method provided in the present application can segment the service link according to the preset link segmentation strategy and the service call information obtained from the business service system.
[0087] See also Figure 3 , before placing the service nodes in the service link into the performance test queue for performance testing according to the link segmentation result, it also includes:
[0088] S301: traverse each service node in the service call information tree;
[0089] S302: Perform response test on the service nodes in the traversal order to obtain the service nodes with normal response.
[0090] It is understandable that before the test scheduling center puts the service nodes in the service link into the performance test queue for performance testing according to the link segmentation results, it will first test the business service system with test business data, with the purpose of finding a service node with normal function (normal response). At the same time, the status of the service node with abnormal function (failed to respond) is set to ko. In the subsequent performance test process, the performance test is not performed on this service node, which can also be understood as not performing a performance test on the service link where this service node is located.
[0091] Specifically, B11: firstly, the root service node in the service call information tree is put into the queue Q as the first service node, and then the following steps B12 to B14 are executed cyclically until the end;
[0092] B12: Determine whether the queue Q is empty; if the queue Q is not empty, execute step ③; if the queue Q is empty, execute step B15;
[0093] B13: Take a service node N from the head of the queue Q, query all the child service nodes S1 to Sn of this service node in the test scheduling center according to the service name of the service node N, and put S1 to Sn into the queue Q from the tail of the queue Q in sequence; the so-called child service node is the service node called by this service node and belongs to the same service link as this service node; and after executing step ③, the queue Q no longer contains the service node N;
[0094] It should be noted that a service node N may have S1 to Sn, with a total of n child service nodes; and service node S1 may have S1' to Sn', with a total of n' child service nodes; each time a service node N is taken out from the head of the performance test queue Q, the performance test queue Q no longer contains the service node N, but newly added service nodes S1 to Sn; and when the service node S1 is traversed to and taken out, the performance test queue Q no longer contains the service node S1, but newly added service nodes S1' to Sn', and so on.
[0095] B14: by querying the service scheduling information stored in the test scheduling center, obtaining the calling address, request message and other information of the service node N, and performing a response test, so as to determine whether the function of the service node N is normal; if the function of the service node N is normal, setting the state of the service node N to state=ok; if the function of the service node N is abnormal, setting the state of the service node N to state=ko; then returning to step ②;
[0096] B15: End.
[0097] Through the above process, it is possible to traverse each service node in the service call information tree, and perform response tests on the service nodes in the traversal order to obtain service nodes with normal responses.
[0098] From the above description, it can be seen that the link segmentation performance testing method provided in the present application can perform a response test on the service nodes in the service call information tree to obtain a service node with a normal response.
[0099] See also Figure 4 , according to the link segmentation results, the service nodes in the service link are placed in the performance test queue for performance testing, including:
[0100] S401: traverse each service node in the service call information tree according to the link segmentation result;
[0101] S402: putting the service nodes into a performance test queue in a traversal order to perform performance testing, and putting the obtained performance test results of the service nodes into a performance test result processing queue;
[0102] S403: Analyze the performance test results in the performance test result processing queue.
[0103] It can be understood that, through the trial run before the performance test, the test scheduling center can segment the service link according to the link segmentation strategy configured by the performance tester, and then put the service nodes that need to be performance tested into the performance test queue P in sequence according to the segmentation results. Specifically, the following steps B21 to B24 are executed in a loop until the end.
[0104] B21: Determine whether the performance test queue P is empty; if the queue P is not empty, execute step B22; if the queue P is empty, execute step B26.
[0105] B22: Take a service node N from the head of the performance test queue P; if the state of the service node N is state=ok, execute step B23; if the state of the service node N is state=ko, execute step B22;
[0106] It should be noted that in the embodiment of the present application, the state of the service node N can be obtained by performing a response test on the service node N. In addition, if the state of the service node N is state=ko, step B22 is executed, which can be understood as skipping the currently taken service node N, and then taking the next service node N from the head of the performance test queue P.
[0107] B23: query the link segmentation strategy configured in the system configuration server 8, and determine which service nodes should be subjected to performance testing this time according to the link segmentation strategy; if it is determined that the performance test of the service node N needs to be performed, set the field isSplit of the service node N to true; if it is determined that the performance test of the service node N does not need to be performed, set the field isSplit of the service node N to false;
[0108] If the field isSplit of the service node N is true, execute step B24; if the field isSplit of the service node N is false, execute step B22.
[0109] B24: query the calling address, request message and other parameters of the service node N from the test scheduling center according to the service name of the service node N, and then use the performance test control program stored in the distributed storage database 7 to perform a performance test on the service node N. The performance test control program may be a control program commonly used by those skilled in the art for performing a performance test, and the present application is not limited thereto.
[0110] B25: putting the obtained performance test result of the service node N into the performance test result processing queue R, analyzing the performance test result of the service node N; returning to step B21;
[0111] The performance test results may include but are not limited to service response time, the number of service requests that can be processed per second, and the service processing success rate; the analysis operation may include but is not limited to mathematical statistics of the above performance test results.
[0112] B26: After forming a complete report of the link segment performance test based on the analysis results, it ends.
[0113] It can be seen from the above description that the link segmentation performance testing method provided in the present application can place the service nodes in the service link into a performance testing queue for performance testing according to the link segmentation results.
[0114] In one embodiment, after placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes:
[0115] A full-link test is performed using a Mock virtual machine; the full link includes service nodes that respond normally and service nodes that fail to respond.
[0116] It is understandable that sometimes, due to performance failures of individual service nodes in the service link, performance testing of the entire link cannot be achieved. In this case, if a full-link performance test is required, a Mock virtual machine can be used for execution. For specific steps, see S501 to S505.
[0117] See also Figure 5 , use the Mock virtual machine to perform full-link testing, including:
[0118] S501: traverse each service node in the service call information tree;
[0119] S502: Perform response test on the service nodes in the traversal order to obtain the service nodes that fail to respond;
[0120] S503: Start the Mock virtual machine on the service node that failed to respond to the reply;
[0121] S504: Use the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the answer, and connect the entire link;
[0122] S505: Perform a performance test on the root service node of the entire link to obtain a performance test result of the entire link.
[0123] It is understandable that for business scenarios that require estimating the full-link performance, this application also provides a method for performing full-link performance testing using a Mock virtual machine. The specific process is as follows:
[0124] B31: Put the root service node A of the service call information tree as the first service node into the performance test queue Q; then loop through steps B32 to B36 until the end.
[0125] B32: Determine whether the performance test queue Q is empty; if the performance test queue Q is not empty, execute step B33; if the performance test queue Q is empty, execute step B37.
[0126] B33: Take a service node N from the head of the performance test queue Q, query all sub-service nodes S1 to Sn of this service node from the test scheduling center through the service name of the service node N, and put S1 to Sn into the performance test queue Q in sequence from the tail of the queue Q; wherein the so-called sub-service node is a service node called by this service node N, and also belongs to the same service link as this service node N; and after executing step B33, the queue Q no longer contains this service node N;
[0127] It should be noted that a service node N may have S1 to Sn, with a total of n child service nodes; and service node S1 may have S1' to Sn', with a total of n' child service nodes; each time a service node N is taken out from the head of the performance test queue Q, the performance test queue Q no longer contains the service node N, but newly added service nodes S1 to Sn; and when the service node S1 is traversed to and taken out, the performance test queue Q no longer contains the service node S1, but newly added service nodes S1' to Sn', and so on.
[0128] B34: According to the service call information of the service node N stored in the distributed storage database 7 of the test scheduling center, a response test is performed on the service node N to determine whether the response message is returned normally; if the response message fails to return normally (response failure), the status of the service node N is updated to abnormal; if the response message can be returned normally (response normal), the logical judgment of step B35 is performed.
[0129] B35: Query the Mock mode configured by the performance tester in the system configuration server 8;
[0130] If the Mock mode is the PM mode (i.e., query whether the actual production performance index threshold value is exceeded), query the actual production performance index threshold value; and compare the queried actual production performance index threshold value with the response response result carried by the response message in step B34. If the response response test result exceeds the actual production performance index threshold value, the status of the service node N is set to abnormal, otherwise it is set to normal. The so-called actual production performance index threshold value can be set according to the performance index of the service node N in the actual production process. Generally, the average value of the actual production performance index within a preset time period can be taken.
[0131] For example, the response time carried in the response message may be compared with an average value of the response time within a preset time period in actual production. If the response time exceeds the average value, the state of the service node N is set to abnormal.
[0132] If the Mock mode is CM mode (i.e., query whether the configuration performance indicator threshold value is exceeded), query the configuration performance indicator threshold value; and compare the queried configuration performance indicator threshold value with the response response result carried by the response message in step B34. If the response response test result exceeds the configuration performance indicator threshold value, the status of the service node N is set to abnormal, otherwise it is set to normal. The so-called configuration performance indicator threshold value can be set by the performance tester according to the actual business scenario.
[0133] The above two performance indicator thresholds can be pre-configured in the system configuration server 8 by performance testers according to test requirements.
[0134] B36: If the service node N is in an abnormal state, the service node N is set to a Mock state and the Mock virtual machine of the service node N is started; otherwise, the Mock virtual machine of the service node N is not started; and step B32 is re-executed.
[0135] B37: Perform performance test on root service node A. If there is an abnormal service node among the sub-service nodes called by root service node A, the system will embed the Mock service to complete its function and simulate the response time of the service according to its actual response time in daily production to ensure the accuracy of the full-link performance test. After the performance test of root service node A is completed, the full-link performance test results are integrated into the performance test report to form a complete performance test report.
[0136] It should be noted that after step B36 is executed cyclically, it can be considered that the entire link has been connected, and the performance test of the root service node A can be performed at this time.
[0137] From the above description, it can be seen that the link segmentation performance testing method provided in this application can use the Mock virtual machine to perform full-link testing.
[0138] Based on the same inventive concept, the embodiments of the present application also provide a link segmentation performance testing device, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Since the principle of solving the problem by the link segmentation performance testing device is similar to that of the link segmentation performance testing method, the implementation of the link segmentation performance testing device can refer to the implementation of the method based on software performance benchmark determination, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0139] See also Figure 6 In order to segment the service link based on the service call information obtained from the business service system, thereby completing the link segmentation performance test, the present application provides a link segmentation performance test device, including:
[0140] The link segmentation unit 601 is used to segment the service link according to the preset link segmentation strategy and the service call information obtained from the business service system;
[0141] The performance testing unit 602 is used to put the service nodes in the service link into a performance testing queue for performance testing according to the link segmentation result.
[0142] See also Figure 7 The service call information at least includes a service name, a call address, a request message, a response message and a response time; the link segmentation unit 601 includes:
[0143] A call relationship generating module 701, used to obtain the service call relationship between each service node according to the service name, call address, request message and response message;
[0144] A call information tree generating module 702, configured to generate a service call information tree according to the service call relationship;
[0145] The link segmentation module 703 is used to segment the service link according to the link segmentation strategy and the service call information tree.
[0146] See also Figure 8 , the link segment performance test device also includes:
[0147] A node traversal unit 801, used to traverse each service node in the service call information tree;
[0148] The response test unit 802 is used to perform a response test on the service nodes in a traversal order to obtain a service node with a normal response.
[0149] In one embodiment, the performance testing unit 602 is specifically used to:
[0150] The service node that responds normally is put into the performance test queue according to the link segmentation result.
[0151] See also Fig. 9 , the performance testing unit 602 comprises:
[0152] A node traversal module 901, configured to traverse each service node in the service call information tree according to the link segmentation result;
[0153] The performance testing module 902 is used to put the service nodes into the performance testing queue in a traversal order to perform performance testing, and put the obtained performance testing results of the service nodes into a performance testing result processing queue;
[0154] The test result analysis module 903 is used to analyze the performance test results in the performance test result processing queue.
[0155] In one embodiment, the link segment performance testing device further includes:
[0156] The full-link test unit is used to perform a full-link test using a Mock virtual machine; wherein the full link includes a service node that responds normally and a service node that fails to respond.
[0157] See also Fig.10 , full-link test unit, including:
[0158] A node traversal module 1001 is used to traverse each service node in the service call information tree;
[0159] A response response test module 1002 is used to perform a response response test on the service nodes in a traversal order to obtain the service nodes that failed to respond;
[0160] A virtual machine startup module 1003 is used to start the Mock virtual machine on the service node that failed to respond to the reply;
[0161] The full link connection module 1004 is used to use the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the reply, and connect the full link;
[0162] The performance test result generating module 1005 is used to perform a performance test on the root service node of the entire link to obtain a performance test result of the entire link.
[0163] From the hardware level, the service call information obtained from the business service system is segmented to perform link segmentation on the service link, thereby completing the link segmentation performance test. The present application provides an embodiment of an electronic device for implementing all or part of the contents of the link segmentation performance test method, and the electronic device specifically includes the following contents:
[0164] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the link segmentation performance test device and related devices such as the core business service system, user terminal and related database; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the link segmentation performance test method and the embodiment of the link segmentation performance test device in the embodiment, and the contents thereof are incorporated herein, and the repeated parts are not repeated.
[0165] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0166] In practical applications, part of the link segmentation performance test method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0167] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0168] Fig.11 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig.11 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig.11 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0169] In one embodiment, the link segment performance test method function may be integrated into the central processor 9100. The central processor 9100 may be configured to perform the following control:
[0170] S101: segmenting a service link according to a preset segmentation strategy and service call information obtained from a business service system;
[0171] S102: according to the link segmentation result, the service nodes in the service link are placed into a performance test queue for performance testing.
[0172] From the above description, it can be seen that the link segmentation performance testing method and device provided in the present application can segment and disassemble the service link in service scenarios where full-link testing cannot be performed directly, perform link segmentation performance testing, improve testing efficiency, and generate fine-grained and refined performance testing reports; at the same time, it can use virtual machines to simulate production performance indicators and perform full-link performance testing with relatively accurate results, and has a wide range of applicability.
[0173] In another embodiment, the link segmentation performance testing device can be configured separately from the central processing unit 9100. For example, the data composite transmission device link segmentation performance testing device can be configured as a chip connected to the central processing unit 9100, and the functions of the link segmentation performance testing method can be implemented through the control of the central processing unit.
[0174] like Fig.11As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig.11 In addition, the electronic device 9600 may also include Fig.11 For components not shown, reference may be made to the prior art.
[0175] like Fig.11 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0176] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0177] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0178] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0179] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0180] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0181] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0182] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the link segment performance test method in the above embodiment, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the link segment performance test method in the above embodiment, where the execution subject is a server or a client, are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0183] S101: segmenting a service link according to a preset segmentation strategy and service call information obtained from a business service system;
[0184] S102: according to the link segmentation result, the service nodes in the service link are placed into a performance test queue for performance testing.
[0185] From the above description, it can be seen that the link segmentation performance testing method and device provided in the present application can segment and disassemble the service link in service scenarios where full-link testing cannot be performed directly, perform link segmentation performance testing, improve testing efficiency, and generate fine-grained and refined performance testing reports; at the same time, it can use virtual machines to simulate production performance indicators and perform full-link performance testing with relatively accurate results, and has a wide range of applicability.
[0186] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0187] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0190] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A link segment performance testing method, characterized in that: include: Segment the service link according to the preset link segmentation strategy and the service call information obtained from the business service system; According to the link segmentation result, the service nodes in the service link are placed into a performance test queue for performance testing; Wherein, the service call information at least includes a service name, a call address, a request message, a response message and a response time; the link segmentation of the service link according to the preset link segmentation strategy and the service call information obtained from the business service system includes: obtaining the service call relationship between each service node according to the service name, call address, request message and response message; generating a service call information tree according to the service call relationship; link segmenting the service link according to the link segmentation strategy and the service call information tree; specifically, the call information collection server deploys an information probe at the JVM level of the service node of the business service system to obtain service call information including the service name, call address, request message and response message from the business service system; After placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes: Use the Mock virtual machine to perform a full-link test; wherein the full link includes service nodes that respond normally and service nodes that fail to respond; The use of a Mock virtual machine to perform a full-link test includes: Traversing each service node in the service call information tree; Perform response test on the service nodes in the traversal order to obtain the service nodes that failed to respond; Start the Mock virtual machine on the service node that failed to respond to the reply; Utilize the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the reply, and run through the entire link; Perform a performance test on the root service node of the entire link to obtain a performance test result of the entire link.
2. The link segment performance testing method according to claim 1, characterized in that: Before placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes: Traversing each service node in the service call information tree; A response test is performed on the service nodes in the traversal order to obtain a service node with a normal response.
3. The link segment performance testing method according to claim 1, characterized in that: The step of placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result includes: Traversing each service node in the service call information tree according to the link segmentation result; Put the service node into the performance test queue according to the traversal order to perform performance test, and put the obtained performance test result of the service node into the performance test result processing queue; The performance test results in the performance test result processing queue are analyzed.
4. A link segment performance test device, characterized in that: include: A link segmentation unit, used to segment the service link according to a preset link segmentation strategy and service call information obtained from the business service system; A performance testing unit, configured to place the service nodes in the service link into a performance testing queue for performance testing according to the link segmentation result; The service call information at least includes a service name, a call address, a request message, a response message and a response time; the link segmentation unit includes: a call relationship generation module, which is used to obtain the service call relationship between each service node according to the service name, call address, request message and response message; a call information tree generation module, which is used to generate a service call information tree according to the service call relationship; a link segmentation module, which is used to segment the service link according to the link segmentation strategy and the service call information tree; specifically, the call information collection server deploys an information probe at the JVM level of the service node of the business service system to obtain service call information including the service name, call address, request message and response message from the business service system; After placing the service nodes in the service link into a performance test queue for performance testing according to the link segmentation result, the method further includes: Use the Mock virtual machine to perform a full-link test; wherein the full link includes service nodes that respond normally and service nodes that fail to respond; The use of a Mock virtual machine to perform a full-link test includes: Traversing each service node in the service call information tree; Perform response test on the service nodes in the traversal order to obtain the service nodes that failed to respond; Start the Mock virtual machine on the service node that failed to respond to the reply; Utilize the Mock virtual machine to execute the service corresponding to the service node that failed to respond to the reply, and run through the entire link; Perform a performance test on the root service node of the entire link to obtain a performance test result of the entire link.
5. The link segment performance test device according to claim 4, characterized in that: The performance testing unit comprises: A node traversal module, used for traversing each service node in the service call information tree according to the link segmentation result; A performance testing module, used to place the service nodes into the performance testing queue in a traversal order for performance testing, and place the obtained performance testing results of the service nodes into a performance testing result processing queue; The test result analysis module is used to analyze the performance test results in the performance test result processing queue.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the link segment performance testing method according to any one of claims 1 to 3 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the link segment performance testing method described in any one of claims 1 to 3 are implemented.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the link segment performance testing method described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Security control method, system and equipment for transaction fund and storage medium
CN110992023A
Link test method and device based on automatic baffle, and related equipment
CN112667501A