Test scenario parameter configuration method, apparatus and device

By automatically calculating the target value of transaction percentage, the business processing volume per second, and the number of virtual users, the interval time and test value are determined, which solves the problem of unreasonable parameter configuration in the non-functional testing of software systems in the financial industry and realizes fast and accurate test scenario configuration.

CN115357514BActive Publication Date: 2026-01-06CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211085713.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-06
Publication Date
2026-01-06
Estimated Expiration
2042-09-06

AI Technical Summary

Technical Problem

In the non-functional testing of software systems in the financial industry, the existing technologies have unreasonable test scenario parameter configurations, low accuracy, and cannot meet the testing requirements.

Method used

By determining the target value for transaction percentage, the target business volume per second, and the number of virtual users, the interval time and the test value for transaction percentage are calculated, and the final parameter configuration is determined under the preset conditions, reducing manual intervention.

Benefits of technology

It improves the rationality and accuracy of test scenario parameter configuration, ensuring that test tasks are completed quickly and accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115357514B_ABST
    Figure CN115357514B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, and device for configuring test scenario parameters, applied in the field of data processing. The method includes: determining a target transaction percentage, a target processing volume per second, and a first number of virtual users; determining a first interval time based on the target transaction percentage, the target processing volume per second, and the first number of virtual users; determining a test value for the transaction percentage based on the target processing volume per second, the first number of virtual users, and the first interval time; and, if the test value for the transaction percentage meets preset conditions, determining the first number of virtual users as the target number of virtual users and the first interval time as the target interval time. This eliminates the need for manual parameter configuration by testers, improving the rationality and accuracy of test scenario parameter configuration and ensuring that test tasks can be completed quickly and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus and device for configuring test scenario parameters. Background Technology

[0002] With the continuous development of technologies such as the Internet, various software systems have been widely used in the financial industry. When conducting non-functional testing on software systems in the banking and other financial sectors, it is usually necessary to configure specific test scenarios to simulate real production environments.

[0003] In related technologies, the parameters required for the test scenario are usually manually configured by testers based on practical experience. However, the parameter configuration is not reasonable enough, the accuracy is low, and it cannot meet the test requirements. Summary of the Invention

[0004] This application provides a method, apparatus, and device for configuring test scenario parameters, which improves the rationality and accuracy of test scenario parameter configuration and ensures that test tasks can be completed quickly and accurately.

[0005] In a first aspect, embodiments of this application provide a method for configuring test scenario parameters, including:

[0006] Determine the target value for transaction percentage, the target business volume per second, and the number of the first virtual users;

[0007] The first interval time is determined based on the target transaction percentage, the target business processing volume per second, and the number of the first virtual users;

[0008] The transaction percentage test value is determined based on the target transaction processing volume per second, the number of the first virtual users, and the first interval time.

[0009] If the transaction percentage test value meets the preset conditions, the first number of virtual users is determined as the target number of virtual users and the first interval time is determined as the target interval time.

[0010] In one possible implementation, determining the target value for the transaction percentage includes:

[0011] Obtain the daily transaction volume of the tested transaction and the total daily transaction volume in the production environment;

[0012] The target value for the percentage of transactions is determined based on the daily transaction volume and the total daily transaction volume.

[0013] In one possible implementation, determining the target throughput per second includes:

[0014] Obtain the daily transaction volume in the production environment;

[0015] The total processing time is determined according to the preset time ratio;

[0016] The target processing volume per second is determined based on the total daily transaction volume and the total processing time.

[0017] In one possible implementation, determining the first interval time includes:

[0018] Determine the product of the target transaction percentage and the target number of transactions per second;

[0019] The ratio of the number of the first virtual users to the product is determined as the first interval time.

[0020] In one possible implementation, the method further includes:

[0021] Determine the difference between the test value of the transaction percentage and the target value of the transaction percentage;

[0022] If the ratio of the difference to the target value of the transaction ratio is less than a preset threshold, the transaction ratio test value is determined to meet the preset condition.

[0023] In one possible implementation, the method further includes:

