Database extreme test case generation method, database extreme test method

By obtaining database trigger scenarios and operation dimension information, combining the main test cases and the slave test cases to generate database limit test cases to form a test case matrix, solving the problem of difficulty in taking into account test coverage and cost in the existing technology, and achieving efficient database limit tests.

CN119166537BActive Publication Date: 2025-04-04SUZHOU JIBEISI DATA TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411641553.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-04
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The prior art is difficult to take into account both test coverage and test costs in database limit testing, and cannot effectively ensure test coverage, especially when database metrics or processing capabilities change.

Method used

By obtaining the trigger scenarios that trigger the performance problems of the database, determining the database operation dimension information that matches the trigger scenario, and combining the main test cases and the slave test cases to generate the database limit test cases to form a test case matrix for storage and presentation.

Benefits of technology

It realizes the effective guarantee of test coverage in database limit testing, while reducing the number of test cases and construction costs, and simplifies the adjustment process after the test indicator changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166537B_ABST
    Figure CN119166537B_ABST
Patent Text Reader

Abstract

The present invention provides a database extreme test case generation method and a database extreme test method, which can be applied to the database technology field. The database extreme test case generation method includes: obtaining a triggering scenario that triggers a performance problem of a database to be tested; determining multiple groups of database operation dimension information matching the triggering scenario, the database operation dimension information corresponds to the database operation dimension, and each group of database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension; combining multiple main test cases based on the first operation dimension and multiple slave test cases based on the second operation dimension to obtain multiple database extreme test cases; generating a test case matrix according to the multiple database extreme test cases of each of the multiple triggering scenarios, and the test case matrix is ​​used to store the database extreme test case for each triggering scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and more specifically to a database extreme test case generation method and a database extreme test method. Background Art

[0002] Database extreme testing is an important means of evaluating the performance and stability of a database under extreme conditions. However, in the actual testing process, multiple operation commands or test factors need to be combined to meet the extreme testing requirements, and test cases are diverse and not unique.

[0003] Since the test cases in the database extreme test scenario are diverse and non-unique, if the test cases are generated by random combination, it is impossible to determine whether the generated test cases can cover the database extreme scenario. It may happen that the generated test cases cannot trigger the database extreme scenario at all. If the test cases are generated by completely orthogonal combination, the testing workload will be greatly increased.

[0004] In addition, if certain indicators or processing capabilities in the database change, it is impossible to accurately determine which use cases are affected based on the existing test cases, which in turn affects the precise determination of test coverage.

[0005] In summary, the method of generating test cases for database extreme test scenarios in related technologies is difficult to balance test coverage and test cost, and it is also difficult to effectively ensure test coverage in a simple and fast way for changes in test indicators. Summary of the invention

[0006] In view of the above problems, the present invention provides a database limit test case generation method and a database limit test method.

[0007] According to a first aspect of the present invention, a method for generating database extreme test cases is provided, comprising: obtaining a trigger scenario that triggers a performance problem in a database to be tested, wherein the trigger scenario includes a database hardware trigger scenario or a database software trigger scenario; determining multiple groups of database operation dimension information that match the trigger scenario, wherein the database operation dimension information corresponds to a database operation dimension, and each group of database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension; combining multiple main test cases composed of the first operation dimension and multiple slave test cases composed of the second operation dimension to obtain multiple database extreme test cases; and generating a test case matrix according to the multiple database extreme test cases of each of the multiple trigger scenarios, wherein the test case matrix is ​​used to store the database extreme test case for each trigger scenario.

[0008] According to an embodiment of the present invention, the first operation dimension includes database configuration and data model, and the second operation dimension includes database operation, execution method and external operation; a plurality of main test cases composed based on the first operation dimension and a plurality of subordinate test cases composed based on the second operation dimension are combined to obtain a plurality of database extreme test cases, including: for the first operation dimension, orthogonally combining each operation parameter corresponding to the database configuration and at least one operation parameter corresponding to the data model to obtain M main test cases, where M is a positive integer greater than 1; for the second operation dimension, orthogonally combining each operation parameter corresponding to the database operation, at least one operation parameter corresponding to the execution method, and at least one operation parameter corresponding to the external operation to obtain N subordinate test cases, where N is a positive integer greater than 1; and according to the quantitative relationship between the main test cases and the subordinate test cases, combining the M main test cases and the N subordinate test cases into a plurality of database extreme test cases.

[0009] According to an embodiment of the present invention, based on the quantitative relationship between the main test cases and the slave test cases, M main test cases and N slave test cases are combined into multiple database extreme test cases, including: when the number of main test cases is greater than or equal to the number of slave test cases, N slave test cases are randomly distributed among the M main test cases to obtain M database extreme test cases.

[0010] According to an embodiment of the present invention, the method also includes: when the number of use cases of the main test case is less than or equal to the number of use cases of the slave test case, randomly selecting (NM) main test cases from the M main test cases for copying to obtain (NM) copy test cases; and randomly distributing the M main test cases and the (NM) copy test cases among the N slave test cases to obtain N database limit test cases.

