Test case generation method and test case generation device
By constructing and analyzing the scene element matrix and combining the greedy algorithm to generate test cases, the problem of inaccurate generation of test cases in banking system tests in the financial field is solved, and the accuracy and efficiency of the test are improved.
Patent Information
- Application Number
- CN202411440273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-10
AI Technical Summary
In the testing of banking systems in the financial field, it is difficult for the existing technology to generate comprehensive and accurate test cases, resulting in insufficient coverage and insufficient abnormal scenario identification.
By obtaining personnel attribute elements, basic data elements and system operation elements, building an initial scene element matrix and determining their association relationship, using greedy algorithms to arrange and combine, generating a target scene element matrix, and finally generating it according to the operation steps of the matrix and business system Test cases.
It improves the accuracy and efficiency of test cases, reduces manual writing errors, ensures the accuracy and correlation accuracy of test results, fully combines system logic and business logic, and solves the problem of inaccurate generation of test cases.
Smart Images

Figure CN119292933A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a test case generation method, a test case generation device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the financial field, products involving approval have the characteristics of long processes, complex rule logic, and multiple system interactions. The implementation of banking system testing tasks depends on the testers' understanding of business processes and system rules. Otherwise, it will lead to problems such as incomplete coverage of test cases and insufficient identification of abnormal scenarios.
[0003] Therefore, there is an urgent need for a method to solve the technical problem that the generation of test cases in the prior art is not accurate enough. Summary of the invention
[0004] The main purpose of the present application is to provide a test case generation method, a test case generation device, a computer-readable storage medium and a computer program product, so as to at least solve the problem of inaccurate test case generation in the prior art.
[0005] According to one aspect of the present application, a method for generating a test case is provided, the method being applied to a business system, the method comprising: obtaining personnel attribute elements, basic data elements, and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of users of the business system, the basic data elements include data used in the business system in processing business, and the system operation elements include operations performed by the user in the business system; constructing an initial scenario element matrix based on the personnel attribute elements, the basic data elements, and the system operation elements, wherein the initial scenario element matrix includes a plurality of rows and a plurality of columns, and the initial scenario element matrix is related to the The method comprises the following steps: matching the requirements specification of the business system with that of the scenario element matrix; obtaining the characteristics of each column in the initial scenario element matrix, and determining the association relationship between any two scenario elements in the initial scenario element matrix, wherein the association relationship includes one of a mutually exclusive relationship, a strong association relationship, a forward relationship and a reverse relationship, and the scenario element is one of the personnel attribute element, the basic data element and the system operation element; using a greedy algorithm to arrange and combine the scenario elements according to the characteristics and the association relationship to obtain a target scenario element matrix; obtaining the operation steps of the business system, and generating test cases based at least on the target scenario element matrix and the operation steps.
[0006] Optionally, obtaining personnel attribute elements, basic data elements and system operation elements includes: obtaining at least one of the organization to which the user belongs, the user's permissions and the user's position in the business system to obtain the personnel attribute elements; obtaining at least one of the flow process of the data in the business system and the processing process of the data in the business system to obtain the basic data elements; obtaining one of the user's input field and the user's operation process to obtain the system operation elements.
[0007] Optionally, constructing an initial scene element matrix based on the personnel attribute elements, the basic data elements and the system operation elements includes: obtaining multiple initial elements corresponding to different relationships triggered by the same scene element; arranging the multiple initial elements into the same column according to the equivalence class principle, wherein different columns correspond to different scene elements.
[0008] Optionally, obtaining the characteristics of each column in the initial scene element matrix includes: determining the characteristics of the column according to the importance of the scene elements in the column, wherein the characteristics include a full arrangement and a cross-combination arrangement, and the importance of the scene elements in the column corresponding to the full arrangement is greater than the importance of the scene elements in the column corresponding to the cross-combination arrangement.
[0009] Optionally, determining the association relationship between any two scene elements in the initial scene element matrix includes: when the two scene elements cannot be true or exist at the same time, determining that the association relationship between the two scene elements is the mutually exclusive relationship; when the change of one scene element affects the change of another scene element, determining that the association relationship between the two scene elements is the strong association relationship; when there is a positive correlation between the two scene elements, determining that the association relationship between the two scene elements is the positive relationship; when there is a negative correlation between the two scene elements, determining that the association relationship between the two scene elements is the negative relationship.
[0010] Optionally, a test case is generated based at least on the target scene element matrix and the operation steps, including: an acquisition step of acquiring multiple target elements in the same row of the target scene element matrix; a generation step of arranging the multiple target elements in the order of the operation steps to generate a test case; a repetition step of repeating the acquisition step and the generation step at least once in sequence, and in the repetition process, traversing each row in the target scene element matrix in sequence until all rows in the target scene element matrix are traversed to obtain multiple test cases.
[0011] Optionally, after generating a test case at least based on the target scenario element matrix and the operation steps, the method further includes: inputting the test case into the business system to obtain an actual test result corresponding to the test case; obtaining an expected result corresponding to the test case; comparing the actual test result with the expected result, and determining that the test case has been successfully tested if the actual test result is the same as the expected result; and determining that the test case has failed if the actual test result is different from the expected result.
[0012] According to another aspect of the present application, a test case generation device is provided, which is applied to a business system, and the device includes: an acquisition unit, used to acquire personnel attribute elements, basic data elements and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of users of the business system, the basic data elements include data used in the business system to process business, and the system operation elements include operations performed by the user in the business system; a construction unit, used to construct an initial scenario element matrix based on the personnel attribute elements, the basic data elements and the system operation elements, wherein the initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix is consistent with the business system The system requirement specification is matched; a determination unit is used to obtain the characteristics of each column in the initial scenario element matrix, and determine the association relationship between any two scenario elements in the initial scenario element matrix, wherein the association relationship includes one of a mutually exclusive relationship, a strong association relationship, a positive relationship and a negative relationship, and the scenario element is one of the personnel attribute element, the basic data element and the system operation element; a combination unit is used to use a greedy algorithm to arrange and combine the scenario elements according to the characteristics and the association relationship to obtain a target scenario element matrix; a generation unit is used to obtain the operation steps of the business system, and generate test cases based on at least the target scenario element matrix and the operation steps.
[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0014] According to another aspect of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods described are implemented.
[0015] Applying the technical solution of the present application, a method for generating a test case is provided. First, personnel attribute elements, basic data elements and system operation elements are obtained; then, an initial scenario element matrix is constructed based on the personnel attribute elements, basic data elements and system operation elements. The initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix matches the business system's requirement specification; then, the characteristics of each column in the initial scenario element matrix are obtained, and the association relationship between any two scenario elements in the initial scenario element matrix is determined; a greedy algorithm is used to arrange and combine the scenario elements according to the characteristics and the association relationship to obtain a target scenario element matrix; finally, the operation steps of the business system are obtained, and a test case is generated based on at least the target scenario element matrix and the operation steps. The three elements of personnel attribute elements, basic data elements and system operation elements are identified based on real business scenarios, and the initial scenario element matrix is refined based on these elements. By setting the association relationship between elements, the system logic in the business system's requirement specification can be reflected. Finally, the scenario elements with set association relationships are combined and automatically replaced with a test case. This can reduce the errors caused by manually writing test cases one by one on the basis of improving efficiency, and can further ensure that only the accuracy of element extraction and the correctness of element association need to be focused in later inspections and reviews. It can fully combine the requirement instantiation analysis of system logic and business logic, and solve the technical problem of inaccurate test case generation in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for generating a test case provided in an embodiment of the present application is shown;
[0018] Figure 2 A schematic diagram of a flow chart of a method for generating a test case provided according to an embodiment of the present application is shown;
[0019] Figure 3 A specific flow chart of a method for generating a test case provided in accordance with an embodiment of the present application is shown;
[0020] Figure 4 A structural block diagram of a test case generation device provided according to an embodiment of the present application is shown.
[0021] The above drawings include the following reference numerals:
[0022] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] As introduced in the background technology, the generation of test cases in the prior art is not accurate enough. To solve the above problem, the embodiments of the present application provide a test case generation method, a test case generation device, a computer-readable storage medium and a computer program product.
[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal of a method for generating a test case according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the test case generation method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] In this embodiment, a method for generating test cases running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] Figure 2 FIG. 1 is a flow chart of a method for generating a test case according to an embodiment of the present application. Figure 2 As shown, the above method is applied to a business system, and the method comprises the following steps:
[0032] Step S201, obtaining personnel attribute elements, basic data elements and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of users of the business system, the basic data elements include data used by the business system in processing business, and the system operation elements include operations performed by the users in the business system;
[0033] Specifically, the above-mentioned personnel attribute elements, basic data elements and system operation elements are extracted based on different actual business scenarios.
[0034] Step S202, constructing an initial scenario element matrix according to the personnel attribute elements, the basic data elements and the system operation elements, wherein the initial scenario element matrix includes a plurality of rows and a plurality of columns, and the initial scenario element matrix matches the requirement specification of the business system;
[0035] Specifically, a plurality of different personnel attribute elements, the above basic data elements and the above system operation elements are arranged in order in the first row of the initial scenario element matrix. In practical applications, there may be a problem that the element columns of the initial scenario element matrix are incomplete or incomplete. The requirement specification can be further refined to cover the omitted scenarios or rules, and the above initial scenario element matrix matching the requirement specification can be obtained.
[0036] Step S203, obtaining the features of each of the above columns in the above initial scene element matrix, and determining the association relationship between any two scene elements in the above initial scene element matrix, wherein the above association relationship includes one of a mutually exclusive relationship, a strong association relationship, a positive relationship and a negative relationship, and the above scene element is one of the above personnel attribute element, the above basic data element and the above system operation element;
[0037] Specifically, according to the rules described in the requirements specification and the test strategy, different scenario elements are marked with corresponding associations to form a scenario element rule set. When two events cannot occur at the same time, there is a mutually exclusive relationship between them. When the correlation between two variables is very strong, there is a strong association between them. When there is a positive correlation between two variables, an increase in one variable is usually accompanied by an increase in the other variable. This relationship indicates that there is a direct, positive connection between the variables. When there is a negative correlation between two variables, an increase in one variable is usually accompanied by a decrease in the other variable. This relationship indicates that there is an opposite connection between the variables.
[0038] Step S204, using a greedy algorithm to arrange and combine the scene elements according to the features and the associations to obtain a target scene element matrix;
[0039] Specifically, a greedy algorithm is a method for solving optimization problems that takes the best or optimal choice in the current state at each step, hoping to lead to a result that is the best or optimal in the world. A greedy algorithm is not guaranteed to produce an optimal solution, but in some cases, it can produce very good solutions. The implementation of a greedy algorithm is usually relatively simple, but it should be noted that the solution obtained by a greedy algorithm is not necessarily the global optimal solution. On some problems, a greedy algorithm may only find an approximate solution.
[0040] Step S205, obtaining the operation steps of the above business system, and generating a test case at least based on the above target scenario element matrix and the above operation steps.
[0041] Specifically, the above-mentioned elements are sorted according to specific operation steps. Each element corresponds to a combination of an operation step and an expected result. Multiple steps are combined into a scenario use case according to the order of different elements.
[0042] Through this embodiment, a method for generating a test case is provided. First, personnel attribute elements, basic data elements and system operation elements are obtained; then, an initial scenario element matrix is constructed based on the personnel attribute elements, basic data elements and system operation elements. The initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix matches the business system's requirement specification; then, the characteristics of each column in the initial scenario element matrix are obtained, and the association relationship between any two scenario elements in the initial scenario element matrix is determined; a greedy algorithm is used to arrange and combine the scenario elements according to the characteristics and the association relationship to obtain a target scenario element matrix; finally, the operation steps of the business system are obtained, and a test case is generated based on at least the target scenario element matrix and the operation steps. The three elements of personnel attribute elements, basic data elements and system operation elements are identified based on real business scenarios, and the initial scenario element matrix is refined based on these elements. By setting the association relationship between elements, the system logic in the business system's requirement specification can be reflected. Finally, the scenario elements with set association relationships are combined and automatically replaced with a test case. This can reduce the errors caused by manually writing test cases one by one on the basis of improving efficiency, and can further ensure that only the accuracy of element extraction and the correctness of element association need to be focused in later inspections and reviews. It can fully combine the requirement instantiation analysis of system logic and business logic, and solve the technical problem of inaccurate test case generation in the prior art.
[0043] In the specific implementation process, the above step S201 can be implemented by the following steps: Step S2011, obtaining at least one of the organization to which the above user belongs, the authority of the above user, and the position of the above user in the above business system, to obtain the above personnel attribute element; Step S2012, obtaining at least one of the flow process of the above data in the above business system and the processing process of the above data in the above business system, to obtain the above basic data element; Step S2013, obtaining one of the input field of the above user and the operation flow of the above user, to obtain the above system operation element. This method can further quickly obtain the three scenario elements of the above personnel attribute element, basic data element and system operation element.
[0044] Specifically, in addition to the user's organization, the user's authority, and the user's position in the business system, other information related to the user's identity information can also be obtained as the personnel attribute elements. In the credit system, customer information or loan information can be the basic data elements. The system operation elements can be input single fields or several steps in the system. You can also refer to the requirements specification to extract key operations that can trigger system rules or affect the branch path of the approval process.
[0045] In order to further quickly establish the above-mentioned initial scene element matrix, the above-mentioned step S202 of the present application can be implemented through the following steps: step S2021, obtaining multiple initial elements corresponding to different relationships triggered by the same above-mentioned scene element; step S2022, arranging the multiple above-mentioned initial elements into the same above-mentioned column according to the equivalence class principle, wherein different above-mentioned columns correspond to different above-mentioned scene elements.
[0046] Specifically, the equivalence class principle means that for each element, the equivalence class partitioning method is used to identify different rules or conditions. The equivalence class partitioning method is a black box testing method that divides all possible input data of the program into several equivalence classes and selects representative data from each equivalence class as test cases. This ensures that the elements in each equivalence class have equivalent effects in program processing.
[0047] In some embodiments, the above step S203 can be specifically implemented by the following steps: Step S2031, according to the importance of the above scene elements in the above column, determine the characteristics of the above column, wherein the above characteristics include full arrangement and cross combination arrangement, and the importance of the above scene elements in the above column corresponding to the above full arrangement is greater than the importance of the above scene elements in the above column corresponding to the cross combination arrangement. This method can further quickly obtain the characteristics of each of the above columns.
[0048] Specifically, cross-combination permutation and full permutation are concepts in the field of permutations and combinations in mathematics. Full permutation refers to the process of taking m (m≤n) elements from n different elements and arranging them in a certain order. Regardless of whether there are repeated elements, each permutation of these m elements is called a full permutation. Cross-combination permutation is usually used to describe the formation of a new permutation or sequence through different combinations of a group of elements. In this permutation, different elements or groups of elements can be cross-combined to generate new combinations.
[0049] The above step S203 can also be implemented in other ways, for example: step S2032, when the two scene elements cannot be true at the same time or cannot exist at the same time, determine that the association relationship between the two scene elements is the above mutually exclusive relationship; step S2033, when the change of one scene element affects the change of another scene element, determine that the association relationship between the two scene elements is the above strong association relationship; step S2034, when there is a positive correlation between the two scene elements, determine that the association relationship between the two scene elements is the above positive relationship; step S2035, when there is a negative correlation between the two scene elements, determine that the association relationship between the two scene elements is the above negative relationship. This method can further quickly determine the association relationship between any two scene elements in the above initial scene element matrix.
[0050] Specifically, the result of a coin toss is heads or tails, and these two results cannot occur at the same time, so the two results of a coin toss are mutually exclusive. A strong correlation indicates that changes in one variable can strongly predict changes in another variable. As education levels increase, income usually increases, so education levels and income may be positively related. As work hours increase, the time individuals spend on leisure activities usually decreases, so the relationship between work hours and leisure activities is an inverse relationship.
[0051] The above step S205 can be implemented by the following steps, for example: step S2051, an acquisition step, acquiring multiple target elements in the same row of the above target scene element matrix; step S2052, a generation step, arranging the multiple target elements in the order of the above operation steps to generate the above test case; step S2053, a repeating step, repeating the above acquisition step and the above generation step at least once in sequence, and in the repetition process, traversing each row in the above target scene element matrix in sequence until all rows in the above target scene element matrix are traversed to obtain multiple test cases. This method can further quickly generate multiple test cases.
[0052] Specifically, by combining scenario elements with set association relationships and automatically replacing each line of scenario use case elements with a test case, it can not only improve efficiency but also reduce errors caused by manual writing of use cases one by one, ensuring that only the accuracy of element extraction and the correctness of element association need to be focused on during later inspections and reviews.
[0053] After the above step S205, the above method further includes: step S206, inputting the above test case into the above business system to obtain the actual test result corresponding to the above test case; step S207, obtaining the expected result corresponding to the above test case; step S208, comparing the above actual test result with the above expected result, and determining that the above test case is successfully tested if the above actual test result is the same as the above expected result; step S209, determining that the above test case is failed if the above actual test result is not the same as the above expected result. This method can further improve the test efficiency of test cases.
[0054] In actual applications, a mapping table between scenario elements, operation steps, and expected results can be compiled to convert scenario element rows into test case steps and expected results.
[0055] In another specific embodiment, taking the ATM withdrawal scenario as an example, the rules in the actual application scenario include the following:
[0056] 1. Support debit and credit cards of this bank and other banks, but do not support special-shaped cards (this bank does not issue special-shaped cards);
[0057] 2. A 2% handling fee will be charged for cash withdrawals with other bank cards;
[0058] 3. If you enter your password three times to cancel your card, you will not be allowed to try your password again within 24 hours;
[0059] 4. The withdrawal amount should be less than or equal to the card balance and the ATM cash box balance at the same time, otherwise an error will be reported;
[0060] 5. ATM supports printing receipts. If the ATM lacks receipt paper, it allows withdrawals but does not allow printing receipts.
[0061] The initial scenario element matrix is constructed as shown in Table 1. Card types include debit cards, credit cards and special-shaped cards. The above-mentioned institutions include this bank and other banks. Password verification includes correct input, re-entry after failed input, failure for more than 3 times and direct card return without password input. Card balance verification includes withdrawal amount less than card balance, withdrawal amount equal to card balance and withdrawal amount greater than card balance. ATM balance verification includes withdrawal amount less than ATM balance, withdrawal amount equal to ATM balance and withdrawal amount greater than ATM balance. Whether withdrawal is allowed includes allow and reject error. Whether to print receipt includes yes and no. Receipt paper verification includes paper and no paper.
[0062] Table 1
[0063]
[0064] Get the features of each column in the initial scenario element matrix, among which the card type, institution, password verification, card balance verification and ATM balance verification are all arranged, and whether to print the receipt and receipt paper verification are cross-combination arranged. Set the password verification to fail more than 3 times, not allow the password to be directly returned, re-enter after failed input, whether to allow cash withdrawal to be rejected, and whether to print the receipt to be rejected as negative use cases, and the others are defaulted as positive use cases. According to the rules in the actual application scenario, set the special-shaped card and not allow the password to be directly returned as a strong binding relationship; the cash withdrawal amount greater than the card balance in the card balance verification and the rejection error are a strong binding relationship, and the cash withdrawal amount greater than the ATM balance in the ATM balance verification and the rejection error are a strong binding relationship. Set the special-shaped card and this line as mutually exclusive, and set the cash withdrawal amount less than the ATM balance in the ATM balance verification, the cash withdrawal amount equal to the ATM balance and the rejection error in whether to allow cash withdrawal to be mutually exclusive. As shown in Table 2, arrange from left to right, identify the special-shaped card and this line as mutually exclusive, and automatically skip the mutually exclusive rules and do not combine.
[0065] Table 2
[0066] Card Type Affiliations Debit Card The Bank Credit Card The Bank Special-shaped card He can Debit Card He can Credit Card He can
[0067] As shown in Table 3, continue to combine to the right, and after identifying the strong binding relationship, the row will not be combined with other elements.
[0068] Table 3
[0069] Card Type Affiliations Password verification Debit Card The Bank Input is correct Credit Card The Bank Input is correct Special-shaped card He can Do not allow to enter password to directly withdraw the card Debit Card He can Input is correct Credit Card He can Input is correct Debit Card The Bank Try again after input failure Credit Card The Bank Try again after input failure Debit Card He can Try again after input failure Credit Card He can Try again after input failure Debit Card The Bank Failed 3 times or more Credit Card The Bank Failed 3 times or more Debit Card He can Failed 3 times or more Credit Card He can Failed 3 times or more
[0070] As shown in Table 4, the counter-example setting is identified and the row no longer participates in the subsequent column combination.
[0071] Table 4
[0072]
[0073]
[0074] Continue the full permutation until the end, as shown in Table 5.
[0075] Table 5
[0076]
[0077]
[0078]
[0079] The cross-combination column elements are supplemented in order without generating additional rows. When rule elements are identified, if they are strongly bound, the binding value is assigned; if they are mutually exclusive, the next value is skipped to generate a complete matrix, as shown in Table 6.
[0080] Table 6
[0081]
[0082]
[0083]
[0084]
[0085] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the test case generation method of the present application will be described in detail below in conjunction with specific embodiments.
[0086] This embodiment relates to a specific test case generation method, such as Figure 3 As shown, the following steps are included:
[0087] Step S1: Extract the elements (level + position + data + multi-step operation) that trigger the rules or branch processes in the required rules according to the operation sequence according to the business scenario processing flow;
[0088] Step S2: Arrange the extracted element names in the first row of the matrix diagram in order, and sort the options that trigger different rules under the same element into a column according to the equivalence class principle in combination with the required rules to form a scenario rule set;
[0089] Step S3: Determine whether the element rules are fully adapted to the production scenario. If not, notify the demand personnel to supplement the missing rules and execute step S2. If yes, execute step S4.
[0090] Step S4: set the traversal column and the cross-combination column according to the importance of each column element, and set the mutual exclusion and strong association rules between different elements;
[0091] Step S5: According to the greedy algorithm, the elements are arranged and combined according to the configured rules to form a scenario matrix table, where each row of elements represents a scenario use case;
[0092] Step S6: Manually compile a mapping table between scenario elements, operation steps and expected results, and convert scenario element rows into test case steps and expected results.
[0093] The present application embodiment also provides a test case generation device. It should be noted that the test case generation device of the present application embodiment can be used to execute the test case generation method provided by the present application embodiment. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and contemplated.
[0094] The following is an introduction to the test case generation device provided in the embodiment of the present application.
[0095] Figure 4 Schematic diagram of a test case generation device according to an embodiment of the present application. The above device is applied to a business system, such as Figure 4 As shown, the device comprises:
[0096] The acquisition unit 10 is used to acquire personnel attribute elements, basic data elements and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of the users of the business system, the basic data elements include data used in the business system in processing business, and the system operation elements include operations performed by the users in the business system;
[0097] Specifically, the above-mentioned personnel attribute elements, basic data elements and system operation elements are extracted based on different actual business scenarios.
[0098] A construction unit 20, configured to construct an initial scenario element matrix according to the personnel attribute elements, the basic data elements, and the system operation elements, wherein the initial scenario element matrix includes a plurality of rows and a plurality of columns, and the initial scenario element matrix matches the requirement specification of the business system;
[0099] Specifically, a plurality of different personnel attribute elements, the above basic data elements and the above system operation elements are arranged in order in the first row of the initial scenario element matrix. In practical applications, there may be a problem that the element columns of the initial scenario element matrix are incomplete or incomplete. The requirement specification can be further refined to cover the omitted scenarios or rules, and the above initial scenario element matrix matching the requirement specification can be obtained.
[0100] The determination unit 30 is used to obtain the characteristics of each of the above columns in the above initial scene element matrix, and determine the association relationship between any two scene elements in the above initial scene element matrix, wherein the above association relationship includes one of a mutually exclusive relationship, a strong association relationship, a positive relationship and a negative relationship, and the above scene element is one of the above personnel attribute element, the above basic data element and the above system operation element;
[0101] Specifically, according to the rules described in the requirements specification and the test strategy, different scenario elements are marked with corresponding associations to form a scenario element rule set. When two events cannot occur at the same time, there is a mutually exclusive relationship between them. When the correlation between two variables is very strong, there is a strong association between them. When there is a positive correlation between two variables, an increase in one variable is usually accompanied by an increase in the other variable. This relationship indicates that there is a direct, positive connection between the variables. When there is a negative correlation between two variables, an increase in one variable is usually accompanied by a decrease in the other variable. This relationship indicates that there is an opposite connection between the variables.
[0102] A combining unit 40 is used to arrange and combine the scene elements according to the above characteristics and the above association relationships by using a greedy algorithm to obtain a target scene element matrix;
[0103] Specifically, a greedy algorithm is a method for solving optimization problems that takes the best or optimal choice in the current state at each step, hoping to lead to a result that is the best or optimal in the world. A greedy algorithm is not guaranteed to produce an optimal solution, but in some cases, it can produce very good solutions. The implementation of a greedy algorithm is usually relatively simple, but it should be noted that the solution obtained by a greedy algorithm is not necessarily the global optimal solution. On some problems, a greedy algorithm may only find an approximate solution.
[0104] The generating unit 50 is used to obtain the operation steps of the above-mentioned business system, and generate a test case at least according to the above-mentioned target scenario element matrix and the above-mentioned operation steps.
[0105] Specifically, the above-mentioned elements are sorted according to specific operation steps. Each element corresponds to a combination of an operation step and an expected result. Multiple steps are combined into a scenario use case according to the order of different elements.
[0106] Through this embodiment, a test case generation device is provided, wherein the acquisition unit acquires personnel attribute elements, basic data elements and system operation elements; the construction unit constructs an initial scenario element matrix according to the personnel attribute elements, basic data elements and system operation elements, wherein the initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix matches the business system's requirement specification; the determination unit acquires the characteristics of each column in the initial scenario element matrix, and determines the association relationship between any two scenario elements in the initial scenario element matrix; the combination unit arranges and combines the scenario elements according to the characteristics and the association relationship using a greedy algorithm to obtain a target scenario element matrix; the generation unit acquires the operation steps of the business system, and generates a test case at least according to the target scenario element matrix and the operation steps. The three elements of personnel attribute elements, basic data elements and system operation elements are identified based on real business scenarios, and the initial scenario element matrix is extracted based on these elements. By setting the association relationship between elements, the system logic in the business system's requirement specification can be reflected. Finally, the scenario elements with set association relationships are combined and automatically replaced with a test case. This can reduce the errors caused by manually writing test cases one by one on the basis of improving efficiency, and can further ensure that only the accuracy of element extraction and the correctness of element association need to be focused in later inspections and reviews. It can fully combine the requirement instantiation analysis of system logic and business logic, and solve the technical problem of inaccurate test case generation in the prior art.
[0107] In the specific implementation process, the acquisition unit includes a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used to acquire at least one of the organization to which the user belongs, the authority of the user and the position of the user in the business system to obtain the personnel attribute element; the second acquisition module is used to acquire at least one of the flow process of the data in the business system and the processing process of the data in the business system to obtain the basic data element; the third acquisition module is used to acquire one of the input field of the user and the operation process of the user to obtain the system operation element. The device can further quickly acquire the three scenario elements of the personnel attribute element, the basic data element and the system operation element.
[0108] Specifically, in addition to the user's organization, the user's authority, and the user's position in the business system, other information related to the user's identity information can also be obtained as the personnel attribute elements. In the credit system, customer information or loan information can be the basic data elements. The system operation elements can be input single fields or several steps in the system. You can also refer to the requirements specification to extract key operations that can trigger system rules or affect the branch path of the approval process.
[0109] In order to further quickly establish the above-mentioned initial scene element matrix, the above-mentioned construction unit of the present application includes a fourth acquisition module and an arrangement module, wherein the fourth acquisition module is used to obtain multiple initial elements corresponding to different relationships triggered by the same above-mentioned scene element; the arrangement module is used to arrange the multiple above-mentioned initial elements into the same above-mentioned column according to the equivalence class principle, wherein different above-mentioned columns correspond to different above-mentioned scene elements.
[0110] Specifically, the equivalence class principle means that for each element, the equivalence class partitioning method is used to identify different rules or conditions. The equivalence class partitioning method is a black box testing method that divides all possible input data of the program into several equivalence classes and selects representative data from each equivalence class as test cases. This ensures that the elements in each equivalence class have equivalent effects in program processing.
[0111] In some embodiments, the determination unit includes a first determination module, which is used to determine the characteristics of the column according to the importance of the scene elements in the column, wherein the characteristics include full arrangement and cross-combination arrangement, and the importance of the scene elements in the column corresponding to the full arrangement is greater than the importance of the scene elements in the column corresponding to the cross-combination arrangement. The device can further quickly obtain the characteristics of each column.
[0112] Specifically, cross-combination permutation and full permutation are concepts in the field of permutations and combinations in mathematics. Full permutation refers to the process of taking m (m≤n) elements from n different elements and arranging them in a certain order. Regardless of whether there are repeated elements, each permutation of these m elements is called a full permutation. Cross-combination permutation is usually used to describe the formation of a new permutation or sequence through different combinations of a group of elements. In this permutation, different elements or groups of elements can be cross-combined to generate new combinations.
[0113] The above-mentioned determination unit also includes a second determination module, a third determination module, a fourth determination module and a fifth determination module, wherein the second determination module is used to determine that the association relationship between the two above-mentioned scene elements is the above-mentioned mutually exclusive relationship when the two above-mentioned scene elements cannot be true at the same time or cannot exist at the same time; the third determination module is used to determine that the association relationship between the two above-mentioned scene elements is the above-mentioned strong association relationship when the change of one above-mentioned scene element affects the change of another above-mentioned scene element; the fourth determination module is used to determine that the association relationship between the two above-mentioned scene elements is the above-mentioned positive relationship when there is a positive correlation between the two above-mentioned scene elements; the fifth determination module is used to determine that the association relationship between the two above-mentioned scene elements is the above-mentioned negative relationship when there is a negative correlation between the two above-mentioned scene elements. The device can further quickly determine the association relationship between any two scene elements in the above-mentioned initial scene element matrix.
[0114] Specifically, the result of a coin toss is heads or tails, and these two results cannot occur at the same time, so the two results of a coin toss are mutually exclusive. A strong correlation indicates that changes in one variable can strongly predict changes in another variable. As education levels increase, income usually increases, so education levels and income may be positively related. As work hours increase, the time individuals spend on leisure activities usually decreases, so the relationship between work hours and leisure activities is an inverse relationship.
[0115] The generation unit includes a fifth acquisition module, a generation module, and a repetition module, wherein the fifth acquisition module is used for the acquisition step, acquiring multiple target elements of the same row in the target scene element matrix; the generation module is used for the generation step, arranging the multiple target elements in the order of the operation steps, and generating one of the test cases; the repetition module is used for the repetition step, repeating the acquisition step and the generation step at least once in sequence, and in the repetition process, traversing each row in the target scene element matrix in sequence until all rows in the target scene element matrix are traversed to obtain multiple test cases. The device can further quickly generate multiple test cases.
[0116] Specifically, by combining scenario elements with set association relationships and automatically replacing each line of scenario use case elements with a test case, it can not only improve efficiency but also reduce errors caused by manual writing of use cases one by one, ensuring that only the accuracy of element extraction and the correctness of element association need to be focused on during later inspections and reviews.
[0117] The device also includes an input unit, a first processing unit, a second processing unit, and a third processing unit, wherein the input unit is used to input the test case into the business system to obtain the actual test result corresponding to the test case; the first processing unit is used to obtain the expected result corresponding to the test case; the second processing unit is used to compare the actual test result with the expected result, and when the actual test result and the expected result are the same, determine that the test case is tested successfully; the third processing unit is used to determine that the test case is tested failed when the actual test result and the expected result are different. The device can further improve the test efficiency of the test case.
[0118] In actual applications, a mapping table between scenario elements, operation steps, and expected results can be compiled to convert scenario element rows into test case steps and expected results.
[0119] The test case generation device includes a processor and a memory. The acquisition unit, construction unit, determination unit, combination unit, and generation unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0120] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and test cases can be generated by adjusting kernel parameters.
[0121] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0122] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the test case generation method.
[0123] An embodiment of the present invention provides a processor, which is used to run a program, wherein the test case generation method is executed when the program is running.
[0124] An embodiment of the present invention provides a device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements at least the steps of the test case generation method described above when executing the program. The device in this article may be a server, a PC, a PAD, a mobile phone, etc.
[0125] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the steps of the above-mentioned test case generation method:
[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0131] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0133] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0134] 1) The method for generating test cases of the present application, first, obtain personnel attribute elements, basic data elements and system operation elements; then, construct an initial scenario element matrix based on the personnel attribute elements, basic data elements and system operation elements, the initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix matches the business system's requirement specification; then, obtain the characteristics of each column in the initial scenario element matrix, and determine the association between any two scenario elements in the initial scenario element matrix; use a greedy algorithm to arrange and combine the scenario elements according to the characteristics and associations to obtain a target scenario element matrix; finally, obtain the operation steps of the business system, and generate test cases based on at least the target scenario element matrix and the operation steps. By identifying three elements of personnel attribute elements, basic data elements and system operation elements based on real business scenarios, and extracting the initial scenario element matrix based on these elements. By setting the association relationship between elements, the system logic in the business system's requirement specification can be reflected. Finally, the scenario elements with set association relationships are combined and automatically replaced with a test case. This can reduce the errors caused by manually writing test cases one by one on the basis of improving efficiency, and can further ensure that only the accuracy of element extraction and the correctness of element association need to be focused in later inspections and reviews. It can fully combine the requirement instantiation analysis of system logic and business logic, and solve the technical problem of inaccurate test case generation in the prior art.
[0135] 2) The test case generation device of the present application, the acquisition unit acquires personnel attribute elements, basic data elements and system operation elements; the construction unit constructs an initial scenario element matrix based on the personnel attribute elements, basic data elements and system operation elements, the initial scenario element matrix includes multiple rows and multiple columns, and the initial scenario element matrix matches the business system's requirement specification; the determination unit acquires the characteristics of each column in the initial scenario element matrix, and determines the association relationship between any two scenario elements in the initial scenario element matrix; the combination unit uses a greedy algorithm to arrange and combine the scenario elements according to the characteristics and association relationship to obtain a target scenario element matrix; the generation unit acquires the operation steps of the business system, and generates test cases based on at least the target scenario element matrix and the operation steps. The three elements of personnel attribute elements, basic data elements and system operation elements are identified based on real business scenarios, and the initial scenario element matrix is refined based on these elements. By setting the association relationship between elements, the system logic in the business system's requirement specification can be reflected. Finally, the scenario elements with set association relationships are combined and automatically replaced with a test case. This can reduce the errors caused by manually writing test cases one by one on the basis of improving efficiency, and can further ensure that only the accuracy of element extraction and the correctness of element association need to be focused in later inspections and reviews. It can fully combine the requirement instantiation analysis of system logic and business logic, and solve the technical problem of inaccurate test case generation in the prior art.
[0136] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a test case, characterized in that: The method is applied to a business system, and the method comprises: Acquire personnel attribute elements, basic data elements, and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of users of the business system, the basic data elements include data used by the business system in processing business, and the system operation elements include operations performed by the user in the business system; Constructing an initial scenario element matrix according to the personnel attribute elements, the basic data elements, and the system operation elements, wherein the initial scenario element matrix includes a plurality of rows and a plurality of columns, and the initial scenario element matrix matches the requirement specification of the business system; Acquire the features of each of the columns in the initial scene element matrix, and determine the association relationship between any two scene elements in the initial scene element matrix, wherein the association relationship includes one of a mutually exclusive relationship, a strong association relationship, a positive relationship, and a negative relationship, and the scene element is one of the personnel attribute element, the basic data element, and the system operation element; Using a greedy algorithm to arrange and combine the scene elements according to the features and the association relationships to obtain a target scene element matrix; The operation steps of the business system are obtained, and a test case is generated based at least on the target scenario element matrix and the operation steps.
2. The method according to claim 1, characterized in that Obtain personnel attribute elements, basic data elements, and system operation elements, including: Obtain at least one of the organization to which the user belongs, the authority of the user, and the position of the user in the business system to obtain the personnel attribute element; Acquire at least one of a flow process of the data in the business system and a processing process of the data in the business system to obtain the basic data element; The system operation element is obtained by acquiring one of the input field of the user and the operation flow of the user.
3. The method according to claim 1, characterized in that According to the personnel attribute elements, the basic data elements and the system operation elements, constructing the initial scene element matrix includes: Acquire multiple initial elements corresponding to different relationships triggered by the same scene element; Arrange the plurality of initial elements into the same column according to the equivalence class principle, wherein different columns correspond to different scene elements.
4. The method according to claim 1, characterized in that Acquiring the features of each column in the initial scene element matrix includes: According to the importance of the scene elements in the column, the characteristics of the column are determined, wherein the characteristics include a full arrangement and a cross-combination arrangement, and the importance of the scene elements in the column corresponding to the full arrangement is greater than the importance of the scene elements in the column corresponding to the cross-combination arrangement.
5. The method according to claim 1, characterized in that Determining the association relationship between any two scene elements in the initial scene element matrix includes: In the case where the two scene elements cannot be true at the same time or cannot exist at the same time, determining that the association relationship between the two scene elements is the mutually exclusive relationship; In a case where a change in one of the scene elements affects a change in another of the scene elements, determining that the association relationship between the two scene elements is the strong association relationship; In the case where there is a positive correlation between the two scene elements, determining the association relationship between the two scene elements as the positive relationship; In the case where there is a negative correlation between the two scene elements, the association relationship between the two scene elements is determined to be the inverse relationship.
6. The method according to claim 1, characterized in that Generating a test case at least according to the target scenario element matrix and the operation steps, including: An acquisition step of acquiring a plurality of target elements in the same row of the target scene element matrix; A generating step, arranging the plurality of target elements in the order of the operating steps to generate a test case; Repeating step, repeating the acquisition step and the generation step at least once in sequence, and in the repetition process, traversing each row in the target scene element matrix in sequence until all rows in the target scene element matrix are traversed to obtain multiple test cases.
7. The method according to any one of claims 1 to 6, characterized in that After generating a test case at least according to the target scenario element matrix and the operation steps, the method further includes: Input the test case into the business system to obtain the actual test result corresponding to the test case; Obtaining the expected result corresponding to the test case; Comparing the actual test result with the expected result, and determining that the test case is tested successfully if the actual test result is the same as the expected result; When the actual test result is different from the expected result, it is determined that the test case fails.
8. A test case generation device, characterized in that: The device is applied to a business system, and the device includes: an acquisition unit, configured to acquire personnel attribute elements, basic data elements, and system operation elements, wherein the personnel attribute elements are used to characterize the characteristics of users of the business system, the basic data elements include data used in the business system in processing business, and the system operation elements include operations performed by the user in the business system; A construction unit, configured to construct an initial scenario element matrix according to the personnel attribute elements, the basic data elements, and the system operation elements, wherein the initial scenario element matrix includes a plurality of rows and a plurality of columns, and the initial scenario element matrix matches the requirement specification of the business system; A determination unit, used to obtain the characteristics of each column in the initial scene element matrix, and determine the association relationship between any two scene elements in the initial scene element matrix, wherein the association relationship includes one of a mutually exclusive relationship, a strong association relationship, a positive relationship, and a negative relationship, and the scene element is one of the personnel attribute element, the basic data element, and the system operation element; A combining unit, used for arranging and combining the scene elements according to the features and the association relationships using a greedy algorithm to obtain a target scene element matrix; A generating unit is used to obtain the operating steps of the business system and generate a test case based at least on the target scenario element matrix and the operating steps.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.