Hybrid transaction test method and device

Through automated hybrid transaction testing methods and devices, the problem of cumbersome and time-consuming manual recording and analysis of test results data is solved, and the optimal group scenario is automatically analyzed, which improves the testing efficiency and accuracy.

CN119690841APending Publication Date: 2025-03-25CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411862059.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

When conducting non-functional testing, manually recording and analyzing test results data in hybrid transaction tests is cumbersome, prone to errors, and takes a long time, which affects the testing efficiency.

Method used

It provides a hybrid transaction testing method and device that can automatically receive test instructions, configure the number of concurrent users, start the test program, obtain test results, and use these results to automatically generate trend charts to analyze the optimal group scenarios, instead of manually filling data to avoid data filling errors.

Benefits of technology

It realizes automatic and accurate analysis of optimal group scenarios, saves testers time and cost, improves test efficiency, and reduces the possibility of data filling errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690841A_ABST
    Figure CN119690841A_ABST
Patent Text Reader

Abstract

The invention discloses a mixed transaction test method and device, and relates to the technical field of artificial intelligence. A specific embodiment of the method comprises the following steps: receiving a mixed transaction test instruction, obtaining a concurrent user number ratio of each group of scenes, and configuring the concurrent user number of each group of scenes according to gradient equal difference; starting a mixed transaction test program, gradually increasing pressure for each group of scenes according to the number of concurrent users configured for each group of scenes until the test index parameters exceed the test export criterion, and obtaining a test result; in response to a click on the optimal group analysis plug-in, generating a trend chart including a relationship among the test indexes by using the test result; and acquiring an inflection point in the trend chart, and taking the scene corresponding to the inflection point as an optimal group when determining that the inflection point meets a preset judgment condition. According to the embodiment, at least the visual trend chart can be automatically generated, and the optimal group scene can be analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a hybrid transaction testing method and device. Background Art

[0002] When conducting non-functional testing, mixed transaction processing capability is usually an important indicator of test system performance. For mixed transaction testing, testers manually record the test result data of each group of scenarios into Excel software, and then manually use Excel to generate trend charts. Testers manually analyze the optimal group of scenarios based on the trend charts. It can be seen that if there are too many test scenario groups or too much test result data, manual data filling is prone to errors, the analysis process takes a lot of time for testers, and the accuracy is also poor. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a hybrid transaction testing method and device, which can at least directly and automatically generate an intuitive trend chart based on the measured test result data, which can not only achieve the purpose of automatically and accurately analyzing the optimal group scenario, but also replace the tedious work of testers manually filling in data, and avoid data filling errors, which not only saves time and cost, but also greatly improves testing efficiency.