[0024] If the transaction percentage test value does not meet the preset conditions, the number of the first virtual users will be updated to the number of the second virtual users;

[0025] The second interval time is determined based on the target transaction percentage, the target business processing volume per second, and the number of the second virtual users;

[0026] The transaction percentage test value is updated based on the target transaction processing volume per second, the number of the second virtual users, and the second interval time.

[0027] If the updated transaction percentage test value meets the preset conditions, the second number of virtual users is determined as the target number of virtual users and the second interval time is determined as the target interval time.

[0028] Secondly, embodiments of this application provide a test scenario parameter configuration device, including:

[0029] The first determining module is used to determine the target value of transaction percentage, the target business processing volume per second, and the number of the first virtual users;

[0030] The second determining module is used to determine the first interval time based on the target value of the transaction proportion, the target business processing volume per second, and the number of the first virtual users;

[0031] The third determining module is used to determine the transaction percentage test value based on the target business processing volume per second, the number of the first virtual users, and the first interval time.

[0032] The fourth determining module is used to determine the first number of virtual users as the target number of virtual users and the first interval time as the target interval time when the transaction ratio test value meets the preset conditions.

[0033] In one possible implementation, the first determining module is specifically used for:

[0034] Obtain the daily transaction volume of the tested transaction and the total daily transaction volume in the production environment;

[0035] The target value for the percentage of transactions is determined based on the daily transaction volume and the total daily transaction volume.

[0036] In one possible implementation, the first determining module is specifically used for:

[0037] Obtain the daily transaction volume in the production environment;

[0038] The total processing time is determined according to the preset time ratio;

[0039] The target processing volume per second is determined based on the total daily transaction volume and the total processing time.

[0040] In one possible implementation, the third determining module is specifically used for:

[0041] Determine the product of the target transaction percentage and the target number of transactions per second;

[0042] The ratio of the number of the first virtual users to the product is determined as the first interval time.

[0043] In one possible implementation, the device is further used for:

[0044] Determine the difference between the test value of the transaction percentage and the target value of the transaction percentage;

[0045] If the ratio of the difference to the target value of the transaction ratio is less than a preset threshold, the transaction ratio test value is determined to meet the preset condition.

[0046] In one possible implementation, the device is further used for:

[0047] If the transaction percentage test value does not meet the preset conditions, the number of the first virtual users will be updated to the number of the second virtual users;

[0048] The second interval time is determined based on the target transaction percentage, the target business processing volume per second, and the number of the second virtual users;

[0049] The transaction percentage test value is updated based on the target transaction processing volume per second, the number of the second virtual users, and the second interval time.

[0050] If the updated transaction percentage test value meets the preset conditions, the second number of virtual users is determined as the target number of virtual users and the second interval time is determined as the target interval time.

[0051] Thirdly, embodiments of this application provide a device, including: a processor and a memory;

[0052] The memory stores computer-executed instructions;

[0053] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects.

[0054] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the method described in any of the first aspects.

[0055] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed, implements the method described in any of the first aspects.

[0056] The test scenario parameter configuration method, apparatus, and equipment provided in this application embodiment determine a target transaction percentage, a target processing volume per second, and the number of first virtual users; determine a first interval time based on the target transaction percentage, target processing volume per second, and the number of first virtual users; determine a test value for the transaction percentage based on the target processing volume per second, the number of first virtual users, and the first interval time; and, if the test value for the transaction percentage meets preset conditions, determine the number of first virtual users as the target number of virtual users and the first interval time as the target interval time. In this application embodiment, the test value for the transaction percentage is determined based on the target processing volume per second, the number of first virtual users, and the first interval time, and the final configuration parameters are determined by comparing the test value for the transaction percentage with preset conditions. This eliminates the need for manual parameter configuration by testers, improving the rationality and accuracy of test scenario parameter configuration and ensuring that test tasks can be completed quickly and accurately. Attached Figure Description

[0057] Figure 1 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;

[0058] Figure 2 A flowchart illustrating a test scenario parameter configuration method provided in an embodiment of this application;

[0059] Figure 3 A flowchart illustrating another test scenario parameter configuration method provided in this application embodiment;