[0011] According to an embodiment of the present invention, a test case matrix is ​​generated according to multiple database extreme test cases of each of the multiple trigger scenarios, including: generating a test case matrix according to the multiple database extreme test cases of each of the multiple trigger scenarios according to the trigger scenarios, database operation dimensions and use case identifiers; wherein the database hardware trigger scenario includes at least one of the following: memory, connection pool, thread pool; the database software trigger scenario includes at least one of the following: lock, distributed database management component.

[0012] According to an embodiment of the present invention, the method also includes: when it is determined that there are similar or repeated database limit test cases between multiple database limit test cases for the first trigger scenario and multiple database limit test cases for the second trigger scenario, the similar or repeated database limit test cases are used as multi-scenario test cases so as to synchronously complete the database limit tests for the first trigger scenario and the second trigger scenario when executing the multi-scenario test cases.

[0013] According to an embodiment of the present invention, the method also includes: in response to detecting a change in a target operating parameter or a target database operating dimension under a target trigger scenario, determining at least one database limit test case to be adjusted from a test case matrix; and adjusting at least one database limit test case to be adjusted using the target operating parameter or the target database operation dimension to obtain at least one adjusted database limit test case.

[0014] A second aspect of the present invention provides a database limit testing method, comprising: in response to detecting a test request for a target trigger scenario, a target operating parameter or a target database operation dimension, obtaining at least one database limit test case related to the target trigger scenario, the target operating parameter or the target database operation dimension from a test case matrix; wherein the test case matrix is ​​generated based on a database limit test case generation method; and executing at least one database limit test case in the database to be tested in sequence to generate at least one database limit test result.

[0015] The third aspect of the present invention provides a database extreme test case generation device, including: an acquisition module, used to obtain a trigger scenario that triggers the performance problem of the database to be tested, wherein the trigger scenario includes a database hardware trigger scenario or a database software trigger scenario. A dimension determination module, used to determine multiple groups of database operation dimension information matching the trigger scenario, wherein the database operation dimension information corresponds to the database operation dimension, and each group of database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension. A case combination module, used to combine multiple main test cases composed of the first operation dimension and multiple slave test cases composed of the second operation dimension to obtain multiple database extreme test cases. A matrix generation module, used to generate a test case matrix according to multiple database extreme test cases of each of the multiple trigger scenarios, wherein the test case matrix is ​​used to store database extreme test cases for each trigger scenario.

[0016] The fourth aspect of the present invention provides a database limit testing device, including: a trigger module, used to respond to detecting a test request for a target trigger scenario, target operation parameter or target database operation dimension, and obtain at least one database limit test case related to the target trigger scenario, target operation parameter or target database operation dimension from a test case matrix; wherein the test case matrix is ​​generated based on a database limit test case generation method; a test module, used to execute at least one database limit test case in the database to be tested in sequence to generate at least one database limit test result.

[0017] The fifth aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, which, when the one or more processors execute the one or more computer programs, implements the steps of the above-mentioned database limit test case generation method or database limit testing method.

[0018] The sixth aspect of the present invention also provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the steps of the above-mentioned database limit test case generation method or database limit test method are implemented.

[0019] The seventh aspect of the present invention also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of the above-mentioned database limit test case generation method or database limit testing method.

[0020] The embodiment of the present invention can ensure the diversity of test cases within the data class and the operation class by internally combining the first operation dimension to obtain multiple main test cases and internally combining the second operation dimension to obtain multiple sub-test cases. Then, the main test cases and sub-test cases are combined again, which can not only ensure the diversity of test cases in the combination of the two dimensions of data class and operation class, but also exponentially reduce the random combination amount of data dimensions, and can also well cover the database extreme test scenarios, while reducing the number and construction cost of database extreme test cases. Therefore, the embodiment of the present invention can effectively ensure test coverage, while the test design process is clearly hierarchical, and the number and construction cost of database extreme test cases are low. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0022] Figure 1 The application scenario of the database limit test case generation method or the database limit test method according to the embodiment of the present invention is shown.

[0023] Figure 2 A flow chart of a method for generating database extreme test cases according to an embodiment of the present invention is shown.

[0024] Figure 3 A flow chart of a use case combination method according to an embodiment of the present invention is shown.

[0025] Figure 4 A structural block diagram of a database extreme test case generation device according to an embodiment of the present invention is shown.

[0026] Figure 5 A block diagram of an electronic device suitable for a database limit test case generation method and a database limit test method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0027] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0031] In order to at least partially solve the technical problem that it is difficult to strike a balance between test coverage and test cost in the way of generating test cases for database extreme testing scenarios, the present invention aims to provide a database extreme test case generation method or database extreme testing, which can effectively ensure test coverage, while the test design process has a clear hierarchy and can perform good forward and reverse tracking of test cases, and the generation and testing costs are low.

[0032] An embodiment of the present invention provides a method for generating database extreme test cases, including: obtaining a trigger scenario that triggers a performance problem in a database to be tested, wherein the trigger scenario includes a database hardware trigger scenario or a database software trigger scenario; determining multiple groups of database operation dimension information matching the trigger scenario, wherein the database operation dimension information corresponds to a database operation dimension, and each group of database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension; combining multiple main test cases based on the first operation dimension and multiple slave test cases based on the second operation dimension to obtain multiple database extreme test cases; and generating a test case matrix according to the multiple database extreme test cases of each of the multiple trigger scenarios, wherein the test case matrix is ​​used to store the database extreme test case for each trigger scenario.