[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a hybrid transaction testing method is provided, including: receiving a hybrid transaction testing instruction, obtaining the ratio of the number of concurrent users of each group of scenarios, and configuring the number of concurrent users of each group of scenarios according to a gradient arithmetic difference; starting a hybrid transaction testing program, and gradually increasing the pressure on each group of scenarios according to the number of concurrent users configured for each group of scenarios, until the test indicator parameters exceed the test exit criteria, and obtaining the test results; in response to a click on an optimal group analysis plug-in, using the test results to generate a trend chart including the relationship between test indicators; obtaining an inflection point in the trend chart, and determining that the inflection point meets the preset judgment condition, then taking the scene corresponding to the inflection point as the optimal group.

[0005] Optionally, in response to clicking on the optimal group analysis plug-in, it includes: displaying all test indicators, in response to the selection of the test indicators, obtaining the corresponding aggregation report in the test results, obtaining the corresponding aggregation report in the test results, reading the test indicator parameters in the aggregation report, and generating a trend chart including the relationship between the test indicators.

[0006] Optionally, the test indicator parameters exceed the test exit criteria, including: calling a constraint set, selecting a constraint according to business information in the hybrid transaction test instruction, and using the selected constraint as the test exit criteria.

[0007] Optionally, the test results are used to generate a trend graph showing the relationship between the test indicators, including: taking the number of concurrent users as a first test indicator, and generating corresponding trend graphs for the other test indicators and the first test indicator respectively.

[0008] Optionally, after generating corresponding trend graphs for the other test indicators and the first test indicator respectively, the method includes: determining a condition indicator for judging the optimal group, and obtaining a trend graph including a relationship between the condition indicator and the first test indicator.

[0009] Optionally, it also includes: obtaining test indicators in the test results, selecting conditional indicators from the test indicators based on the business information in the hybrid transaction test instructions; configuring thresholds corresponding to the conditional indicators, and using the conditional indicators and corresponding thresholds as judgment conditions for the optimal group.

[0010] Optionally, it also includes: in response to selecting multiple condition indicators in the test indicators, configuring the threshold corresponding to each condition indicator and the judgment order of the multiple condition indicators, and using the multiple condition indicators with the judgment order and the corresponding thresholds together as the judgment conditions of the optimal group.

[0011] Optionally, in response to clicking on the optimal group analysis plug-in, an optimal group analysis plug-in is generated, including: creating a project management tool; writing plug-in code: setting a configuration file in the project management tool, reading test results from the aggregate report as data points, generating a trend chart and saving it as a picture; running and debugging the plug-in code, and packaging the plug-in code and storing it in a preset directory.

[0012] Optionally, set the configuration file in the project management tool, including: the optimal group analysis plug-in is a Jmeter-based extension, and configures two dependent Jmeter packages, ApacheJMeter_core and ApacheJMeter_java; configures the JFreeChart library to generate curve charts, and adds JFreeChart dependencies.

[0013] Optionally, the plug-in code is packaged, including: packaging the plug-in code into a jar package and placing it in the ext directory of Jmeter.

[0014] Optionally, the method further includes: restarting Jmeter, loading the jar package of the plug-in code in the ext directory, and displaying the newly added plug-in in the menu bar.

[0015] Optionally, the test results are read from the aggregate report as data points, including: after the mixed transaction test is completed, obtaining the aggregate report corresponding to each group of scenarios, the aggregate report including the test results of various test indicators; reading the test results in the aggregate report as data points of the trend chart.

[0016] Optionally, generating a trend chart and saving it as a picture includes: determining test indicators as the X-axis and Y-axis of the trend chart, traversing corresponding test indicator data in multiple groups of aggregation reports, and storing them in the X table and the Y table respectively; generating a trend chart according to the X table and the Y table, and saving the trend chart as a picture.

[0017] Optionally, generating a trend chart according to the X table and the Y table includes: traversing the values ​​in the X table and the Y table and storing the values ​​in XYSeries objects accordingly; creating a data set, adding the XYSeries objects to the XYSeriesCollection, and generating a trend chart.

[0018] To achieve the above-mentioned purpose, according to another aspect of an embodiment of the present invention, a hybrid transaction testing device is provided, including: a starting module, used to receive a hybrid transaction test instruction, obtain the ratio of the number of concurrent users of each group of scenarios, and configure the number of concurrent users of each group of scenarios according to a gradient arithmetic difference; start the hybrid transaction test program, and gradually increase the pressure on each group of scenarios according to the number of concurrent users configured for each group of scenarios, until the test indicator parameters exceed the test exit criteria, and obtain the test results; a trend chart generation module, used to respond to a click on an optimal group analysis plug-in, and use the test results to generate a trend chart including the relationship between test indicators; an optimal group determination module, used to obtain an inflection point in the trend chart, and if it is determined that the inflection point meets the preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

[0019] Optionally, in response to a click on the optimal group analysis plug-in, the trend chart generation module includes: displaying all test indicators, obtaining the corresponding aggregation report in the test results in response to the selection of the test indicators, obtaining the corresponding aggregation report in the test results, reading the test indicator parameters in the aggregation report, and generating a trend chart including the relationship between the test indicators.

[0020] Optionally, starting the module test indicator parameter beyond the test exit criterion includes: calling a constraint set, selecting a constraint according to business information in the hybrid transaction test instruction, and using the selected constraint as the test exit criterion.

[0021] Optionally, the trend chart generation module generates a trend chart having the relationship between the test indicators using the test results, including: taking the number of concurrent users as the first test indicator, and generating corresponding trend charts for the other test indicators and the first test indicator respectively.

[0022] Optionally, after the trend graph generation module generates corresponding trend graphs for other test indicators and the first test indicator respectively, it includes: determining a condition indicator for judging the optimal group, and obtaining a trend graph including the relationship between the condition indicator and the first test indicator.

[0023] Optionally, the optimal group determination module is also used to: obtain test indicators in the test results, select conditional indicators from the test indicators based on the business information in the hybrid transaction test instructions; configure thresholds corresponding to the conditional indicators, and use the conditional indicators and corresponding thresholds as judgment conditions for the optimal group.

[0024] Optionally, the optimal group determination module is also used to: in response to selecting multiple condition indicators in the test indicators, configure the threshold corresponding to each condition indicator and the judgment order of the multiple condition indicators, and use the multiple condition indicators with the judgment order and the corresponding thresholds together as the judgment conditions of the optimal group.

[0025] Optionally, the trend chart generation module generates an optimal group analysis plug-in in response to a click on the optimal group analysis plug-in, including: creating a project management tool; writing plug-in code: setting a configuration file in the project management tool, reading test results from the aggregate report as data points, generating a trend chart and saving it as a picture; running and debugging the plug-in code, and packaging the plug-in code and storing it in a preset directory.

[0026] Optionally, the trend chart generation module sets a configuration file in the project management tool, including: configuring the optimal group analysis plug-in as an extension based on Jmeter, configuring two dependent Jmeter packages ApacheJMeter_core and ApacheJMeter_java; configuring the JFreeChart library to generate a curve chart, and adding JFreeChart dependency.

[0027] Optionally, the trend chart generation module packages the plug-in code, including: packaging the plug-in code into a jar package and placing it in the ext directory of Jmeter.

[0028] Optionally, the trend chart generation module is further used to: restart Jmeter, load the jar package of the plug-in code in the ext directory, and display the newly added plug-in in the menu bar.

[0029] Optionally, the trend chart generation module reads the test results from the aggregate report as data points, including: after the mixed transaction test is completed, obtaining the aggregate report corresponding to each group of scenarios, the aggregate report including the test results of various test indicators; reading the test results in the aggregate report as data points of the trend chart.

[0030] Optionally, the trend chart generation module generates a trend chart and saves it as a picture, including: determining test indicators as the X-axis and Y-axis of the trend chart, traversing corresponding test indicator data in multiple groups of aggregation reports, and storing them in the X table and the Y table respectively; generating a trend chart according to the X table and the Y table, and saving the trend chart as a picture.

[0031] Optionally, the trend chart generation module generates a trend chart according to the X table and the Y table, including: traversing the values ​​in the X table and the Y table and storing them in XYSeries objects accordingly; creating a data set, adding the XYSeries object to the XYSeriesCollection, and generating a trend chart.

[0032] To achieve the above objective, according to another aspect of an embodiment of the present invention, a hybrid transaction test electronic device is provided.

[0033] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned hybrid transaction testing methods.

[0034] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned hybrid transaction testing methods is implemented.

[0035] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer program product is provided. A computer program product of an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the hybrid transaction testing method provided by the embodiment of the present invention is implemented.

[0036] According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: the present invention cleverly adds a new function to the Jmeter extension, which can check the measured multi-gradient test data results, automatically generate a trend chart and analyze the optimal group of mixed transaction tests, which not only avoids the tester's manual data input errors, but also saves time and effort and improves test efficiency.

[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 This is a schematic diagram of the main process of a hybrid transaction testing method according to an embodiment of the present invention;

[0040] Figure 2 is a schematic diagram of a main process of generating an optimal group analysis plug-in according to an embodiment of the present invention;

[0041] Figure 3 is a main flow chart of another hybrid transaction testing method according to an embodiment of the present invention;

[0042] Figure 4 is a schematic diagram of main modules of a hybrid transaction testing device according to an embodiment of the present invention;

[0043] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0044] Figure 6 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0046] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0047] In the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The acquisition, transmission, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations, and are used for legal and reasonable purposes, and are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities.