[0060] Figure 4 A logical diagram illustrating a test scenario parameter configuration provided in an embodiment of this application;

[0061] Figure 5 This is a schematic diagram of the structure of a test scenario parameter configuration device provided in an embodiment of this application;

[0062] Figure 6 This is a schematic diagram of a test scenario parameter configuration device provided in an embodiment of this application. Detailed Implementation

[0063] To enable those skilled in the art to better understand the technical solutions of this application, the application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments and drawings described herein are merely for explaining this application and are not intended to limit this application. It should be emphasized that the collection, storage, use, processing, transmission, provision, and disclosure of information such as financial data or user data involved in the technical solutions of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0064] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 This includes terminal device 101 and user 102. Terminal device 101 can specifically refer to devices such as computers and smart mobile terminals.

[0065] In the banking and financial industries, due to the diverse types of business and the often high concurrency, testers typically need to perform various tests on software systems (applications) to ensure their security and reliability. Software testing can include functional testing and non-functional testing. Functional testing primarily ensures that the application's functions meet the requirements specifications, focusing on confirming whether the software system can operate normally and whether its functions can be implemented. Non-functional testing mainly examines the non-functional aspects of the application, such as performance, availability, and reliability. The focus is on testing the system's readiness based on non-functional parameters, and it can evaluate the application's performance under challenging conditions. Non-functional testing can specifically include performance testing, security testing, load testing, and stress testing.

[0066] When conducting non-functional testing, it is usually necessary to configure various test scenarios to simulate the actual production environment to ensure the validity of the non-functional test results. For example, non-functional testing can use mixed capacity scenarios, which refer to scenarios where the transactions under test can meet the transaction volume ratio of the software system in the production environment during the testing process.

[0067] In related technologies, existing non-functional testing solutions often explain the parameters of the test scenario from a theoretical perspective, which is difficult to understand and cannot be directly applied in non-functional testing, thus failing to effectively guide the actual testing process. Furthermore, in the non-functional testing of software systems in the banking and financial industries, multiple transactions are involved, each with a different proportion, requiring the configuration of parameters for each transaction. In actual testing, such as... Figure 1 As shown, user 102, i.e., the tester, typically configures the test scenario parameters manually on the terminal device 101 based on practical experience. This manual configuration method results in unreasonable parameter settings, low accuracy, and an inability to meet testing requirements.

[0068] In this embodiment, the terminal device can determine a target transaction percentage, a target processing volume per second, and the number of first virtual users; determine a first interval time based on the target transaction percentage, the target processing volume per second, and the number of first virtual users; determine a transaction percentage test value based on the target processing volume per second, the number of first virtual users, and the first interval time; and, if the transaction percentage test value meets preset conditions, determine the number of first virtual users as the target number of virtual users and the first interval time as the target interval time. In this embodiment, the terminal device determines the transaction percentage test value based on the target processing volume per second, the number of first virtual users, and the first interval time, and determines the final configuration parameters by comparing the transaction percentage test value with preset conditions. This eliminates the need for manual parameter configuration by testers, improving the rationality and accuracy of parameter configuration in the test scenario, making it simple and reliable, and ensuring that test tasks can be completed quickly and accurately.

[0069] The solution presented in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.

[0070] The following combination Figure 2 The illustrated example explains the process of configuring test scenario parameters.

[0071] Figure 2 This is a flowchart illustrating a test scenario parameter configuration method provided in an embodiment of this application. Please refer to... Figure 2 The method may include:

[0072] S201. Determine the target value for transaction percentage, the target business processing volume per second, and the number of first virtual users.

[0073] The execution subject of this application embodiment can be a terminal device, or a device, chip, or chip module in the terminal device.

[0074] The target percentage for the transaction can be calculated by referring to the transaction volume of the tested transaction in the production environment. Specifically, it can refer to the ratio of the tested transaction's transaction volume to the total transaction volume in the production environment over a certain period. This target percentage can be a percentage value.