[0033] Figure 1 The application scenario of the database limit test case generation method or the database limit test method according to the embodiment of the present invention is shown.

[0034] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0035] The user may use at least one of the first terminal device 101 , the second terminal device 102 , and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc.

[0036] For example, the user can send a use case generation request to the server 105 to trigger database limit test case generation through interactive operations with the first terminal device 101, the second terminal device 102, and the third terminal device 103; or, send a test request to the server 105 to trigger database limit testing.

[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0039] It should be noted that the database limit test case generation method or database limit test method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the database limit test case generation device or database limit test device provided in the embodiment of the present invention can generally be set in the server 105. The database limit test case generation method or database limit test method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the database limit test case generation device or database limit test device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only . According to the implementation requirements, there can be any number of terminal devices, networks and servers.

[0041] Figure 2 A flow chart of a method for generating database extreme test cases according to an embodiment of the present invention is shown.

[0042] like Figure 2 As shown, the method 200 includes operations S210 to S240.

[0043] In operation S210, a triggering scenario that triggers a performance problem in the database to be tested is obtained, where the triggering scenario includes a database hardware triggering scenario or a database software triggering scenario.

[0044] In operation S220, multiple groups of database operation dimension information matching the triggering scenario are determined, wherein the database operation dimension information corresponds to a database operation dimension, each group of database operation dimension information includes at least one operation parameter; and the database operation dimension includes a first operation dimension and a second operation dimension.

[0045] In operation S230, a plurality of main test cases based on the first operation dimension and a plurality of sub-test cases based on the second operation dimension are combined to obtain a plurality of database extreme test cases.

[0046] In operation S240 , a test case matrix is ​​generated according to the multiple database extreme test cases of the multiple trigger scenarios, wherein the test case matrix is ​​used to store the database extreme test case for each trigger scenario.

[0047] According to an embodiment of the present invention, the triggering scenario may be a scenario that triggers the database limit obtained by analyzing the type and version of the database in advance. The triggering scenario includes a database hardware triggering scenario or a database software triggering scenario.

[0048] For example, database hardware trigger scenarios may include memory, connection pool, thread pool, etc., while database software trigger scenarios are items related to database performance, such as locks, distributed database management components, etc. Among them, locks may include locks used to implement multiple operations, and distributed database management components may be components related to database performance.

[0049] According to an embodiment of the present invention, a plurality of unified database operation dimensions can be divided for a plurality of triggering scenarios according to the database architecture and various processing capabilities of the database. For each database operation dimension of each triggering scenario, the corresponding database operation dimension information is different. Within each database operation dimension information, there can be at least one operation parameter, which can also be understood as a use case selection parameter.

[0050] For example, the triggering scenarios are memory and connection pool, and the database operation dimension is database configuration. For database configuration, the database operation dimension information of memory can be: increase the number of shards, increase the number of nodes of cluster coordinator (coordinator) and data (data); the database operation dimension information of connection pool can be: increase the number of shards, increase the number of nodes of cluster coordinator (coordinator) and data (data), and set cluster (Gcluster) configuration parameters. It can be seen that the database operation dimension information of memory and connection pool has the same operation parameters and different operation parameters.

[0051] According to an embodiment of the present invention, multiple operation parameters of multiple database operation dimensions in a pre-constructed database extreme test scenario may be obtained through operations S210 and S220.

[0052] However, since the database extreme scenario is a special test scenario, in this test scenario, a variety of database extreme scenarios can be combined using various combinations. For example, a database extreme scenario can be triggered using operating parameters A, B, and C, and the database extreme scenario can also be triggered using operating parameters A and B. Therefore, A+B+C and A+B are repeated database extreme test cases. However, if the database architecture and various processing capabilities are not carefully analyzed in advance, it is difficult to determine in advance whether A+B+C and A+B are repeated database extreme test cases. In addition, if there is no database extreme test case involving C, it is difficult to ensure the coverage of the database extreme test scenario.

[0053] Therefore, the embodiment of the present invention divides the database operation dimension into two categories, namely the first operation dimension and the second operation dimension. The database operation dimension can be divided into two benchmarks, the first operation dimension of the data category and the second operation dimension of the operation category. The first operation dimension of the data category refers to the database limit test scenario being triggered due to the amount of data or database configuration parameters, and the second operation dimension of the operation category refers to the database limit test scenario being triggered due to certain operations and execution logic executed in the database. For example, the database is stuck due to too much data, or the database is stuck due to frequent operations.

[0054] For operation S230, by pre-dividing the database operation dimension into a data class and an operation class, when generating database extreme test cases, multiple main test cases can be first formed in the data class, and multiple sub test cases can be formed in the operation class.

[0055] According to an embodiment of the present invention, in order to cover the database extreme test scenarios well from both the data class and operation class perspectives, when generating database extreme test cases, the main test cases and the slave test cases are combined according to certain combination standards, so that the combined database extreme test cases can cover a variety of database extreme test scenarios.