[0048] For user information, necessary measures should be taken to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data. When applicable, including in certain relevant applications, protect user privacy by de-identifying data, such as by removing specific identifiers (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of de-identification.

[0049] See also Figure 1, which shows a main flow chart of a hybrid transaction testing method provided by an embodiment of the present invention, comprising the following steps:

[0050] S101: Receive a mixed transaction test instruction, obtain the ratio of the number of concurrent users in each group of scenarios, and configure the number of concurrent users in each group of scenarios according to a gradient arithmetic progression.

[0051] S102: Start the mixed transaction test program, gradually increase the pressure on each scenario according to the number of concurrent users configured for each scenario, until the test indicator parameters exceed the test exit criteria, and obtain the test results.

[0052] S103: In response to a click on the optimal group analysis plug-in, a trend graph including the relationship between test indicators is generated using the test results.

[0053] S104: Obtain an inflection point in the trend graph, and if it is determined that the inflection point meets a preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

[0054] In a further embodiment, for step S101, the present invention can use Jmeter (a tool for stress testing software) to perform non-functional testing, and specific test indicators can include average response time (ms) of mixed transactions, TPS (transactions / second), transaction success rate (%), CPU utilization of resource utilization, etc. Among them, TPS stands for Transaction Per Second, which means the number of transactions that the system can process per second. CPU stands for Central Processing Unit, which is the central processing unit. As the computing and control core of the computer system, it is the final execution unit for information processing and program operation.

[0055] The hybrid transaction test scenario adopts an online transaction scenario and proportions each group of online transaction scenarios. The number of concurrent users in each group of scenarios is configured according to a gradient arithmetic difference. For example, 50 VUs are added to each group. Each group of scenarios is pressured separately in order to test the optimal group of scenarios.

[0056] For example: the embodiment of the present invention can write an extension plug-in based on Jmeter for non-functional testing using Jmeter. After adding the plug-in to Jmeter, a mixed transaction test can be set up according to the gradient arithmetic of the number of concurrent users (VU). Select the extension plug-in in the menu bar, and you can check multiple groups of test results measured. Jmeter will automatically generate a trend chart, and the optimal group of mixed transaction tests can be analyzed from the trend chart. For example: The optimal group finally obtained: Under the condition that the CPU and the average response time of the mixed transaction meet the threshold, the TPS remains stable and the maximum value that the TPS can reach as the number of concurrent users VU increases. Among them, the number of concurrent users VU stands for Virtual Users, which can also be the number of virtual users. In the performance testing tool, it is used to simulate users who operate business in the real system.

[0057] In a further embodiment, for the test indicator parameters in step S102 exceeding the test exit criteria, the test exit criteria can be configured dynamically and flexibly according to different test requirements. For example, a constraint set can be configured, and the corresponding constraint is matched from the constraint set based on the test requirements as the test exit criteria. The specific implementation process may include: calling the constraint set, selecting the constraint according to the business information in the hybrid transaction test instruction, and using the selected constraint as the test exit criterion. It can be seen that the test requirements can be reflected in the hybrid transaction test instruction, that is, the business information is configured in the hybrid transaction test instruction, and the constraint is selected based on the business information. For example: the business information includes attribute A, and attribute A and its threshold value exist in the constraint set, then the attribute A and its threshold value can be used as the test exit criterion.

[0058] For step S102, an example is given: each group of scenarios gradually increases the pressure, such as adding 50 VU concurrent users, until the test exit criteria are met (such as the test index exceeds the threshold or other constraints), each group of test result data is obtained, and the test is terminated. Example: Test exit criteria: average response time greater than the threshold, TPS lower than the threshold, TPS higher than the threshold but unstable, CPU usage rate exceeds the threshold, transaction success rate lower than the threshold, etc. Each group of gradients runs stably for 10 minutes.

[0059] In a further embodiment, for step S103, in response to clicking on the optimal group analysis plug-in, the test indicators of all group scenarios can be displayed for selection, and then the trend chart and the optimal group can be automatically generated according to the selected test indicators, so as to adapt to the generation of different trend charts and the acquisition of the optimal group. The specific implementation process includes: displaying all test indicators, in response to the selection of test indicators, obtaining the corresponding aggregate report in the test results, obtaining the corresponding aggregate report in the test results, reading the test indicator parameters in the aggregate report, and generating a trend chart including the relationship between the test indicators.

[0060] In some other embodiments, when the trend graph with the relationship between the test indicators is generated using the test results in step S103, the number of concurrent users can be used as the first test indicator, and the other test indicators can be respectively generated with the first test indicator to generate corresponding trend graphs. In a further embodiment, the other test indicators can be determined by the condition indicators used to determine the optimal group, and the specific implementation process includes: determining the condition indicators used to determine the optimal group, and obtaining a trend graph including the relationship between the condition indicators and the first test indicator.

[0061] Example: Click the plug-in in the menu bar, check TPS, VU, and CPU according to the test results of all group scenarios displayed, read the aggregation report of the checked TPS, VU, and CPU, and generate trend graphs of TPS and VU and CPU and VU.

[0062] In a further embodiment, for step S103, in response to clicking on the optimal group analysis plug-in, an optimal group analysis plug-in is generated, such as Figure 2 As shown, including:

[0063] S201: Create project management tools.

[0064] Example: Use IDEA software to create a Maven project management tool, where IDEA stands for IntelliJIDEA, which is a development software for the JAVA programming language, and Maven is a project management and automatic build tool.

[0065] S202: Write plug-in code: set the configuration file in the project management tool, read the test results from the aggregate report as data points, generate a trend chart and save it as a picture.

[0066] S203: Run and debug the plug-in code, and package and store the plug-in code in a preset directory.

[0067] In a further embodiment, in step S202, the configuration file in the project management tool is set, including: the optimal group analysis plug-in is an extension based on Jmeter, and the two dependent Jmeter packages ApacheJMeter_core and ApacheJMeter_java are configured; the JFreeChart library is configured to generate a curve chart, and the JFreeChart dependency is added. In other words, the extension based on Jmeter needs to rely on two packages in Jmeter, namely: ApacheJMeter_core and ApacheJMeter_java. The JFreeChart library (a drawing library for the object-oriented computer programming language Java) is used to generate a curve chart based on the data, and the JFreeChart dependency needs to be added. For example: the pom.xml configuration file can be set, where the pom.xml configuration file is the core configuration file of the Maven project, and its main function is to define the results, dependencies, and build process of the project.

[0068] In a further embodiment, for reading the test results from the aggregate report as data points in step S202, it can include: after the mixed transaction test is completed, obtaining the aggregate report corresponding to each group of scenarios, the aggregate report including the test results of various test indicators; reading the test results in the aggregate report as data points for the trend chart. Example: Before generating a trend chart, you need to collect data points. After the mixed transaction test is completed, an aggregate report will be generated. The number of aggregate reports generated is the same as the number of groups of tests performed. The aggregate report contains various test result data, such as TPS, average response time, CPU usage, number of concurrent users, etc. These aggregate reports need to be checked first to read these data as data points for the trend chart.

[0069] In a further embodiment, in step S202, generating a trend chart and saving it as a picture includes: determining the test indicators as the X-axis and Y-axis of the trend chart, traversing the corresponding test indicator data in multiple groups of aggregation reports, and storing them in the X table and the Y table respectively; generating a trend chart according to the X table and the Y table, and saving the trend chart as a picture. In a preferred embodiment, generating a trend chart according to the X table and the Y table includes: traversing the values ​​in the X table and the Y table, and storing them in the XYSeries object accordingly; creating a data set, adding the XYSeries object to the XYSeriesCollection, and generating a trend chart.

[0070] Example: Traverse multiple groups of aggregate reports and create a data set, that is, store the VU value in a List <integer>XList, and store the TPS value in List <double>In YList, the length of List represents the number of test scenario groups. For example, 4 groups of scenario tests generate a total of 4 groups of aggregation reports, where the VU values ​​are 100, 150, 200, and 250, and the corresponding TPS values ​​are 342.12, 468.39, 645.80, and 796.77, respectively.

[0071] List <integer>xList=Arrays.asList(100,150,200,250),

[0072] List <double>yList=Arrays.asList(342.12,468.39,645.80,796.77).

[0073] Traverse the values ​​of xList and store the data of XList and YList into the XYSeries object one by one:

[0074] XYSeries xySeries=new XYSeries("Chart");

[0075] for(int i=0; i <xList.size();i++){

[0076] series.add(xList.get(i),yList.get(i));

[0077] }

[0078] Add the XYSeries object to the XYSeriesCollection:

[0079] XYSeriesCollection collection=new XYSeriesCollection(xySeries);

[0080] Generate trend chart:

[0081] JFreeChart jFreeChart=ChartFactory.createXYLineChart(

[0082] "Line Chart","X","Y",

[0083] collection,PlotOrientation.VERTICAL,

[0084] true,true,false );

[0086] Save as image:

[0087] ChartUtils.saveChartAsPNG(new File("chart.png"),jFreeChart,1000, 800);

[0089] Therefore, by using the VU value as the data point of the X-axis and the TPS value as the data point of the Y-axis, a trend chart of TPS and VU is generated, which can show the trend of TPS changing with the change of VU value. By using the VU value as the data point of the X-axis and the CPU value as the data point of the Y-axis, a trend chart of CPU and VU is generated, which can show the trend of CPU changing with the change of VU value.

[0090] In a further embodiment, in step S203, after the plug-in code is debugged, the plug-in code can be packaged into a jar package and placed in the ext directory of Jmeter, for example:

[0091] apache-jmeter\lib\ext. It is worth noting that after step S403, the test program can be restarted to complete the plug-in addition. For example, restart Jmeter, automatically load the jar package of the plug-in code in the ext directory, and display the newly added plug-in in the menu bar.

[0092] In a further embodiment, the judgment conditions for step S104 can be configured in advance, and the judgment conditions can be flexibly configured according to different testing requirements. The specific implementation process includes: obtaining test indicators in the test results, selecting condition indicators from the test indicators based on the business information in the hybrid transaction test instructions, and then configuring the thresholds corresponding to the condition indicators, and using the condition indicators and the corresponding thresholds as the judgment conditions of the optimal group.

[0093] It is worth noting that the judgment condition of step S104 can be one or more. When multiple judgment conditions are configured according to different test requirements, the following process can be performed: in response to selecting multiple condition indicators in the test indicators, the threshold corresponding to each condition indicator and the judgment order of multiple condition indicators are configured, and the multiple condition indicators with the judgment order and the corresponding thresholds are used together as the judgment conditions of the optimal group. Example: Select TPS, VU, CPU

[0094] There are multiple conditional indicators, and the judgment order is the relationship between TPS and VU, and the relationship between CPU and VU. The threshold is: CPU threshold. From the trend chart of TPS and VU, the VU and TPS corresponding to the inflection point are the maximum number of concurrent users VU and the highest TPS that can be achieved when the average response time of the mixed transaction meets the threshold condition and the TPS remains stable. Then, from the trend chart of CPU and VU, it is obtained whether the CPU meets the CPU threshold when the maximum number of concurrent users VU is obtained. If so, the scenario corresponding to the maximum number of concurrent users VU is the optimal group for the mixed transaction test. It can be seen that the present invention supports checking multiple groups of test results measured in Jmeter, generating trend charts of TPS and VU, and trend charts of CPU and VU, reducing the tedious record work of testers, avoiding filling in incorrect data, saving time and effort, and greatly improving efficiency.

[0095] See also Figure 3 , shows a schematic flow chart of an optional hybrid transaction testing method according to an embodiment of the present invention, comprising the following steps:

[0096] S301: Receive a mixed transaction test instruction, obtain the ratio of the number of concurrent users in each group of scenarios, and configure the number of concurrent users in each group of scenarios according to a gradient arithmetic progression.

[0097] S302: Call the constraint condition set, select the constraint condition according to the business information in the hybrid transaction test instruction, and use the selected constraint condition as the test exit criterion.

[0098] S303: Start the mixed transaction test program, gradually increase the pressure on each scenario according to the number of concurrent users configured for each scenario, until the test indicator parameters exceed the test exit criteria, and obtain the test results.

[0099] S304: Responding to a click on the optimal group analysis plug-in.

[0100] S305: Display all test indicators, and in response to the selection of the test indicator, obtain the corresponding aggregate report in the test result, and read the test indicator parameters in the aggregate report.

[0101] S306: Use the number of concurrent users as the first test indicator, and generate corresponding trend graphs for the other test indicators and the first test indicator respectively.

[0102] S307: Acquire the test indicators in the test results, and select conditional indicators from the test indicators according to the business information in the hybrid transaction test instruction.

[0103] S308: In response to selecting multiple condition indicators from the test indicators, configure a threshold corresponding to each condition indicator and a judgment order of the multiple condition indicators, and use the multiple condition indicators with the judgment order and the corresponding thresholds together as the judgment conditions of the optimal group.

[0104] S309: From all the generated trend graphs, obtain a trend graph including the relationship between the condition indicator and the first test indicator.

[0105] S310: Obtain an inflection point in the trend graph, and if it is determined that the inflection point meets a preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

[0106] See also Figure 4 , shows a schematic diagram of main modules of a hybrid transaction testing device 800 provided by an embodiment of the present invention, including:

[0107] The start module 401 is used to receive a mixed transaction test instruction, obtain the ratio of the number of concurrent users of each group of scenarios, and configure the number of concurrent users of each group of scenarios according to a gradient arithmetic difference; start the mixed transaction test program, gradually increase the pressure on each group of scenarios according to the number of concurrent users configured for each group of scenarios, until the test indicator parameter exceeds the test exit criterion, and obtain the test result;

[0108] A trend chart generating module 402, for generating a trend chart including the relationship between the test indicators using the test results in response to a click on the optimal group analysis plug-in;

[0109] The optimal group determination module 403 is used to obtain the inflection point in the trend graph, and if the inflection point satisfies the preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

[0110] In the implementation device of the present invention, the trend chart generation module 402 responds to a click on the optimal group analysis plug-in, including: displaying all test indicators, obtaining the corresponding aggregation report in the test results in response to the selection of the test indicators, obtaining the corresponding aggregation report in the test results, reading the test indicator parameters in the aggregation report, and generating a trend chart including the relationship between the test indicators.

[0111] In the implementation device of the present invention, the startup module 401 tests that the index parameter exceeds the test exit criterion, including: calling the constraint condition set, selecting the constraint condition according to the business information in the hybrid transaction test instruction, and using the selected constraint condition as the test exit criterion.

[0112] In the implementation device of the present invention, the trend chart generation module 402 uses the test results to generate a trend chart with the relationship between test indicators, including: taking the number of concurrent users as the first test indicator, and generating corresponding trend charts for other test indicators and the first test indicator respectively.

[0113] In the implementation device of the present invention, the trend graph generation module 402 is further used to: determine a condition index for determining the optimal group, and obtain a trend graph including the relationship between the condition index and the first test index.

[0114] In the implementation device of the present invention, the optimal group determination module 403 is also used to: obtain the test indicators in the test results, select condition indicators from the test indicators according to the business information in the hybrid transaction test instructions; configure the thresholds corresponding to the condition indicators, and use the condition indicators and the corresponding thresholds as the judgment conditions for the optimal group.

[0115] In the implementation device of the present invention, the optimal group determination module 403 is also used to: in response to selecting multiple condition indicators in the test indicators, configure the threshold value corresponding to each condition indicator and the judgment order of the multiple condition indicators, and use the multiple condition indicators with the judgment order and the corresponding threshold values ​​together as the judgment conditions of the optimal group.

[0116] In the implementation device of the present invention, the trend chart generation module 402 generates an optimal group analysis plug-in in response to a click on the optimal group analysis plug-in, including: creating a project management tool; writing plug-in code: setting a configuration file in the project management tool, reading test results from the aggregation report as data points, generating a trend chart and saving it as a picture; running and debugging the plug-in code, and packaging the plug-in code and storing it in a preset directory.

[0117] In the implementation device of the present invention, the trend chart generation module 402 sets the configuration file in the project management tool, including: the optimal group analysis plug-in is an extension based on Jmeter, and two dependent Jmeter packages ApacheJMeter_core and ApacheJMeter_java are configured; the JFreeChart library is configured to generate a curve chart, and JFreeChart dependency is added.

[0118] In the implementation device of the present invention, the trend chart generation module 402 packages the plug-in code, including: packaging the plug-in code into a jar package and placing it in the ext directory of Jmeter.

[0119] In the implementation device of the present invention, the trend chart generation module 402 is also used to: restart Jmeter, load the jar package of the plug-in code in the ext directory, and display the newly added plug-in in the menu bar.

[0120] In the implementation device of the present invention, the trend chart generation module 402 reads the test results from the aggregate report as data points, including: after the mixed transaction test is completed, obtaining the aggregate report corresponding to each group of scenarios, the aggregate report including the test results of various test indicators; reading the test results in the aggregate report as data points of the trend chart.

[0121] In the implementation device of the present invention, the trend chart generation module 402 generates a trend chart and saves it as a picture, including: determining the test indicators as the X-axis and Y-axis of the trend chart, traversing the corresponding test indicator data in multiple groups of aggregation reports, and storing them in the X table and the Y table respectively; generating a trend chart according to the X table and the Y table, and saving the trend chart as a picture.

[0122] In the implementation device of the present invention, the trend chart generation module 402 generates a trend chart according to the X table and the Y table, including: traversing the values ​​in the X table and the Y table and storing them in the XYSeries object accordingly; creating a data set, adding the XYSeries object to the XYSeriesCollection, and generating a trend chart.

[0123] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.

[0124] Figure 5 An exemplary system architecture 500 to which embodiments of the present invention may be applied is shown, including terminal devices 501 , 502 , 503 , a network 504 and a server 505 (only an example).

[0125] Terminal devices 501, 502, 503 can be various electronic devices with display screens and supporting web browsing, and various communication client applications are installed. Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc.

[0126] The network 904 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0127] The server 505 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device. It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the device is generally set in the server 505.