[0075] The target Transaction Per Second (TPS) refers to the number of transactions or business transactions that a software system can process per second, measured in transactions per second. This target TPS can be calculated based on the existing business volume of the software system under test.

[0076] The first number of virtual users can refer to the number of virtual users (Vu) configured in the test scenario. These virtual users can simulate real users in the test scenario and can be used to increase the user load of the software system under test. Specifically, the terminal device can configure the first number of virtual users based on the target transaction percentage; the higher the target transaction percentage, the more first virtual users can be configured. However, it should be noted that since the number of Vu supported by the stress tester is limited, the sum of the Vu counts (first number of virtual users) for each test transaction must not exceed the maximum number of users supported by the stress tester to avoid overloading the stress tester and ensure the normal implementation of the test process. In the embodiments of this application, the stress tester can refer to the terminal device used for actual testing.

[0077] S202. Determine the first interval time based on the target value of transaction proportion, the target business processing volume per second, and the number of the first virtual users.

[0078] In this embodiment, the first pacing time can refer to the time interval between two transaction requests, that is, the time interval between the sending time of the first transaction request and the sending time of the second transaction request. The first pacing time may include the sending time of the transaction requests and a pause time, where the pause time can refer to the time between the end time of the first transaction request and the sending time of the second transaction request. The unit of the pacing time can be milliseconds (ms). After determining the target transaction percentage, target TPS, and the first Vu number, the terminal device can determine the first pacing time based on these parameters and a preset calculation rule.

[0079] S203. Determine the transaction percentage test value based on the target business processing volume per second, the number of first virtual users, and the first interval time.

[0080] In this embodiment, the transaction percentage test value can refer to the transaction percentage determined during non-functional testing, i.e., the test value of the transaction percentage during actual testing. Specifically, the terminal device can input the target TPS, the first Vu count, and the first interval time into the non-functional test model or test platform. After a preset period of test operation, the terminal device can receive the transaction percentage test value output by the non-functional test model or test platform. Subsequently, the accuracy of the parameter configuration of the first Vu count and the first interval time can be determined by comparing the transaction percentage test value with the target transaction percentage value.

[0081] S204. If the transaction percentage test value meets the preset conditions, the number of first virtual users is determined as the target number of virtual users and the first interval time is determined as the target interval time.

[0082] In this embodiment, the target number of virtual users and the target interval time can refer to the parameters required to construct the test scenario during non-functional testing. The preset condition can refer to whether the difference or ratio between the transaction percentage test value and the transaction percentage target value meets a pre-set threshold condition. For example, the preset condition could be that the ratio of the difference between the transaction percentage test value and the transaction percentage target value to the transaction percentage target value is less than 5%, etc. The specific setting can be based on actual needs, and this embodiment does not limit the specific form or value of the preset condition.

[0083] In this step, when the transaction percentage test value meets the preset conditions, the terminal device can determine that the current transaction percentage test value is close to the target transaction percentage value. The parameter values ​​at this point can be used as the target parameter configuration for the test scenario; that is, the first Vu count can be directly used as the target Vu count, and the first interval time can be directly used as the target interval time. When the transaction percentage test value does not meet the preset conditions, the terminal device can reset the Vu count and calculate the interval time, re-determine the transaction percentage test value, and make a judgment until the transaction percentage test value meets the preset conditions, thus determining the final target parameter configuration for the test environment. This improves the rationality and accuracy of the parameter configuration.

[0084] The test scenario parameter configuration method provided in this application embodiment determines a target transaction percentage, a target processing volume per second, and the number of first virtual users; determines a first interval time based on the target transaction percentage, target processing volume per second, and the number of first virtual users; determines a test value for the transaction percentage based on the target processing volume per second, the number of first virtual users, and the first interval time; and, if the test value for the transaction percentage meets preset conditions, determines the number of first virtual users as the target number of virtual users and the first interval time as the target interval time. In this embodiment, the terminal device determines the test value for the transaction percentage based on the target processing volume per second, the number of first virtual users, and the first interval time, and determines the final configuration parameters by comparing the test value for the transaction percentage with preset conditions. This eliminates the need for manual parameter configuration by testers, improving the rationality and accuracy of test scenario parameter configuration and ensuring that test tasks can be completed quickly and accurately.