[0056] According to an embodiment of the present invention, after multiple database extreme test cases for each trigger scenario are determined through operation S220 and operation S230, in order to facilitate the adjustment of the database extreme test cases when subsequent indicators and capabilities change, a test case matrix can be generated according to the multiple database extreme test cases of each of the multiple trigger scenarios.

[0057] The test case matrix includes trigger scenarios, database operation dimensions, operation parameters, and case identification. The test case matrix can be displayed to testers, so that in the scenario where the test indicators change, testers can simply, quickly, and intuitively locate the database extreme test cases affected by the changed test indicators to effectively ensure test coverage.

[0058] The embodiment of the present invention can ensure the diversity of test cases within the data class and the operation class by internally combining the first operation dimension to obtain multiple main test cases and internally combining the second operation dimension to obtain multiple sub-test cases. Then, the main test cases and sub-test cases are combined again, which can not only ensure the diversity of test cases in the combination of the two dimensions of data class and operation class, but also exponentially reduce the random combination amount of data dimensions, and can also well cover the database extreme test scenarios, while reducing the number and construction cost of database extreme test cases. Therefore, the embodiment of the present invention can effectively ensure test coverage, while the test design process is clearly hierarchical, and the number and construction cost of database extreme test cases are low.

[0059] According to an embodiment of the present invention, the first operation dimension includes database configuration and data model, and the second operation dimension includes database operations, execution methods, and external operations;

[0060] Figure 3 A flow chart of a use case combination method according to an embodiment of the present invention is shown.

[0061] like Figure 3 As shown, the use case combination method 300 includes operations S331 to S333. Operations S331 to S333 can be used as a specific embodiment of operation S230.

[0062] In operation S331, for the first operation dimension, each operation parameter corresponding to the database configuration and at least one operation parameter corresponding to the data model are orthogonally combined to obtain M main test cases.

[0063] In operation S332, for the second operation dimension, each operation parameter corresponding to the database operation, at least one operation parameter corresponding to the execution method, and at least one operation parameter corresponding to the external operation are orthogonally combined to obtain N slave test cases.

[0064] In operation S333, according to the quantity relationship between the main test cases and the slave test cases, the M main test cases and the N slave test cases are combined into a plurality of database extreme test cases.

[0065] According to an embodiment of the present invention, database configuration refers to dimensions related to database architecture configuration, and operation parameters include: increasing the number of shards, increasing the number of cluster coordinator (coordinator) and data (data) nodes, setting shard (gcluster) configuration parameters: maximum number of associations (max_connections) = 10000, etc.

[0066] The data model refers to the operations related to the amount of table data in the database, such as increasing the number of database tables, increasing the amount of data in the table, creating a table with a large column width, creating a table with a maximum row width, adding hash indexes, and the number of rows and columns, among which the number of hash indexes added can be 64, and the number of rows and columns added can be 255. Database operations refer to the dimensions related to the operations and logical methods performed inside the database. Operation parameters may include: query, load, database manipulation language (DML) statements, database definition language (DDL) statements, and redistribution. Execution methods refer to parallel operations and execution duration. External operations refer to the effects of certain operations on the database achieved by external means.

[0067] Both DML statements and DDL statements are SQL statements written in Structured Query Language (SQL).

[0068] It should be noted that database configuration, data model, database operation and execution method are database operation dimensions determined based on the internal architecture of the database, while external factors are external operation influences.

[0069] For database configuration and data model in the data class, two database operation dimensions need to be orthogonally combined to cover data-related combinations that may trigger database limits. Similarly, for database operations, execution methods, and external operations in the operation class, three database operation dimensions need to be orthogonally combined to cover operation-related combinations that may trigger database limits.

[0070] For example, when the database operation includes two operation parameters a1 and a2, the execution method includes two operation parameters b1 and b2, and the external operation includes one operation parameter c1, the orthogonal combinations are divided into 4 slave test cases, such as a1+b1+c1, a2+b1+c1, a1+b2+c1, and a2+b2+c1.

[0071] In actual applications, only the data operation dimension may trigger the database limit, and only the operation dimension of the operation class may also trigger the database limit. However, in order to cover multiple scenarios that trigger the database limit, according to the number relationship between the main test cases and the slave test cases, M main test cases and N slave test cases are combined into multiple database limit test cases.

[0072] For example, based on the full coverage standard, M main test cases and N slave test cases are combined into multiple database extreme test cases. The full coverage standard means that the combined database extreme test cases involve M main test cases and N slave test cases, and there is no need to orthogonally combine M main test cases and N slave test cases.

[0073] The embodiments of the present invention can ensure full coverage within the same operation dimension through orthogonal combinations within the first operation dimension and the second operation dimension, and combine the first operation dimension and the second operation dimension through the full coverage standard, so that the database extreme test cases finally obtained not only meet the characteristics that the test cases are diverse and not unique, but also ensure test coverage when the test cases are not completely orthogonally generated, thereby solving the problem of difficult coverage evaluation and reducing the cost of test case generation.

[0074] According to an embodiment of the present invention, based on the quantitative relationship between the main test cases and the slave test cases, M main test cases and N slave test cases are combined into multiple database extreme test cases, including: when the number of main test cases is greater than or equal to the number of slave test cases, N slave test cases are randomly distributed among the M main test cases to obtain M database extreme test cases.