[0128] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0129] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0130] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0131] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0132] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0133] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0134] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0135] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a step extraction module, a task workflow generation module, and a scenario workflow generation module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the scenario workflow generation module may also be described as an "operation and maintenance scenario workflow generation module".

[0136] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes any of the above hybrid transaction testing methods.

[0137] The computer program product of the present invention comprises a computer program, and when the computer program is executed by a processor, the hybrid transaction testing method in the embodiment of the present invention is implemented.

[0138] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.< / double> < / integer> < / double> < / integer>

Claims

1. A hybrid transaction testing method, characterized in that: include: Receive the mixed transaction test instruction, obtain the ratio of concurrent users in each group of scenarios, and configure the number of concurrent users in each group of scenarios according to the gradient arithmetic difference; Start the mixed transaction test program, and gradually increase the pressure on each scenario according to the number of concurrent users configured for each scenario, until the test indicator parameters exceed the test exit criteria, and obtain the test results; In response to a click on the optimal group analysis plug-in, a trend graph including a relationship between test indicators is generated using the test results; The inflection point in the trend graph is obtained, and if it is determined that the inflection point meets the preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

2. The method according to claim 1, characterized in that In response to clicking on the Optimal Group Analysis plug-in, including: Display all test indicators, respond to the selection of test indicators, obtain the corresponding aggregation report in the test results, obtain the corresponding aggregation report in the test results, read the test indicator parameters in the aggregation report, and generate a trend chart including the relationship between the test indicators.