[0085] Based on the above embodiments, the following is combined with Figure 3 The illustrated embodiment provides a detailed explanation of the process for configuring test scenario parameters.

[0086] Figure 3 This is a flowchart illustrating another test scenario parameter configuration method provided in an embodiment of this application. Please refer to... Figure 3 The method may include:

[0087] S301. Obtain the daily transaction volume of the tested transaction and the total daily transaction volume in the production environment; determine the target value of the transaction percentage based on the daily transaction volume and the total daily transaction volume.

[0088] In this embodiment, daily transaction volume can refer to the actual number of transactions conducted on the day being tested. Daily total transaction volume can refer to the actual number of transactions conducted daily for all transactions in the production environment. It should be noted that daily transaction volume or total transaction volume here can refer to data from one day (24 hours), aggregated data from multiple days, or an average of multiple days, etc. The specific values ​​can be flexibly set based on actual needs, and this embodiment does not impose any limitations on this.

[0089] After determining the daily transaction volume of the tested transaction and the total daily transaction volume in the production environment, the terminal device can calculate the ratio of the daily transaction volume to the total daily transaction volume and set this ratio as the target transaction percentage. For example, if the total daily transaction volume in the production environment is 1 million and the daily transaction volume of the tested transaction A is 150,000, then the target transaction percentage for the tested transaction A is 150,000 / 1 million = 15%.

[0090] S302. Obtain the total daily transaction volume in the production environment; determine the total business processing time according to the preset time ratio; determine the target business processing volume per second based on the total daily transaction volume and the total business processing time.

[0091] In this embodiment, the preset time ratio can refer to a pre-set business processing allocation ratio. For example, the preset time ratio can be the 80 / 20 rule or the 70 / 30 rule, where the 80 / 20 rule means that 80% of the business volume is completed in 20% of the time; the 70 / 30 rule means that 70% of the business volume is completed in 30% of the time. The total business processing time can refer to the time required for business processing determined based on the preset time ratio.

[0092] After determining the total daily transaction volume and total processing time, the terminal device can calculate the ratio between the total daily transaction volume and the total processing time, and set this ratio as the target processing volume per second (TPS). For example, assuming the total daily transaction volume is 1 million and the preset time ratio is the 80 / 20 rule, the total processing time can be: (24 * 20% * 3600) / 80% = 21600 seconds; the target processing volume per second, or target TPS, can be calculated as follows: Target TPS = 1 million * 80% / (24 * 20% * 3600) = 1 million / 21600 = 47 transactions / second.

[0093] Of course, depending on actual needs, the target value of transaction percentage and target TPS can also be determined using other calculation methods, and this application embodiment does not limit them in this regard.

[0094] S303. Determine the number of the first virtual users.

[0095] In this embodiment, the number of first virtual users can be flexibly configured according to the target value of the transaction proportion of the tested transaction. The higher the target value of the transaction proportion, the more first virtual users can be. However, the number of first virtual users cannot exceed the maximum number of users that the pressure machine can support, in order to avoid overloading the pressure machine.

[0096] S304. Determine the product of the target transaction percentage and the target business processing volume per second; determine the ratio of the first number of virtual users to the product as the first interval time.

[0097] In this embodiment, the first interval time can be determined using a preset calculation rule. This preset calculation rule can be: First interval time = 1000 * Number of first virtual users / (Target TPS * Target transaction percentage). That is, first, the product of the target transaction percentage and the target TPS is calculated, then the ratio of the number of first virtual users to this product is calculated. Since the target TPS is measured in transactions per second and the first interval time is measured in milliseconds, this ratio can be multiplied by 1000 to obtain the first interval time.

[0098] Of course, based on actual needs, the first interval time can also be determined by other preset calculation rules, and this application embodiment does not limit this.

[0099] S305. Determine the difference between the transaction percentage test value and the transaction percentage target value; if the ratio of the difference to the transaction percentage target value is less than a preset threshold, determine that the transaction percentage test value meets the preset conditions.