[0075] According to the embodiment of the present invention, since the operations of the database are all for the operation objects, and the operation objects are related to the operation dimensions of the data class, each main test case needs to be included in the database limit test case.

[0076] Therefore, when the number of main test cases is greater than or equal to the number of slave test cases, that is, M>N, the N slave test cases can be randomly distributed among the M main test cases, so that the M database extreme test cases finally generated include every combination of the M main test cases and cover the N slave test cases.

[0077] Alternatively, in order to ensure that each database extreme test case includes both data class and operation class dimensions, after randomly distributing N slave test cases to M main test cases, the N slave test cases can also be randomly added to the remaining (MN) main test cases and combined with them to form (MN) database extreme test cases including both data class and operation class dimensions.

[0078] According to an embodiment of the present invention, when the number of main test cases is less than or equal to the number of slave test cases, (NM) main test cases are randomly selected from M main test cases for replication to obtain (NM) replicated test cases; and the M main test cases and (NM) replicated test cases are randomly distributed among N slave test cases to obtain N database limit test cases.

[0079] According to the embodiment of the present invention, since each main test case needs to be included in the database extreme test case, therefore, when the number of the main test case is less than or equal to the number of the slave test case, on the one hand, it is necessary to ensure that N database extreme test cases cover M main test cases, that is, M database extreme test cases correspond to M main test cases. On the other hand, the remaining (NM) database extreme test cases also need to include the main test case.

[0080] Therefore, in order to ensure that the remaining (NM) database extreme test cases include the main test case, (NM) main test cases can be randomly selected from the M main test cases for replication, and (NM) replication test cases can be obtained, resulting in a total of N main test cases. The N main test cases are randomly combined one-to-one with the N slave test cases to obtain N database extreme test cases.

[0081] In order to more clearly describe the trigger scenario, the corresponding database operation test dimension information, and the generated database limit test case, the following will take memory as an example of the trigger scenario.

[0082] When analyzing the memory of a database, you can start with analyzing internal factors, obtain the relationship with external interfaces layer by layer, and finally obtain the triggering scenario based on external operations.

[0083] Step 1: According to the implementation architecture of the database memory module, the memory can be divided into first-level modules: domain component (dc) heap memory management, large heap memory management, and temporary heap memory management.

[0084] Step 2: Decompose the primary module into secondary modules.

[0085] Specifically, large heap memory management is divided into join operator heap management, scan operator heap management, aggregation operator heap management, sort operator heap management, view scan (subscan) operator heap management, union operator heap management, result operator heap management, multidimensional data management (olap) operator heap management, and scan execution (cte) operator heap management. There is no secondary module for dc heap memory management. There are secondary modules for temp heap memory management: metadata management, virtual machine (gns) management, test (dts) management, and hash bucket management. According to the implementation principles of memory application and use in the database, which operations will use memory, and the scenarios that trigger the memory usage limit are obtained.

[0086] Step 3: For the subdivided secondary modules, obtain the usage scenarios corresponding to each calling module through the calling relationship between the database interface and the secondary module.

[0087] Specifically, the secondary module of large heap memory management, namely the operator module, is mainly called by each operator of the database computing module and is generally used when querying the database. The dc heap memory management is called by the database module that reads or writes data files and is used when reading and writing the database. The metadata management of temp heap memory management is called by the tableshare module and is used when opening the table to maintain the metadata information of the table during database read and write operations. The gns management, dts management, and hash bucket management are called by the select into server module and are used when transmitting and distributing data between nodes and shards of a distributed database. For example, to distribute data from a node to other nodes, it is necessary to calculate the data on the node, how to divide the data into multiple data blocks, and distribute them to other nodes according to the rules. The number of target nodes that need to be distributed is proportional to the memory used.

[0088] Step 4: Analyze the usage scenarios of the calling module and derive the database limit test scenarios that trigger the memory usage limit.

[0089] The scenarios involved in calling the module are the positive factors related to memory usage. Like a proportional function, the more these scenarios are used, the more memory will be used, and it will be easier to reach the limit. Therefore, by amplifying the operations supported by the database, triggering these positive factors can trigger the limit of memory usage. At the same time, these positive factors are divided into necessary factors and non-necessary factors. Necessary factors refer to factors that are indispensable and cannot be replaced by other factors. Without this factor, the triggering scenario cannot be constructed. Non-necessary factors refer to factors that can still trigger the scenario by increasing the accumulation of other factors even if they are missing. Necessary factors are also data types, and non-necessary factors are also operation types.

[0090] First, query operations will use large heaps, but not all query operations will use them. They will only be used when the execution process involves the calculation of various operators in the database. Therefore, operations with these characteristics must be executed. At the same time, increasing the execution time and execution density of query operations will help increase the frequent calls to memory, and more memory usage will accumulate in the same period of time. Therefore, it can be concluded that the necessary factors include query operations, that is, read operations.

[0091] Second, database read and write operations require data volume, and database tables are the carriers of data storage. Increasing the number of records in a data table will increase the data storage capacity, thereby increasing the use of memory when reading and writing databases. There are two necessary factors: read or write operations and data volume.