3. The method according to claim 1, characterized in that Test indicator parameters exceed the test exit criteria, including: Call the constraint condition set, select the constraint condition according to the business information in the mixed transaction test instruction, and use the selected constraint condition as the test exit criterion.

4. The method according to claim 1, characterized in that: Use test results to generate trend graphs with relationships between test indicators, including: The number of concurrent users is used as the first test indicator, and corresponding trend graphs are generated for the other test indicators and the first test indicator respectively.

5. The method according to claim 4, characterized in that After the other test indicators are respectively generated with the first test indicator, corresponding trend graphs are generated, including: A condition index for determining an optimal group is determined, and a trend graph including a relationship between the condition index and a first test index is obtained.

6. The method according to claim 1, characterized in that Also includes: Obtain the test indicators in the test results, and select conditional indicators from the test indicators according to the business information in the mixed transaction test instructions; The threshold corresponding to the condition index is configured, and the condition index and the corresponding threshold are used as the judgment condition of the optimal group.

7. The method according to claim 6, characterized in that Also includes: In response to selecting multiple condition indicators from the test indicators, a threshold corresponding to each condition indicator and a judgment order of the multiple condition indicators are configured, and the multiple condition indicators with the judgment order and the corresponding thresholds are used together as the judgment conditions of the optimal group.