[0100] In this embodiment, the preset threshold can refer to the critical value of the ratio of the difference between the transaction ratio test value and the transaction ratio target value to the transaction ratio target value. The specific value of this preset threshold can be 5% or 3%, etc. It should be noted that since the difference between the transaction ratio test value and the transaction ratio target value may be negative, the difference here can refer to the absolute value of the difference. The terminal device can then compare the absolute value of this difference with the preset threshold to ensure the accuracy of the judgment.

[0101] Specifically, when the difference between the transaction percentage test value and the transaction percentage target value is less than a preset threshold, the terminal device can determine that the transaction percentage test value meets the preset conditions. When the difference between the transaction percentage test value and the transaction percentage target value is not less than, equal to, or greater than the preset threshold, the terminal device can determine that the transaction percentage test value does not meet the preset conditions.

[0102] S306. If the transaction percentage test value meets the preset conditions, the number of first virtual users is determined as the target number of virtual users and the first interval time is determined as the target interval time.

[0103] In this embodiment of the application, when the transaction ratio test value meets the preset conditions, the parameters at this time meet the requirements of the test scenario, and the terminal device can use the first Vu number as the target number of virtual users and determine the first interval time as the target interval time.

[0104] S307. If the transaction percentage test value does not meet the preset conditions, update the number of the first virtual users to the number of the second virtual users.

[0105] In this embodiment of the application, when the transaction ratio test value differs significantly from the transaction ratio target value, the terminal device can determine that the parameters at this time do not meet the requirements of the test scenario, and the terminal device can reconfigure the number of the first virtual users, that is, update the number of the first virtual users to the number of the second virtual users.

[0106] S308. Determine the second interval time based on the target transaction percentage, the target transaction volume per second, and the number of second virtual users; update the transaction percentage test value based on the target transaction volume per second, the number of second virtual users, and the second interval time.

[0107] In this embodiment, after determining the number of second virtual users, the terminal device can determine the second interval time based on the target transaction percentage, the target TPS, and the number of second virtual users. The specific determination process can be the same as the determination process of the first interval time, and will not be repeated here. Then, the terminal device can input the target TPS, the number of second virtual users, and the second interval time into a non-functional test model or test platform to obtain a new transaction percentage test value, i.e., the updated transaction percentage test value.

[0108] S309. If the updated transaction percentage test value meets the preset conditions, the number of second virtual users is determined as the target number of virtual users and the second interval time is determined as the target interval time.

[0109] In this embodiment, when the updated transaction percentage test value meets the preset conditions, the terminal device can determine the second number of virtual users as the target number of virtual users and the second interval time as the target interval time. When the updated transaction percentage test value does not meet the preset conditions, the terminal device can execute steps S307 to S308 again until the transaction percentage test value meets the preset conditions. This improves the rationality and accuracy of parameter configuration.

[0110] For example, Table 1 shows specific examples of test scenario parameter configurations in embodiments of this application.

[0111] Table 1

[0112]

[0113] As shown in Table 1, the first interval time can be calculated based on the target total TPS, the target value of the transaction percentage, and the number of the first virtual users. The average response time refers to the response time of the software system under test to transaction requests and can be used to characterize the response speed of the software system under test.

[0114] For example, Figure 4 A logical diagram illustrating a test scenario parameter configuration according to an embodiment of this application is shown. For example... Figure 4 As shown, the terminal device can first determine the target transaction percentage and the target throughput (TPS). Then, the terminal device can configure the number of first virtual users, ensuring that this number does not exceed the maximum number of users the load generator can handle. Based on the target transaction percentage, target TPS, and number of first virtual users, the terminal device calculates the first interval. Next, the terminal device can perform non-functional tests, such as mixed-capacity scenario testing, based on the target TPS, number of first virtual users, and first interval, to obtain the transaction percentage test value. The terminal device can then determine whether the transaction percentage test value meets preset conditions, i.e., whether it is close to the target transaction percentage. If so, the number of first virtual users is set as the target number, and the first interval is set as the target interval. If not, the configuration steps for the number of first virtual users are returned, the number of first virtual users is reconfigured, and the subsequent process is executed until the transaction percentage test value meets the preset conditions.