[0092] Third, metadata management of the temp heap is the use of metadata in the table. The high-frequency repeated reading and writing of the table will continuously load metadata information into the memory, involving a large number of table fields, index maintenance, and reading and writing operations on a large number of different tables, which are beneficial to memory usage. Therefore, the necessary factors are read and write operations.

[0093] Fourth, the temp heap call scenario is strongly related to the distribution scale of database shards and data transmission operations. The database consists of multiple nodes, and each computing node is stored in units of multiple shards. When the data of each shard is transmitted or distributed to n nodes, it is necessary to create n buffers corresponding to n nodes in the memory to perform data calculation and organization, and then transmit after reaching a certain amount. Therefore, increasing the number of nodes and shards will increase the scale of data transmission and distribution, which is conducive to increasing memory usage. In addition, factors that can also increase memory usage include data volume, complex table structure and other factors. There are two necessary factors: data transmission operations, multiple shards or number of nodes.

[0094] From the above analysis, it can be concluded that when the trigger scenario is memory, the operating parameters that can trigger performance issues in the database include: increasing the amount of data in the tables involved in the execution, increasing the number of database shards, increasing the number of database nodes, increasing the number of concurrent executions of Structured Query Language (SQL) tasks, long-term running of SQL tasks, database read and write operations, and complex table structures of data tables.

[0095] At the same time, the affinity relationship between memory and related influencing factors can be obtained. Table 1 shows the affinity relationship between memory and related influencing factors, where 1 represents a necessary factor, representing strong affinity, and 0 represents a non-necessary factor, representing a weak affinity.

[0096] Table 1

[0097]

[0098] Therefore, by classifying the above operation parameters, from the database test case construction and execution level, they are divided into database configuration, data model, database operation, execution method and external operation respectively.

[0099] Table 2 shows a relationship table between database operation dimensions and their corresponding operation parameters when the trigger scenario is memory.

[0100] Table 2

[0101]

[0102] Therefore, when the trigger scenario is memory, a main test case and a slave test case can be generated according to Table 2, and multiple database limit test cases of memory can be obtained based on the generated multiple main test cases and multiple slave test cases.

[0103] Similarly, the relationship tables of the number of file handles and connection pools are Table 3 and Table 4 respectively.

[0104] Table 3

[0105]

[0106] Table 4

[0107]

[0108] According to an embodiment of the present invention, a test case matrix is ​​generated according to multiple database extreme test cases of each of the multiple trigger scenarios, including: generating a test case matrix according to the multiple database extreme test cases of each of the multiple trigger scenarios according to the trigger scenarios, database operation dimensions and use case identifiers.

[0109] Database hardware triggering scenarios include at least one of the following: memory, connection pool, thread pool; database software triggering scenarios include at least one of the following: lock, distributed database management component.

[0110] According to an embodiment of the present invention, locks include database locks, library mutex locks, initialization mutex locks, and table-level mutex locks, and distributed database management components include file handle count, data loading, data object processing, gcware processing capabilities, and data recovery processing capabilities.

[0111] According to the embodiment of the present invention, as the database indicators and test scenarios are continuously improved, the triggering scenarios can be further improved and are not limited to the above content.

[0112] According to an embodiment of the present invention, since each trigger scenario can correspond to a relationship table as shown in Table 2 to Table 4 above, each trigger scenario can generate multiple database extreme test cases corresponding thereto based on the above relationship table. After generating multiple database extreme test cases corresponding to each trigger scenario, in order to facilitate testers to intuitively and conveniently view the overall test cases and their test coverage, an embodiment of the present invention can store and display multiple database extreme test cases corresponding to each trigger scenario in the form of a test case matrix. The test case matrix is ​​stored in the form of a table, including multiple columns of data, such as trigger scenarios, database operation dimensions, and use case identifiers, for easy viewing and querying. As shown below, Table 5 shows the test case matrix.

[0113] Table 5

[0114]

[0115] As another specific embodiment, in addition to using parameter identifiers to represent the operation parameters of each operation dimension (ie, database operation dimension), the operation parameters can also be directly used. For example, 1.1 is replaced with "increase the number of shards, increase the number of cluster coordinator and data nodes", and 3.1 is replaced with "load".

[0116] According to an embodiment of the present invention, for a certain database operation dimension, the operation parameters of different trigger scenarios may be the same, and thus, there may be repeated database limit test cases between database limit test cases generated by multiple trigger scenarios.

[0117] According to an embodiment of the present invention, the method also includes: when it is determined that there are similar or repeated database limit test cases between multiple database limit test cases for the first trigger scenario and multiple database limit test cases for the second trigger scenario, the similar or repeated database limit test cases are used as multi-scenario test cases so as to synchronously complete the database limit tests for the first trigger scenario and the second trigger scenario when executing the multi-scenario test cases.

[0118] According to an embodiment of the present invention, repeated database extreme test cases are database extreme test cases with the same operating parameters and operating objects, and similar database extreme test cases are database extreme test cases with the same operating parameters but different operating objects.

[0119] For example, take the database extreme test cases tc_001, tc_004, tc_005, and tc_009 in Table 5 as examples.

