Method, device and electronic device for simplifying database use cases based on error reporting information
By using error information to determine password parameter attributes, database use cases are simplified, and the complexity of use case generation and testing and resource waste problems in database functional tests are solved, and a more efficient testing process is achieved.
Patent Information
- Application Number
- CN202411748854.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In database functional testing, the computational complexity and engineering volume of generating and testing multiple database use cases is relatively large, and not all use cases are effective, resulting in wasted testing resources.
By determining the password parameter attributes based on the error message, the database use cases to be generated are simplified, thereby reducing the number of generated database use cases and improving testing efficiency.
Determine password parameter attributes in a real environment, simplify database use cases, reduce waste of test resources, and improve testing efficiency.
Smart Images

Figure CN119226178B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of database technology and testing technology, and more specifically, to a method, device, and electronic device for simplifying database use cases based on error reporting information. Background Art
[0002] When testing the functions of a database, testers are usually required to generate multiple database use cases based on requirements and test the multiple database use cases. In the test work, when the database use cases cover all parameters, it is theoretically necessary to perform orthogonal combinations of use cases including multiple parameters and different values. The calculation of database use cases is relatively complex, and the amount of work required to construct database use cases is also relatively large. In addition, not all database use cases obtained by combining multiple parameters and different values are valid use cases, and testing these database use cases will also lead to a waste of test resources. Summary of the invention
[0003] In view of this, the present invention provides a method, device, and electronic device for simplifying database use cases based on error reporting information.
[0004] One aspect of the present invention provides a method for simplifying database use cases based on error information, comprising: generating N initial database use cases with test results of failure according to M password parameters of a password test scenario, where N is a positive integer greater than M, and M is a positive integer greater than 1; testing the N initial database use cases to obtain error information of each initial database use case when the test result is failure; determining the password parameter attributes of the password test scenario according to the error information; and simplifying P database use cases to be generated into Q target database use cases based on the password parameter attributes, wherein the P database use cases to be generated are obtained by combining at least one password parameter, P is a positive integer greater than N, and Q is a positive integer less than P.
[0005] According to an embodiment of the present invention, determining password parameter attributes of a password test scenario based on error information includes: determining error keywords from the error information of each initial database use case; and determining password parameter attributes based on the error keywords.
[0006] According to an embodiment of the present invention, the password parameter attributes include an error conflict attribute. The password parameter attributes are determined based on the error keyword, including: screening out N1 first database use cases that meet a first predetermined condition from N initial database use cases, where N1 is a positive integer less than or equal to N, and the first predetermined condition is: the error keyword is the same and only includes one password parameter; determining the N1 password parameters included in the N1 first database use cases as first password parameters with an error conflict attribute.
[0007] According to an embodiment of the present invention, based on cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: according to N1 first cryptographic parameters, P1 first combination database use cases obtained by orthogonal combination of at least two first cryptographic parameters are determined, where P1 is a positive integer less than P; and the P database use cases are simplified into (P-P1) target database use cases that do not include the P1 first combination database use cases, where (P-P1)=Q.
[0008] According to an embodiment of the present invention, password parameter attributes include: error reporting parallel attributes, and the password parameter attributes are determined based on error reporting keywords, including: screening out N2 second database use cases that meet the second predetermined condition from N initial database use cases, N2 is a positive integer less than or equal to N, and the second predetermined condition is: including at least two password parameters, and the error reporting keyword includes error reporting sub-keywords corresponding to the at least two password parameters respectively; determining the N3 password parameters included in the N2 second database use cases as second password parameters with error reporting parallel attributes, and N3 is a positive integer greater than or equal to N2.
[0009] According to an embodiment of the present invention, based on the cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: according to N3 second cryptographic parameters, P2 second combination database use cases are determined, P2 is a positive integer less than P, and the second combination database use case is a database use case composed of at least one orthogonal combination of second cryptographic parameters but not including N3 second cryptographic parameter combinations; the P database use cases are simplified into (P-P2) target database use cases that do not include the P2 second combination database use cases, where (P-P2)=Q.
[0010] According to an embodiment of the present invention, password parameter attributes include: error reporting priority, and determining password parameter attributes based on error reporting keywords, including: screening out N4 third database use cases that meet a third predetermined condition from N initial database use cases, where N4 is a positive integer less than or equal to N, and the third predetermined condition is: including at least two password parameters, the error reporting keywords are the same, and the error reporting keyword corresponds to a password parameter; determining the password parameter corresponding to the error reporting keyword in the N4 third database use cases as a third password parameter with a high error reporting priority.
[0011] According to an embodiment of the present invention, based on the cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: determining P3 third combination database use cases according to N4 third cryptographic parameters, wherein the third combination database use case is obtained by orthogonal combination of at least (M-N4+1) third cryptographic parameters, and P3 is a positive integer less than P; determining P4 fourth combination database use cases according to (M-N4) fourth cryptographic parameters with low error reporting priority, wherein the fourth combination database use case is obtained by orthogonal combination of at least one and at most (M-N4) fourth cryptographic parameters, and P4 is a positive integer less than P; and using the third combination database use case and the fourth combination database use case as target database use cases, wherein P3+P4=Q.
[0012] Another aspect of the present invention provides a device for simplifying database use cases based on error information, including: a generation module, used to generate N initial database use cases with test results of failure according to M password parameters of a password test scenario, N is a positive integer greater than M, and M is a positive integer greater than 1; a testing module, used to test the N initial database use cases to obtain error information of each initial database use case when the test result is failure; a determination module, used to determine the password parameter attributes of the password test scenario according to the error information; and a simplification module, used to simplify P database use cases to be generated into Q target database use cases based on the password parameter attributes, wherein the P database use cases to be generated are obtained by combining at least one password parameter, P is a positive integer greater than N, and Q is a positive integer less than P.
[0013] Another aspect of the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0014] Another aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0015] Another aspect of the present invention provides a computer program product, the computer program product comprising computer executable instructions, and the instructions are used to implement the above method when being executed.
[0016] In an embodiment of the present invention, since the initial database use case is a pre-built database use case with a failed test result, by running the initial database use case and obtaining the error information after the actual operation, the password parameter attributes of the M password parameters can be determined in a real environment, and then the P database use cases to be generated can be simplified based on the error information of the actual operation, thereby reducing the number of generated database use cases and improving testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above 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:
[0018] Figure 1 An exemplary system architecture to which the method and apparatus for simplifying database use cases based on error information of the present invention can be applied is shown.
[0019] Figure 2 A flow chart of a method for simplifying database use cases based on error information according to an embodiment of the present invention is shown.
[0020] Figure 3 A flow chart of a method for determining cryptographic parameter attributes according to an embodiment of the present invention is shown.
[0021] Figure 4A A flow chart for determining error conflict attributes according to an embodiment of the present invention is shown.
[0022] Figure 4B A flow chart for determining error parallel attributes according to an embodiment of the present invention is shown.
[0023] Figure 4C A flow chart for determining the error reporting priority according to an embodiment of the present invention is shown.
[0024] Figure 5 A flowchart is shown for simplifying database use cases based on multiple password parameter attributes according to an embodiment of the present invention.
[0025] Figure 6 A block diagram of an apparatus for simplifying database use cases based on error information according to an embodiment of the present invention is shown.
[0026] Figure 7 A block diagram of an electronic device suitable for implementing a method for simplifying database use cases based on error reporting information 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 the embodiments of the present invention, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage and other aspects of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain user personal information security, network security and national security. In the embodiments of the present invention, the user's authorization or consent is obtained before obtaining or collecting user personal information.
[0032] An embodiment of the present invention provides a method for simplifying database use cases based on error information, comprising: generating N initial database use cases with test results of failure according to M password parameters of a password test scenario, where N is a positive integer greater than M, and M is a positive integer greater than 1; testing the N initial database use cases to obtain error information of each initial database use case when the test result is failure; determining password parameter attributes of the password test scenario according to the error information; and simplifying P database use cases to be generated into Q target database use cases based on the password parameter attributes, wherein the P database use cases to be generated are obtained by combining at least one password parameter, P is a positive integer greater than N, and Q is a positive integer less than P.
[0033] Figure 1 An exemplary system architecture to which the method and apparatus for simplifying database use cases based on error information of the present invention can be applied is shown.
[0034] like Figure 1As shown, the system architecture 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 and / or wireless communication links, etc.
[0035] The user may use 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. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).
[0036] 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.
[0037] The server 105 may be a server that provides various services, for example, may be a server on which a database is installed.
[0038] It should be noted that the method for simplifying database use cases based on error information provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the device for simplifying database use cases based on error information provided in the embodiment of the present invention can generally be set in the server 105. The method for simplifying database use cases based on error information 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. Correspondingly, the device for simplifying database use cases based on error information 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. Alternatively, the method for simplifying database use cases based on error information provided in the embodiment of the present invention can also be executed by the first terminal device 101, the second terminal device 102, and the third terminal device 103, or can also be executed by other terminal devices different from the first terminal device 101, the second terminal device 102, and the third terminal device 103. Correspondingly, the apparatus for simplifying database use cases based on error information provided in the embodiment of the present invention may also be arranged in the first terminal device 101, the second terminal device 102, the third terminal device 103, or in the other terminal devices mentioned above.
[0039] For example, the M password parameters of the password test scenario can be stored in the first terminal device 101, the second terminal device 102, and the third terminal device 103. One of the first terminal device 101, the second terminal device 102, and the third terminal device 103 generates N initial database use cases with failed test results based on the M password parameters of the password test scenario, and sends the N initial database use cases to the server 105 for testing, and receives error information. Afterwards, one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 determines the password parameter attributes of the password test scenario based on the error information; based on the password parameter attributes, simplifies the P database use cases to be generated into Q target database use cases.
[0040] Alternatively, the server 105 generates N initial database use cases with test results of failure based on the M password parameters of the password test scenario; tests the N initial database use cases to obtain error information for each initial database use case when the test result is failure; determines the password parameter attributes of the password test scenario based on the error information; and based on the password parameter attributes, simplifies the P database use cases to be generated into Q target database use cases.
[0041] For example, server 105 determines the password parameter attributes of the password test scenario based on a pre-written database use case simplification script and the error information after N initial database use case tests; based on the password parameter attributes, simplifies the P database use cases to be generated into Q target database use cases.
[0042] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0043] Figure 2 A flow chart of a method for simplifying database use cases based on error information according to an embodiment of the present invention is shown. Figure 2 As shown, the method 200 includes operations S210 to S240.
[0044] In operation S210, N initial database use cases with failed test results are generated according to M password parameters of the password test scenario, where N is a positive integer greater than M, and M is a positive integer greater than 1.
[0045] In operation S220, N initial database use cases are tested to obtain error information of each initial database use case when the test result is failure.
[0046] In operation S230, a password parameter attribute of a password test scenario is determined according to the error message.
[0047] In operation S240 , based on the cryptographic parameter attributes, the P database use cases to be generated are simplified into Q target database use cases.
[0048] According to an embodiment of the present invention, a password test scenario refers to a test scenario for a database providing password services, and includes multiple password parameters such as password lock times, password length password_min_length, password complexity password_format_option, reuse times password_reuse_max, and reuse time password_reuse_time.
[0049] Multiple password parameters are independent of each other. The password setting is successful only when the password set by the user meets the parameter rules of the password parameter. Otherwise, the setting fails. For example, if the password length does not meet the parameter rule of password_min_length, the password setting fails.
[0050] The P database use cases to be generated in the password test scenario may include at least one password parameter. For example, the P database use cases include: a database use case of a password parameter, a database use case of a pairwise orthogonal combination of M password parameters... a database use case of M password parameter combinations. In addition, the P database use cases include not only a combination of the number dimension of the password parameters, but also a combination of the numerical values of each password parameter. For example, in the case of selecting any two password parameters from four password parameters, not only a pairwise orthogonal combination is required, but also one password parameter needs to be set successfully and the other password parameter needs to fail to be set, that is, a total of 4C2=6 combinations are required, and 6*(2^2)=24 database use cases.
[0051] The more password parameters there are in the password testing scenario, the more database use cases there will be. As more password parameters are added, the more difficult it will be to sort out and generate database use cases.
[0052] Therefore, the embodiment of the present invention generates N initial database use cases with failed test results according to M password parameters of the password test scenario through operation S210.
[0053] In an embodiment of the present invention, the N initial database use cases include: M database use cases of a single cryptographic parameter, and database use cases of orthogonal combinations of at least two cryptographic parameters. The database use cases of at least two cryptographic parameters may be database use cases of all combinations of orthogonal combinations, or database use cases of partial combinations of orthogonal combinations, or partial / full database use cases of other numbers of orthogonal combinations.
[0054] In a preferred embodiment, since pairwise orthogonal combinations can test conflicts, priorities, parallel relationships, etc. between two cryptographic parameters, the N initial database use cases include M database use cases consisting of a single cryptographic parameter and database use cases of pairwise orthogonal partial combinations, thereby reducing the number of database use cases that need to be executed during the testing phase.
[0055] In the embodiment of the present invention, the test result is failure, that is, the password setting fails, and the password setting failure is caused by the failure to set the values of all password parameters in each initial database use case. For example, for the initial database use case 1 of the combination of two password parameters, password length password_min_length and password complexity password_format_option, the values of password length password_min_length and password complexity password_format_option can be set to fail, so that the test result of the initial database use case 1 is failure.
[0056] According to an embodiment of the present invention, N initial database use cases can be run in the database to implement the testing of the N initial database use cases. When running each initial database use case, if the test result fails, the database will generate corresponding error information.
[0057] According to an embodiment of the present invention, by performing text analysis on the error message, the password parameter attributes of all password parameters in the password test scenario can be determined, for example, to determine whether the error messages are the same.
[0058] According to an embodiment of the present invention, after determining the password parameter attributes, P database use cases when all password parameter combinations or the numerical setting of a single password parameter fails can be simplified according to the password parameter attributes, and database use cases that may have the same test situation in the P database use cases are removed to obtain simplified Q target database use cases.
[0059] In the password testing scenario, users have a high degree of freedom in setting passwords, and there will be a variety of password setting scenarios. If database use cases are designed only based on experience, there may be a variety of uncovered situations, which will cause testers to continuously optimize and maintain the password function, delaying the launch time and project progress.
[0060] In an embodiment of the present invention, since the initial database use case is a pre-built database use case with a failed test result, by running the initial database use case and obtaining the error information after the actual operation, the password parameter attributes of the M password parameters can be determined in a real environment, and then the P database use cases to be generated can be simplified based on the error information of the actual operation, thereby reducing the number of generated database use cases and improving testing efficiency.
[0061] Figure 3 A flow chart of a method for determining cryptographic parameter attributes according to an embodiment of the present invention is shown.
[0062] like Figure 3 As shown, embodiment 300 includes operations S331 to S332, and embodiment 300 can be used as a specific embodiment of operation S230.
[0063] In operation S331, an error keyword is determined from the error information of each initial database use case.
[0064] In operation S332, the password parameter attributes are determined according to the error reporting keyword.
[0065] According to an embodiment of the present invention, the error reporting information generally includes two parts: predetermined error reporting format information and error reporting keywords.
[0066] The predetermined error format information in the multiple error messages is usually the same, and each initial database use case corresponds to an error keyword, which is used to indicate the error cause of the initial database use case. Thus, for the error keyword of each initial database use case, the password parameter attribute of the password parameter included in each initial database use case can be determined.
[0067] For example, the error message may be: ERROR 1802(HY000) at line 10: Invalid password format, length should >=0 and contain 'number' 'small letter' 'capitalletter' 'special character'. The predetermined error format message may be "ERROR 1802(HY000) atline 10:" and the error keyword is: Invalid password format, length should >=0 and contain 'number' 'small letter' 'capital letter' 'special character'.
[0068] The embodiments of the present invention extract error keywords from error information and determine the password parameter attributes of the password parameters included in the initial database use case according to the error keywords. This can obtain reliable and accurate password parameter attributes based on simple and real test results, which helps to simplify subsequent database use cases.
[0069] Figure 4A A flow chart for determining error conflict attributes according to an embodiment of the present invention is shown.
[0070] like Figure 4A As shown, embodiment 400A is a specific embodiment of determining error conflict attributes, including operations S4321 to S4322.
[0071] In operation S4321, N1 first database use cases that meet a first predetermined condition are screened out from the N initial database use cases, where N1 is a positive integer less than or equal to N, and the first predetermined condition is that the error keywords are the same and only include one password parameter.
[0072] In operation S4322, N1 cryptographic parameters included in the N1 first database use cases are determined as first cryptographic parameters having an error conflict attribute.
[0073] According to an embodiment of the present invention, the N initial database use cases may include: M first database use cases including only a single password parameter. Since each first database use case includes only one password parameter, each first database use case only tests a single password parameter.
[0074] For the first database use case, the same error keyword represents that the error keyword of the single password parameter corresponding to the first database use case is the same. Therefore, for N1 first database use cases that meet the first predetermined condition, the N1 password parameters corresponding to the N1 first database use cases can be determined as the first password parameters with error conflict attributes.
[0075] In an illustrative embodiment, operation S4321 may be: first, M first database use cases including only a single password parameter are screened out from N initial database use cases; then, N1 first database use cases with the same error keyword are screened out from the M first database use cases. Alternatively, N1 first database use cases are directly screened out from the N initial database use cases. Subsequent screening operations are similar and will not be described in detail.
[0076] For example, take the four password parameters of password length password_min_length, password complexity password_format_option, reuse times password_reuse_max, and reuse time password_reuse_time as examples. Test the initial database use case of a single password parameter and the error message obtained is as follows:
[0077] The password length setting fails, and the error message is: ERROR 1802 (HY000) at line 10: Invalid password format, length should >= 8, which is recorded as error case A.
[0078] The password complexity setting fails and the error message is: ERROR 1802(HY000) at line 10: Invalidpassword format, length should >=0 and contain 'number' 'small letter' 'capital letter' 'special character', which is recorded as error case B.
[0079] The reuse count setting fails, and the error message is: ERROR 1830(HY000) at line 10: thepassword cannot be reused for user 'u2'@'%' , which is recorded as error case C.
[0080] The reuse time setting fails, and the error content is: ERROR 1830(HY000) at line 10: thepassword cannot be reused for user 'u2'@'%' , recorded as error information C.
[0081] It can be seen that for error situation C, when the reuse times and reuse time settings fail, the error information is consistent, and the reuse times and reuse time can be the first password parameters with error conflict attributes.
[0082] According to an embodiment of the present invention, based on cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: according to N1 first cryptographic parameters, P1 first combination database use cases obtained by orthogonal combination of at least two first cryptographic parameters are determined, where P1 is a positive integer less than P; and the P database use cases are simplified into (P-P1) target database use cases that do not include the P1 first combination database use cases, where (P-P1)=Q.
[0083] In an embodiment of the present invention, when the password parameter attribute is an error conflict attribute, since the error keywords of the N1 first password parameters are the same, for the P database use cases of the full orthogonal combination, the database use cases with the number of parameters in the range (1, N-N1+1] are not required, that is, only the database use cases with the minimum number of parameters (1) are covered. Therefore, the database use cases including a single first password parameter can be retained in the P database use cases, and the P1 first combination database use cases obtained by the orthogonal combination of at least two first password parameters are deleted.
[0084] P1 first combination database use cases include: an orthogonal combination of any two first cryptographic parameters among the N1 first cryptographic parameters, an orthogonal combination of any three first cryptographic parameters…N1 first cryptographic parameter combinations.
[0085] In another specific embodiment, for N1 first password parameters with the same error keyword, a special database use case can be generated according to demand.
[0086] The embodiment of the present invention analyzes the first password parameter with the error conflict attribute and simplifies P database use cases based on the analysis, thereby reducing the number of database use cases generated for the first password parameter and improving the test efficiency.
[0087] Figure 4B A flow chart for determining error parallel attributes according to an embodiment of the present invention is shown.
[0088] like Figure 4BAs shown, embodiment 400B is a specific embodiment for determining parallel attributes of error reporting, including operations S4323 to S4324.
[0089] In operation S4323, N2 second database use cases that meet the second predetermined condition are screened out from the N initial database use cases, where N2 is a positive integer less than or equal to N, and the second predetermined condition is: including at least two password parameters, and the error keyword includes error sub-keywords corresponding to the at least two password parameters respectively.
[0090] In operation S4324, N3 cryptographic parameters included in the N2 second database use cases are determined as second cryptographic parameters with an error reporting parallel attribute, where N3 is a positive integer less than or equal to M.
[0091] According to an embodiment of the present invention, the N initial database use cases include: database use cases formed by partial combinations of two cryptographic parameters that are orthogonal to each other among the M cryptographic parameters.
[0092] For example, still taking the four password parameters of password length, password complexity, reuse times, and reuse time as an example, the initial database use case with two orthogonal combinations of password parameters (no password complexity + reuse time setting failure, no reuse time + reuse times setting failure) is tested, and the error information obtained is as follows:
[0093] The password length and password complexity settings failed, and the error message was: ERROR 1802(HY000) at line 10: Invalid password format, length should >=8 and contain 'number' 'smallletter' 'capital letter' 'special character'. This is recorded as error case D.
[0094] The password length + reuse times setting failed, and the error message was: ERROR 1802 (HY000) at line 10: Invalid password format, length should >= 8, which is recorded as error case A.
[0095] The password length password_min_length + reuse time password_reuse_time failed to be set, and the error message was: ERROR 1802(HY000) at line 10: Invalid password format, length should >= 8, which is recorded as error case A.
[0096] The password complexity password_format_option + reuse count password_reuse_max settings failed, and the error message was: ERROR 1802(HY000) at line 10: Invalid password format, lengthshould >=0 and contain 'number' 'small letter' 'capital letter' 'specialcharacter', which is recorded as error case B.
[0097] Since each second database use case includes two password parameters, each first database use case can test two password parameters at the same time. For the second database use case, the error reporting keyword may include the following two situations: the same as the error reporting keyword including a single password parameter, and different from the error reporting keyword for each password parameter in the second database use case. If the error reporting keyword for each password parameter in the second database use case is different, multiple situations may occur, for example, the error reporting keyword includes error reporting sub-keywords corresponding to at least two password parameters respectively.
[0098] For example, when the error keyword of the second database use case includes error sub-keywords corresponding to at least two password parameters, the second database use case can test the failure of the test results of the two password parameters at the same time without the need for a database use case for a single password parameter.
[0099] Therefore, based on the above error situation D, the error sub-keywords are contain 'number' 'smallletter' 'capital letter' 'special character' and length should >= 8, which correspond to the password complexity and password length respectively. Therefore, the password complexity and password length are the second password parameters with parallel error attributes. In this case, N3 = 2. For other cases, N3 can be other values. For example, for three password parameter combinations, the error keyword includes the error sub-keywords corresponding to the three password parameters, then N3 = 3.
[0100] According to an embodiment of the present invention, based on the cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: according to N3 second cryptographic parameters, P2 second combination database use cases are determined, P2 is a positive integer less than P, and the second combination database use case is a database use case composed of at least one orthogonal combination of second cryptographic parameters but not including N3 second cryptographic parameter combinations; the P database use cases are simplified into (P-P2) target database use cases that do not include the P2 second combination database use cases, where (P-P2)=Q.
[0101] In an embodiment of the present invention, when the password parameter attribute is an error parallel attribute, since N3 second password parameters can be displayed together in the error message, the test contents of N3 second password parameters can be displayed together in the database use case. Therefore, for the P database use cases of the full orthogonal combination, only the database use cases covering all the second password parameters are required, and no other number of database use cases are required. Therefore, for the P2 second combination database use cases consisting of at least one orthogonal combination of the second password parameters but not including the N3 second password parameter combination, the P2 first combination database use cases can be deleted from the P database use cases, including the database use cases consisting of the N3 second password parameter combination.
[0102] P2 first combination database use cases include: a single second cryptographic parameter, an orthogonal combination of any two second cryptographic parameters among the N3 second cryptographic parameters, an orthogonal combination of any three second cryptographic parameters… (N3-1) second cryptographic parameter orthogonal combinations.
[0103] The embodiment of the present invention analyzes the second password parameter with an error reporting attribute and simplifies P database use cases based on the analysis, thereby reducing the number of database use cases generated for the second password parameter and improving test efficiency.
[0104] Figure 4C A flowchart showing the priority of an error report according to an embodiment of the present invention is shown.
[0105] like Figure 4C As shown, embodiment 400C is a specific embodiment for determining the error priority, including operations S4325 to S4326.
[0106] In operation S4325, N4 third database use cases that meet the third predetermined condition are screened out from the N initial database use cases, where N4 is a positive integer less than or equal to N, and the third predetermined condition is: including at least two password parameters, the error keyword is the same, and the error keyword corresponds to a password parameter.
[0107] In operation S4326, the cryptographic parameters corresponding to the error reporting keywords in the N4 third database use cases are determined as third cryptographic parameters with a high error reporting priority.
[0108] For an initial database use case including at least two password parameters, if its error keyword corresponds to only one of the at least two password parameters, then the initial database use case can only test the password parameter corresponding to the error keyword, and other password parameter configuration errors cannot be reflected by the error keyword. Therefore, the password parameter corresponding to the error keyword has a higher error priority than other password parameters in the initial database use case. Therefore, the password parameter corresponding to the error keyword in the N4 third database use cases is determined as the third password parameter with a high error priority.
[0109] For example, still taking the four password parameters of password length, password complexity, number of reuses, and reuse time as an example. Based on the error information of the two password parameters 2, the error keyword of error case A is the same as the error keyword of the single password length, and the error keyword of error case B is the same as the error keyword of the single password complexity. Therefore, password length and password complexity are the third password parameters with high error reporting priority. Number of reuses and reuse time are the fourth password parameters with low error reporting priority.
[0110] For each third database use case, a fourth password parameter with a high error reporting priority can be determined from at least two password parameters included, that is, N4 third password parameters with a high error reporting priority can be determined from N4 third database use cases.
[0111] That is, when the password strength (password length password_min_length / password complexity password_format_option) and password reuse (number of reuses password_reuse_max / reuse time password_reuse_time) parameters fail to be set at the same time, the error message is a password strength prompt.
[0112] According to an embodiment of the present invention, based on the cryptographic parameter attributes, P database use cases to be generated are simplified into Q target database use cases, including: determining P3 third combination database use cases according to N4 third cryptographic parameters, wherein the third combination database use case is obtained by orthogonal combination of at least (M-N4+1) third cryptographic parameters, and P3 is a positive integer less than P; determining P4 fourth combination database use cases according to (M-N4) fourth cryptographic parameters with low error reporting priority, wherein the fourth combination database use case is obtained by orthogonal combination of at least one and at most (M-N4) fourth cryptographic parameters, and P4 is a positive integer less than P; and using the third combination database use case and the fourth combination database use case as target database use cases, wherein P3+P4=Q.
[0113] When there are a third password parameters with high error reporting priority and b fourth password parameters with low error reporting priority, M=a+b, and a can be the above N4. The total number of database use cases is:
[0114] In the high error priority part, the number of database use cases P3=sum(MCi*(2^i)), i=M-a+1, M-a+2, ..., M; in the low error priority part, the number of database use cases P4=sum(bCi*(2^i)), i= 1, 2, ..., b, MCi and bCi are permutation operations.
[0115] Compared with the P database use cases obtained by orthogonally combining one, two, ... M of M cryptographic parameters, that is, P=sum(MCi*(2^i)), i=1, 2, ..., M, the number of target database use cases finally tested can be reduced by implementing the segmented combination of high error priority and low error priority.
[0116] Figure 5 A flowchart is shown for simplifying database use cases based on multiple password parameter attributes according to an embodiment of the present invention.
[0117] In a specific embodiment, N initial database use cases 503 are generated according to M cryptographic parameters 501. In addition, when all the M cryptographic parameters 501 are combined, P database use cases 502 can be obtained, and the N initial database use cases 503 are part of the P database use cases 502.
[0118] Afterwards, the test is completed by actually running N initial database use cases 503, and an error message 504 indicating a test failure is obtained. According to the error message 504, the password parameter attribute 505 of the password test scenario is determined, and based on the password parameter attribute 505, the P database use cases 502 are simplified into Q target database use cases 506.
[0119] The Q target database use cases 506 may be the same as the N initial database use cases 503; or, the Q target database use cases 506 include the N initial database use cases 503 and other database use cases; or, there are some identical database use cases between the two; or, the two are completely different.
[0120] In order to facilitate the understanding of the entire solution, the four password parameters of password length, password complexity, number of reuses, and reuse time are still used as examples. The P database use cases to be generated include at least:
[0121] Case of 1 password parameter: 4C1=4 (1 parameter setting succeeded, the rest failed), 4*2=8 database use cases.
[0122] Case of 2 password parameters: 4C2=6 (1 parameter is set successfully, the rest fail), 6*(2^2)=24 database use cases.
[0123] Case of 3 password parameters: 4C3=4 (1 parameter setting succeeded, the rest failed), 4*(2^3)=32 database use cases.
[0124] Case of 4 password parameters: 4C4=1 (1 parameter setting succeeded, the rest failed) 1*(2^4)=16 database use cases.
[0125] Sum, 8+24+32+16=80 database use cases. That is, when there are M password parameters, the number of database use cases P=sum(MCi*(2^i)), i=1, 2, ..., M.
[0126] After testing the above 8 initial database use cases and obtaining the error information, the error conflict attribute, error parallel attribute and error priority attribute can be determined respectively. In the case where the password parameter attributes include the error conflict attribute, error parallel attribute and error priority attribute at the same time, the high / low error priority can be processed first.
[0127] For the high error priority part, i can be 4-2+1=3 and 4-2+2=4, and the number of database use cases is 4C4*(2^4) +4C3*(2^3)=16+32. For the low error priority part, i can be 2-2+1=1 and 2-2+2=2, and the number of database use cases is 2C1*(2^1)+ 2C2*(2^2)=4+4.
[0128] Furthermore, with regard to the error parallel attribute, that is, error situation D, it can be seen that the password parameters are independent of each other, and the password length and password complexity have the error parallel attribute. For database use cases covering all four password parameters, the error information can be used to determine whether the password length and password complexity are executed successfully.
[0129] From the error conflict attribute, it can be seen that the error information of the parameters password with low error priority: the number of reuses and the reuse time are consistent. There is no need to generally cover the two password parameters, and only the database use case of one password parameter needs to be covered.
[0130] Therefore, further, when testing the password length and password complexity in high error priority at the same time, the error information can reflect these two factors, and the password length and password complexity can be directly tested in the database use case with the most password parameters, i=4 is retained, and i=3 is deleted. Since the error information cannot reflect these two factors when testing the number of reuses and reuse time in low error priority at the same time, it is necessary to operate the number of reuses and reuse time separately in the database use case of a single password parameter, and i=1 is retained.
[0131] In summary, through the error information, the 80 database use cases can be simplified to: the case of 4 password parameters: 4C4*(2^4)=16 database use cases; the case of 1 password parameter: 2C1*2=4 use cases, the sum = 20 database use cases.
[0132] In summary, in an embodiment of the present invention, since the initial database use case is a pre-built database use case with a failed test result, by running the initial database use case and obtaining the error information after the actual operation, the password parameter attributes of the M password parameters can be determined in a real environment, and then the P database use cases to be generated can be simplified based on the error information of the actual operation, thereby reducing the number of generated database use cases and improving testing efficiency.
[0133] Figure 6 A block diagram of an apparatus for simplifying database use cases based on error information according to an embodiment of the present invention is shown.
[0134] like Figure 6 As shown, the device 600 for simplifying database use cases based on error information includes a generation module 610 , a test module 620 , a determination module 630 and a simplification module 640 .
[0135] A generation module 610 is used to generate N initial database use cases with a test result of failure based on M password parameters of a password test scenario, where N is a positive integer greater than M, and M is a positive integer greater than 1. A test module 620 is used to test the N initial database use cases to obtain error information for each initial database use case when the test result is failure. A determination module 630 is used to determine the password parameter attributes of the password test scenario based on the error information. A simplification module 640 is used to simplify the P database use cases to be generated into Q target database use cases based on the password parameter attributes, wherein the P database use cases to be generated are obtained by combining at least one password parameter, P is a positive integer greater than N, and Q is a positive integer less than P.
[0136] It should be noted that the device part in the embodiment of the present invention corresponds to the method part in the embodiment of the present invention, and the specific method part of the description of the device part will not be repeated here.
[0137] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in 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, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be executed.
[0138] For example, any multiple of the generation module 610, the test module 620, the determination module 630, and the simplification module 640 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present invention, at least one of the generation module 610, the test module 620, the determination module 630, and the simplification module 640 can 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 can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the generating module 610 , the testing module 620 , the determining module 630 , and the simplifying module 640 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
[0139] Figure 7 A block diagram of an electronic device suitable for implementing a method for simplifying database use cases based on error reporting information according to an embodiment of the present invention is shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0140] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present invention includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 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.
[0141] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present invention by executing the programs in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present invention by executing the programs stored in the one or more memories.
[0142] According to an embodiment of the present invention, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0143] According to an embodiment of the present invention, the method flow according to an embodiment of the present invention can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present invention are executed. According to an embodiment of the present invention, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0144] 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.
[0145] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it 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.
[0146] For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .
[0147] An 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 provided by the embodiment of the present invention. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiment of the present invention.
[0148] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present invention are executed. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0149] 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 709, and / or installed from the removable medium 711. 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.
[0150] 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).
[0151] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different 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 flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present invention can be combined and / or combined in various ways, even if such a combination or combination is not explicitly recorded in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features recorded in the various embodiments of the present invention can be combined and / or combined in various ways. All these combinations and / or combinations fall within the scope of the present invention.
[0152] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A method for simplifying database use cases based on error information, characterized in that: The method comprises: According to the M password parameters of the password test scenario, N initial database use cases with test results of failure are generated, where N is a positive integer greater than M, and M is a positive integer greater than 1, and the N initial database use cases include: M database test cases of a single password parameter and database use cases of partial combinations of two orthogonal password parameters; Testing the N initial database use cases to obtain error information of each initial database use case when the test result is failure; Determining the password parameter attributes of the password test scenario according to the error information; and Based on the password parameter attributes, simplifying the P database use cases to be generated into Q target database use cases, wherein the P database use cases to be generated include a database use case of a single password parameter and a database use case obtained by combining at least two of the password parameters, P is a positive integer greater than N, and Q is a positive integer less than P; The determining, according to the error information, the password parameter attributes of the password test scenario includes: Determine error keywords from the error information of each of the initial database use cases; Determining the password parameter attribute according to the error reporting keyword; The password parameter attribute includes an error conflict attribute, and the determining the password parameter attribute according to the error keyword includes: Filtering out N1 first database use cases satisfying a first predetermined condition from the N initial database use cases, where N1 is a positive integer less than or equal to N, and the first predetermined condition is that the error reporting keywords are the same and only include one password parameter; Determine the N1 cryptographic parameters included in the N1 first database use cases as first cryptographic parameters having the error reporting conflict attribute; The method of simplifying the P database use cases to be generated into Q target database use cases based on the password parameter attributes includes: According to N1 first cryptographic parameters, determine P1 first combination database use cases obtained by orthogonal combination of at least two of the first cryptographic parameters, where P1 is a positive integer less than P; Simplify the P database use cases into (P-P1) target database use cases excluding P1 of the first combined database use cases, where (P-P1)=Q.
2. The method according to claim 1, characterized in that: The password parameter attributes further include: error reporting parallel attributes, wherein the password parameter attributes are determined according to the error reporting keywords, including: Filtering out N2 second database use cases satisfying a second predetermined condition from the N initial database use cases, where N2 is a positive integer less than or equal to N, and the second predetermined condition is: including at least two of the password parameters, and the error reporting keyword including error reporting sub-keywords corresponding to the at least two password parameters respectively; Determine the N3 password parameters included in the N2 second database use cases as the second password parameters with the error reporting parallel attribute, where N3 is a positive integer less than or equal to M.
3. The method according to claim 2, characterized in that The method of simplifying the P database use cases to be generated into Q target database use cases based on the password parameter attributes includes: Determine P2 second combination database use cases according to N3 second cryptographic parameters, where P2 is a positive integer less than P, and the second combination database use case is a database use case that is an orthogonal combination of at least one of the second cryptographic parameters but does not include N3 second cryptographic parameter combinations; Simplify the P database use cases into (P-P2) target database use cases excluding P2 second combined database use cases, where (P-P2)=Q.
4. The method according to claim 1, characterized in that: The password parameter attribute further includes: an error reporting priority, and the password parameter attribute is determined according to the error reporting keyword, including: Filtering out N4 third database use cases satisfying a third predetermined condition from the N initial database use cases, where N4 is a positive integer less than or equal to N, and the third predetermined condition is: including at least two of the password parameters, the error reporting keywords are the same, and the error reporting keyword corresponds to one of the password parameters; The password parameters corresponding to the error reporting keywords in N4 of the third database use cases are determined as third password parameters with a high error reporting priority.
5. The method according to claim 4, characterized in that The method of simplifying the P database use cases to be generated into Q target database use cases based on the password parameter attributes includes: Determine P3 third combination database use cases according to N4 third cryptographic parameters, wherein the third combination database use case is obtained by orthogonal combination of at least (M-N4+1) third cryptographic parameters, and P3 is a positive integer less than P; Determine P4 fourth combination database use cases according to the (M-N4) fourth cryptographic parameters with low error reporting priority, wherein the fourth combination database use case is obtained by orthogonally combining at least one and at most (M-N4) fourth cryptographic parameters, and P4 is a positive integer less than P; The third combined database use case and the fourth combined database use case are used as the target database use case, wherein P3+P4=Q.
6. A device for simplifying database use cases based on error information, characterized in that: The device comprises: A generation module, used to generate N initial database use cases with test results of failure according to M password parameters of the password test scenario, where N is a positive integer greater than M, M is a positive integer greater than 1, and the N initial database use cases include: M database test cases of a single password parameter and database use cases of orthogonal combinations of two password parameters; A testing module, used to test the N initial database use cases and obtain error information of each initial database use case when the test result is failure; A determination module, configured to determine the password parameter attributes of the password test scenario according to the error message; and A simplification module, configured to simplify P database use cases to be generated into Q target database use cases based on the password parameter attributes, wherein the P database use cases to be generated include database use cases of a single password parameter and database use cases obtained by combining at least two of the password parameters, P is a positive integer greater than N, and Q is a positive integer less than P; The determination module is further used to determine error keywords from the error information of each of the initial database use cases; determine the password parameter attributes according to the error keywords, and the password parameter attributes include error conflict attributes; Determining the password parameter attribute according to the error reporting keyword includes: Filtering out N1 first database use cases satisfying a first predetermined condition from the N initial database use cases, where N1 is a positive integer less than or equal to N, and the first predetermined condition is that the error reporting keywords are the same and only include one password parameter; Determine the N1 cryptographic parameters included in the N1 first database use cases as first cryptographic parameters having the error reporting conflict attribute; The method of simplifying the P database use cases to be generated into Q target database use cases based on the password parameter attributes includes: According to N1 first cryptographic parameters, determine P1 first combination database use cases obtained by orthogonal combination of at least two of the first cryptographic parameters, where P1 is a positive integer less than P; Simplify the P database use cases into (P-P1) target database use cases excluding P1 of the first combined database use cases, where (P-P1)=Q.
7. An electronic device comprising: one or more processors; a memory for storing one or more programs, It is characterized in that when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Database test method, database system, electronic equipment and storage medium
CN116089275A