[0115] Thus, the embodiments of this application can quickly and easily configure parameters for test scenarios, offering strong operability and direct guidance for actual testing processes. Testers unfamiliar with the fundamental principles of non-functional mixed testing scenarios can also use the methods of these embodiments to quickly complete testing tasks. Furthermore, the process of judging whether the transaction percentage test value is close to the target value in these embodiments continuously optimizes the test results, ensuring the rationality and accuracy of parameter configuration. This convenient and reliable approach allows for the rapid and precise completion of non-functional testing tasks.

[0116] Figure 5 This is a schematic diagram of a test scenario parameter configuration device provided in an embodiment of this application. Please refer to... Figure 5 The test scenario parameter configuration device 10 may include:

[0117] The first determining module 11 is used to determine the target value of the transaction ratio, the target business processing volume per second, and the number of the first virtual users;

[0118] The second determining module 12 is used to determine the first interval time based on the target value of transaction proportion, the target business processing volume per second, and the number of first virtual users;

[0119] The third determining module 13 is used to determine the transaction percentage test value based on the target business processing volume per second, the number of first virtual users, and the first interval time.

[0120] The fourth determining module 14 is used to determine the first number of virtual users as the target number of virtual users and the first interval time as the target interval time when the transaction ratio test value meets the preset conditions.

[0121] In one possible implementation, the first determining module 11 is specifically used for:

[0122] Obtain the daily transaction volume of the tested transaction and the total daily transaction volume in the production environment;

[0123] The target value for the percentage of transactions is determined based on the daily transaction volume and the total daily transaction volume.

[0124] In one possible implementation, the first determining module 11 is specifically used for:

[0125] Obtain the daily transaction volume in the production environment;

[0126] The total processing time is determined according to the preset time ratio;

[0127] The target processing capacity per second is determined based on the total daily transaction volume and the total processing time.

[0128] In one possible implementation, the third determining module 13 is specifically used for:

[0129] Determine the product of the target transaction percentage and the target processing volume per second;

[0130] The ratio of the number of the first virtual users to the product is determined as the first interval time.

[0131] In one possible implementation, the device 10 is further configured to:

[0132] Determine the difference between the test value and the target value for the transaction percentage;

[0133] If the ratio of the difference to the target value of the transaction ratio is less than a preset threshold, the test value of the transaction ratio is determined to meet the preset conditions.

[0134] In one possible implementation, the device 10 is further configured to:

[0135] If the transaction percentage test value does not meet the preset conditions, the number of first virtual users will be updated to the number of second virtual users;

[0136] The second interval time is determined based on the target value of transaction percentage, the target business processing volume per second, and the number of second virtual users;

[0137] Update the transaction percentage test value based on the target transaction volume per second, the number of second virtual users, and the second interval time.

[0138] If the updated transaction percentage test value meets the preset conditions, the number of second virtual users is determined as the target number of virtual users and the second interval time is determined as the target interval time.

[0139] The test scenario parameter configuration device 10 provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here. The test scenario parameter configuration device 10 can specifically be a chip, chip module, etc., and this application embodiment does not limit it.

[0140] Figure 6 This is a schematic diagram of a test scenario parameter configuration device provided in an embodiment of this application. Please refer to... Figure 6 The test scenario parameter configuration device 20 may include a memory 21 and a processor 22. For example, the memory 21 and the processor 22 are interconnected via a bus 23.

[0141] Memory 21 is used to store program instructions;

[0142] The processor 22 is used to execute the program instructions stored in the memory to implement the test scenario parameter configuration method shown in the above embodiment.

[0143] Figure 6 The test scenario parameter configuration device shown in the embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be repeated here.

[0144] This application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-described test scenario parameter configuration method when executed by a processor.

[0145] This application embodiment may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the above-described test scenario parameter configuration method.

[0146] This application provides a chip that stores a computer program. When the computer program is executed by the chip, it implements the above-mentioned test scenario parameter configuration method.