[0120] For tc_004 and tc_009, the database configuration 1.1, database operation 3.4, and execution method 4.2 of the memory are exactly the same as the database configuration 1.1, database operation 3.5, and execution method 4.2 of the number of file handles. The data models 2.1, 2.2, 2.3, and 2.5 of the memory include the data models 2.1, 2.2, and 2.3 of the number of file handles. Therefore, the database limit test case tc_009 is the same as tc_004 and can be merged.

[0121] For tc_001 and tc_005, the database configuration 1.1 and execution method 4.2 of the memory are exactly the same as the database configuration 1.1 and execution method 4.2 of the number of file handles, and the data models 2.1, 2.2, 2.3, and 2.5 of the memory include the data models 2.1, 2.2, and 2.3 of the number of file handles. However, the operation object loaded by the database operation 3.1 of the memory is unlimited, and the operation object loaded by the database operation 3.1 of the number of file handles is only multiple files in the file list (filelist). Therefore, the database limit test case tc_005 is similar to tc_001 and can be merged.

[0122] The embodiment of the present invention merges database extreme test cases based on the trigger scenario dimension when generating a test case matrix, so that a certain merged database extreme test case can test two trigger scenarios at the same time, avoiding repeated testing and reducing testing costs.

[0123] According to an embodiment of the present invention, the method also includes: in response to detecting a change in a target operating parameter or a target database operating dimension under a target trigger scenario, determining at least one database limit test case to be adjusted from a test case matrix; and adjusting at least one database limit test case to be adjusted using the target operating parameter or the target database operation dimension to obtain at least one adjusted database limit test case.

[0124] As the database version is continuously upgraded, some indicators or processing capabilities of the database may change, which is reflected in the specific data, that is, the target operation parameters or target database operation dimensions change. The changed target operation parameters or target database operation dimensions further affect the generation and coverage evaluation of database extreme test scenarios.

[0125] The embodiments of the present invention can intuitively and conveniently determine the impact of changed target operation parameters or target database operation dimensions on each trigger scenario and each database extreme test case by means of a test case matrix.

[0126] Specifically, at least one affected database limit test case to be adjusted can be directly queried and located based on the test case matrix according to the changed target operation parameter or target database operation dimension. After this operation, at least one affected database limit test case to be adjusted can be displayed to the tester in real time and intuitively.

[0127] After determining at least one affected database limit test case to be adjusted, the at least one database limit test case to be adjusted may be adjusted using the target operation parameter or the target database operation dimension, for example, by replacing, adding, modifying, or adjusting the target operation parameter or the target database operation dimension in the database limit test case.

[0128] For example, when the rebalance syntax changes, it can be determined that the target operation parameter rebalance changes. According to Table 5 above, it can be concluded that the database limit test cases tc_009 and tc_004 need to be adjusted, and then it can be concluded that the two trigger scenarios of memory and file handle number are affected, so that the coverage situation can be clearly obtained after the adjustment.

[0129] The advantages of the embodiments of the present invention are: simple and clear evaluation of test coverage, and if a database operation dimension or an operation parameter therein changes, it is very convenient to find the database limit test cases to be adjusted with relevant impact from the test case matrix for supplementation or correction.

[0130] An embodiment of the present invention also provides a database limit testing method, comprising: in response to detecting a test request for a target trigger scenario, a target operating parameter or a target database operation dimension, obtaining at least one database limit test case related to the target trigger scenario, the target operating parameter or the target database operation dimension from a test case matrix; wherein the test case matrix is ​​generated by the above-mentioned database limit test case generation method; and executing at least one database limit test case in the database to be tested in sequence to generate at least one database limit test result.

[0131] Since the generated database extreme test cases can meet the characteristics of the diversity of use cases under the database extreme test scenarios, and can also fully cover the first operation dimension and the second operation dimension, the above database extreme test cases can be used to implement the testing of database extreme scenarios on the basis of lower use case construction costs.

[0132] Figure 4 A structural block diagram of a database extreme test case generation device according to an embodiment of the present invention is shown.

[0133] like Figure 4As shown, the database extreme test case generation device 400 of this embodiment includes an acquisition module 410 , a dimension determination module 420 , a case combination module 430 , and a matrix generation module 440 .

[0134] The acquisition module 410 is used to acquire a triggering scenario that triggers the performance problem of the database to be tested, wherein the triggering scenario includes a database hardware triggering scenario or a database software triggering scenario.

[0135] The dimension determination module 420 is used to determine multiple groups of database operation dimension information matching the triggering scenario, wherein the database operation dimension information corresponds to the database operation dimension, each group of database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension.

[0136] The use case combination module 430 is used to combine multiple main test cases composed based on the first operation dimension and multiple sub-test cases composed based on the second operation dimension to obtain multiple database extreme test cases.

[0137] The matrix generation module 440 is used to generate a test case matrix according to a plurality of database extreme test cases of a plurality of trigger scenarios, wherein the test case matrix is ​​used to store a database extreme test case for each trigger scenario.

[0138] According to the embodiment of the present invention, the operation of the device part is similar to the operation of the method part described above, and will not be repeated here.

[0139] According to an embodiment of the present invention, any multiple modules among the acquisition module 410, the dimension determination module 420, the use case combination module 430, and the matrix generation module 440 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.