8. The method according to claim 1, characterized in that: In response to clicking on the optimal group analysis plug-in, generating the optimal group analysis plug-in includes: Create project management tools; Write plugin code: set up the configuration file in the project management tool, read the test results from the aggregate report as data points, generate trend charts and save them as images; Run and debug the plug-in code, and package the plug-in code and store it in the preset directory.

9. The method according to claim 8, characterized in that Set up the configuration files in the project management tool, including: The optimal group analysis plug-in is an extension based on Jmeter, and configures two dependent Jmeter packages: ApacheJMeter_core and ApacheJMeter_java; Configure the JFreeChart library to generate curve charts and add JFreeChart dependencies.

10. The method according to claim 9, characterized in that Package the plugin code, including: Package the plug-in code into a jar package and place it in the ext directory of Jmeter.

11. The method according to claim 10, characterized in that Also includes: Restart Jmeter, load the jar package of the plug-in code in the ext directory, and display the newly added plug-in in the menu bar.

12. The method according to claim 8, characterized in that Read test results as data points from aggregate reports, including: After the mixed transaction test is completed, an aggregate report corresponding to each group of scenarios is obtained, wherein the aggregate report includes test results of various test indicators; Read test results in aggregate reports as data points for trend graphs.

13. The method according to claim 8, characterized in that Generate trend graphs and save them as images, including: Determine the test indicators as the X-axis and Y-axis of the trend chart, traverse the corresponding test indicator data in multiple groups of aggregation reports, and store them in the X table and Y table respectively; Generate a trend chart based on the X table and the Y table, and save the trend chart as a picture.

14. The method according to claim 13, characterized in that: Generate trend charts based on X-table and Y-table, including: Traverse the values ​​in the X table and the Y table and store them in the XYSeries object accordingly; Create a data set, add XYSeries objects to the XYSeriesCollection, and generate a trend chart.

15. A hybrid transaction testing device, characterized in that: include: The startup module is used to receive the mixed transaction test instruction, obtain the ratio of the number of concurrent users in each group of scenarios, and configure the number of concurrent users in each group of scenarios according to the gradient arithmetic difference; Start the mixed transaction test program, and gradually increase the pressure on each scenario according to the number of concurrent users configured for each scenario, until the test indicator parameters exceed the test exit criteria, and obtain the test results; A trend chart generating module, for generating a trend chart including the relationship between the test indicators using the test results in response to a click on the optimal group analysis plug-in; The optimal group determination module is used to obtain the inflection point in the trend graph, and if the inflection point satisfies the preset judgment condition, the scene corresponding to the inflection point is taken as the optimal group.

16. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.

17. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.