[0147] This application provides a chip module that stores a computer program. When the computer program is executed by the chip module, the above-mentioned test scenario parameter configuration method is implemented.

[0148] It should be noted that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0149] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM). It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated into the processor. It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0150] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0151] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0152] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0153] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0154] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. Each device and product can be applied to or integrated into a chip, chip module, or terminal device. For example, for devices and products applied to or integrated into a chip, each included module / chip can be implemented entirely using hardware methods such as circuits, or at least some modules / units can be implemented using software programs running on a processor integrated within the chip, while the remaining modules / units can be implemented using hardware methods such as circuits.

[0155] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0156] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method of testing a configuration of a scene parameter, characterized by, The method comprises the following steps: determining a transaction proportion target value, a target business processing amount per second, and a first number of virtual users; determining a first interval time according to the transaction proportion target value, the target business processing amount per second, and the first number of virtual users; determining a transaction proportion test value according to the target business processing amount per second, the first number of virtual users, and the first interval time; in a case where the transaction proportion test value meets a preset condition, determining the first number of virtual users as a target number of virtual users and determining the first interval time as a target interval time; the determining of the transaction proportion target value comprises the following steps: obtaining a daily transaction volume of a transaction to be tested and a daily total transaction volume of a production environment; determining the transaction proportion target value according to the daily transaction volume and the daily total transaction volume; the determining of the target business processing amount per second comprises the following steps: obtaining a daily total transaction volume of a production environment; determining a total business processing time according to a preset time ratio; determining the target business processing amount per second according to the daily total transaction volume and the total business processing time; the determining of the first interval time comprises the following steps: determining a product of the transaction proportion target value and the target business processing amount per second; determining a ratio of the first number of virtual users to the product as the first interval time.

2. The method of claim 1, wherein, The method further comprises the following steps: determining a difference between the transaction proportion test value and the transaction proportion target value; in a case where a ratio of the difference to the transaction proportion target value is less than a preset threshold, determining that the transaction proportion test value meets the preset condition.

3. The method of claim 1, wherein, The method further comprises the following steps: in a case where the transaction proportion test value does not meet the preset condition, updating the first number of virtual users to a second number of virtual users; determining a second interval time according to the transaction proportion target value, the target business processing amount per second, and the second number of virtual users; updating the transaction proportion test value according to the target business processing amount per second, the second number of virtual users, and the second interval time; in a case where an updated transaction proportion test value meets the preset condition, determining the second number of virtual users as a target number of virtual users and determining the second interval time as a target interval time.

4. A test scenario parameter configuration apparatus characterized by comprising: The method comprises the following steps: a first determining module configured to determine a transaction proportion target value, a target business processing amount per second, and a first number of virtual users; a second determining module configured to determine a first interval time according to the transaction proportion target value, the target business processing amount per second, and the first number of virtual users; a third determining module configured to determine a transaction proportion test value according to the target business processing amount per second, the first number of virtual users, and the first interval time; a fourth determining module configured to, in a case where the transaction proportion test value meets a preset condition, determine the first number of virtual users as a target number of virtual users and determine the first interval time as a target interval time; The first determining module is specifically configured to acquire a daily transaction volume of the to-be-tested transaction and a daily total transaction volume of the production environment, determine the transaction proportion target value according to the daily transaction volume and the daily total transaction volume, and acquire the daily total transaction volume of the production environment; determine the total business processing time according to the preset time proportion, and determine the target business processing volume per second according to the daily total transaction volume and the total business processing time; The second determining module is specifically configured to determine a product of the transaction proportion target value and the target business processing volume per second, and determine the first interval time according to a ratio of the first virtual user number to the product.

5. A test scenario parameter configuration device, characterized by, Comprise: A processor, a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to realize the method in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the computer execution instructions are executed, the computer execution instructions are used to realize the method in any one of claims 1 to 3.

7. A computer program product, characterised in that, A computer program is executed to realize the method in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Transaction scene test method and device, electronic equipment and readable storage medium

    CN110377520A

  • Information processing method, device and equipment and medium

    CN111340621A