[0140] According to an embodiment of the present invention, at least one of the acquisition module 410, the dimension determination module 420, the use case combination module 430, and the matrix generation module 440 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a proper combination of any of them. Alternatively, at least one of the acquisition module 410, the dimension determination module 420, the use case combination module 430, and the matrix generation module 440 may be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function may be performed.

[0141] The present invention also provides a database limit testing device, comprising: a trigger module, used to respond to detecting a test request for a target trigger scenario, a target operating parameter or a target database operation dimension, and obtain at least one database limit test case related to the target trigger scenario, the target operating parameter or the target database operation dimension from a test case matrix; wherein the test case matrix is ​​generated based on a database limit test case generation method; and a test module, used to execute at least one database limit test case in sequence in the database to be tested, and generate at least one database limit test result.

[0142] Figure 5 A block diagram of an electronic device suitable for a database limit test case generation method and a database limit test method according to an embodiment of the present invention is shown.

[0143] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present invention includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0144] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.

[0145] According to an embodiment of the present invention, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.

[0146] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0147] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.

[0148] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the above method provided by the embodiment of the present invention.

[0149] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 501. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0150] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0151] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0152] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0153] 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.

[0154] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.

[0155] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating database extreme test cases, characterized in that: The method comprises: Acquire a triggering scenario that triggers a performance problem in the database to be tested, wherein the triggering scenario includes a database hardware triggering scenario or a database software triggering scenario; Determine multiple groups of database operation dimension information matching the trigger scenario, wherein the database operation dimension information corresponds to a database operation dimension, and each group of the database operation dimension information includes at least one operation parameter; the database operation dimension includes a first operation dimension and a second operation dimension; the first operation dimension includes a database configuration and a data model, and the second operation dimension includes a database operation, an execution method, and an external operation; Combining a plurality of main test cases based on the first operation dimension and a plurality of sub-test cases based on the second operation dimension to obtain a plurality of database limit test cases; and A test case matrix is ​​generated according to the multiple database extreme test cases of each of the multiple trigger scenarios, wherein the test case matrix is ​​used to store the database extreme test case for each of the trigger scenarios.

2. The method according to claim 1, characterized in that The combining of the multiple main test cases based on the first operation dimension and the multiple sub-test cases based on the second operation dimension to obtain multiple database limit test cases includes: For the first operation dimension, orthogonally combine each of the operation parameters corresponding to the database configuration and at least one operation parameter corresponding to the data model to obtain M main test cases, where M is a positive integer greater than 1; For the second operation dimension, orthogonally combine each of the operation parameters corresponding to the database operation, at least one operation parameter corresponding to the execution method, and at least one operation parameter corresponding to the external operation to obtain N slave test cases, where N is a positive integer greater than 1; According to the quantity relationship between the main test cases and the slave test cases, the M main test cases and the N slave test cases are combined into the multiple database limit test cases.

3. The method according to claim 2, characterized in that The combining the M main test cases and the N slave test cases into the plurality of database limit test cases according to the quantity relationship between the main test cases and the slave test cases comprises: When the number of the main test cases is greater than or equal to the number of the slave test cases, the N slave test cases are randomly distributed among the M main test cases to obtain M database extreme test cases.

4. The method according to claim 3, characterized in that The method further comprises: In a case where the number of the main test cases is less than or equal to the number of the slave test cases, randomly selecting (NM) main test cases from the M main test cases for duplication to obtain (NM) duplicate test cases; and The M main test cases and the (NM) replicated test cases are randomly distributed among the N slave test cases to obtain N database extreme test cases.

5. The method according to claim 1, characterized in that Generating a test case matrix according to the multiple database extreme test cases of each of the multiple triggering scenarios includes: According to the trigger scenario, the database operation dimension and the use case identifier, a test case matrix is ​​generated according to the multiple database extreme test cases of the respective trigger scenarios; The database hardware triggering scenario includes at least one of the following: memory, connection pool, thread pool; the database software triggering scenario includes at least one of the following: lock, distributed database management component.

6. The method according to claim 5, characterized in that The method further comprises: When it is determined that there are similar or repeated database limit test cases between multiple database limit test cases for the first trigger scenario and multiple database limit test cases for the second trigger scenario, the similar or repeated database limit test cases are used as multi-scenario test cases to synchronously complete database limit tests for the first trigger scenario and the second trigger scenario when executing the multi-scenario test cases.

7. The method according to claim 6, characterized in that The method further comprises: In response to detecting a change in a target operating parameter or a target database operating dimension in a target triggering scenario, determining at least one database limit test case to be adjusted from the test case matrix; and The at least one database limit test case to be adjusted is adjusted using the target operation parameter or the target database operation dimension to obtain at least one adjusted database limit test case.

8. A database limit testing method, characterized in that: The method comprises: In response to detecting a test request for a target trigger scenario, a target operating parameter, or a target database operating dimension, obtaining at least one database extreme test case related to the target trigger scenario, the target operating parameter, or the target database operating dimension from a test case matrix; wherein the test case matrix is ​​generated based on the method according to any one of claims 1 to 7; The at least one database limit test case is executed in sequence in the database to be tested to generate at least one database limit test result.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: A computer program or instruction is stored thereon, wherein the computer program or instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Self-adaptive multi-scene database performance test method and system

    CN118093445A

  • Server centralized database scene performance test method

    CN118113583A