Automatic test case generation method based on orthogonal table
Through the automatic generation method of test cases based on orthogonal tables, the problem of insufficient test case generation efficiency and coverage in the existing technology is solved, efficient and intelligent test case generation is achieved, and the coverage and accuracy of software testing is improved.
Patent Information
- Application Number
- CN202510244954.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The existing technology is difficult to intelligently generate efficient and high coverage test cases, and under limited time and cost conditions, it is impossible to comprehensively test the software system, resulting in insufficient testing efficiency and accuracy.
The automatic generation method of test cases based on orthogonal tables is adopted, and the optimal test case set is generated through orthogonal table matching strategy, data mapping and evaluation selection. The method includes quasi-level method, modified two-level orthogonal table method and combination factor method, which are used to match suitable orthogonal tables and select the optimal set of test cases through evaluation indicators.
It realizes intelligent batch generation of test cases, saves labor costs, improves test coverage and software error detection accuracy, and can generate test cases flexibly and efficiently, reducing test costs.
Smart Images

Figure CN120179554A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software testing, and more particularly to a method for automatically generating test cases based on an orthogonal array. Background Art
[0002] Poor software quality is the primary cause of project failure. A large amount of low-quality coding makes it impossible for software projects to be completed on time and for costs to be controlled. Therefore, high-efficiency and high-quality software coverage testing is an effective method for controlling the risks and costs of software development projects.
[0003] Currently, most software systems have a relatively complex structure, with numerous logical branches and functional modules. It is impossible to achieve complete test coverage, but it is possible to design a sufficient and necessary set of test cases as much as possible to improve the test coverage rate. Testing complex software systems requires a large number of test cases. Relying solely on manual design of test cases is not comprehensive, and the level and subjectivity of case designers will affect the effectiveness of test cases. Therefore, in many cases, the generation of test cases requires the assistance of automation technology. With the improvement of the degree of software test automation, the automated generation of test case data is the most promising in the design of test cases.
[0004] At the same time, software coverage testing must also take efficiency into account. The number of test cases is not necessarily the more the better. A large number of test cases will seriously affect the test efficiency and increase the test cost. During the process of test case design, multiple input parameters are often encountered, and each parameter has multiple value-taking situations. For example, assume there are m input parameters, and each input parameter has n values. Calculated according to different combinations of input parameters, covering all combinations requires n m test cases. Due to constraints such as time and cost, it is impossible to complete all test cases, and comprehensive testing is not advisable. Therefore, another key issue in software testing is: among the possible test cases, how to select the test cases that are most likely to find the most errors for testing, so as to improve the test efficiency.
[0005] Therefore, how to intelligently generate test case data, improve the test coverage rate as much as possible, and improve the accuracy of software test sufficiency evaluation are problems that need to be solved urgently by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a method for automatically generating test cases based on an orthogonal array, which can intelligently generate test cases in batches, save labor costs, and is more optimized, efficient, and has a high coverage rate, as well as a higher accuracy rate for discovering software errors.
[0007] To achieve the above object, the present invention adopts the following technical solutions:
[0008] An automatic test case generation method based on an orthogonal array, comprising the following steps:
[0009] Step 1: Receive the input factors and corresponding levels, and match an orthogonal array according to the factors and levels using an orthogonal array matching strategy;
[0010] Step 2: Generate a number of test case sets according to the data mapping of the matched orthogonal array;
[0011] Step 3: Evaluate the test case sets, and select the optimal test case set according to the preset evaluation rules.
[0012] Preferably, since the data input by the user is very complex and different matching processing methods will be used according to different situations, the orthogonal array matching strategy includes:
[0013] Step 11: If the levels of all factors are the same, search for a known standard orthogonal array with the same number of factors and levels. If it exists, match the corresponding standard orthogonal array; otherwise, go to Step 12. If the levels of all factors are different, go to Step 13;
[0014] Step 12: Search for a standard orthogonal array with the same number of levels, greater than the number of factors and with the smallest difference from the number of factors; search for a standard orthogonal array with the same number of factors, greater than the number of levels and with the smallest difference from the number of levels; search for a standard orthogonal array greater than the number of factors, greater than the number of levels, and with the smallest differences from both the number of factors and the number of levels; match the corresponding standard orthogonal array; compare the number of levels in the standard orthogonal array with the number of levels, and compare the number of factors in the standard orthogonal array with the number of factors;
[0015] Step 13: Search for a known mixed-level orthogonal array with the same number of factors and levels. If it exists, match the corresponding mixed-level orthogonal array; otherwise, go to Step 14;
[0016] Step 14: If there are only two levels for all factors, determine whether the number of factors and levels satisfy the conditions of the n 1 ×2 n type mixed-level orthogonal array. If satisfied, match the n-order Hadamard matrix, and construct a new orthogonal array L 2n (n 1 ×2 n ) as the matched orthogonal array; otherwise, go to Step 15. If there are more than two levels for all factors, go to Step 15;
[0017] Step 15: Search for a standard orthogonal array with the same number of factors and maximum number of levels respectively. If it exists, match the corresponding orthogonal array; otherwise, go to Step 16; construct a new orthogonal array according to the method of virtual levels; construct a new orthogonal array according to the method of modifying two-level orthogonal arrays; construct a new orthogonal array according to the method of combining factors; match the corresponding orthogonal array.
[0018] Step 16: Search for a standard orthogonal array with the same maximum number of levels, greater than the number of factors and the smallest difference in the number of factors; search for a standard orthogonal array with the same number of factors, greater than the maximum number of levels and the smallest difference in the number of levels; search for a standard orthogonal array greater than the number of factors, greater than the maximum number of levels, and with the smallest differences in both the number of factors and the number of levels; match the corresponding orthogonal array.
[0019] Preferably, the process of constructing an orthogonal array by the method of virtual levels is as follows:
[0020] Step 111: Search for a standard orthogonal array with the same number of factors and maximum number of levels respectively.
[0021] Step 112: Sort the factors according to the number of levels, combine the factors with adjacent different numbers of levels, virtualize the smaller number of levels in the combination as the larger number of levels, and match the same mixed-level orthogonal array according to the virtualized number of factors and number of levels.
[0022] Preferably, the process of constructing an orthogonal array by the method of modifying two-level orthogonal arrays is as follows:
[0023] Step 121: Screen out all factors with the number of levels not equal to two.
[0024] Step 122: Virtualize the number of levels corresponding to the screened-out factors as multiples of 2 and then split them into several two-level factors.
[0025] Step 123: Match the same standard orthogonal array according to the virtualized number of factors and number of levels.
[0026] Preferably, the process of constructing an orthogonal array by the method of combining factors is as follows:
[0027] Step 131: Select the maximum number of levels among all factors.
[0028] Step 132: Combine the factors with the same number of levels in pairs. The number of levels after combination is the product of the original numbers of levels of the two groups. When the number of levels after combination is greater than the maximum number of levels, terminate the corresponding combination.
[0029] Step 133: Match an orthogonal array according to the combined factors and the corresponding numbers of levels by the method of virtual levels.
[0030] Preferably, in Step 2, record the orthogonal array data in the matched orthogonal array and generate test cases.
[0031] Preferably, the process of selecting the optimal test case set according to the preset evaluation rules is as follows:
[0032] Step 31: Sort the test case sets in ascending order according to the number of test cases, select the second test case set, and use the number of test cases corresponding to the selected test case set as the lower limit of the number num_min; and set the acceptable difference value of the number of test cases num_gap.
[0033] Step 32: Screen out the test case sets from all test case sets whose number of test cases is less than or equal to num_min + num_gap.
[0034] Step 33: Calculate the evaluation indicators corresponding to the screened test case sets.
[0035] Step 34: Screen out the optimal test case set according to the evaluation indicators and the preset indicator constraints.
[0036] Preferably, the evaluation indicators include whether the test cases cover each level of each factor, the level distribution uniformity of the corresponding each factor, the average weight of the test cases, and the use case reduction rate.
[0037] Preferably, the use case reduction rate is calculated by using the evaluation selection model, and the test case set with a large use case reduction rate is screened out. The expression is:
[0038]
[0039] Among them, OrthogonalNum represents the number of generated test cases; CompleteNum represents the number of test cases generated by the full test method; the use case reduction rate represents the test burden reduced by the test case generation method based on the orthogonal table.
[0040] It can be seen from the above technical solutions that compared with the prior art, the present invention discloses and provides a method for automatically generating test cases based on an orthogonal table, including an orthogonal table matching strategy, mapping test cases, and evaluation and selection of test case sets. In the orthogonal table matching strategy, the pseudo-level method, the method of transforming the two-level orthogonal table, and the combined factor method are proposed for orthogonal table matching for complex factor and level data, and then test cases are generated according to the matched orthogonal table, and the most suitable test case set is selected through evaluation. The evaluation and selection are mainly based on the number of test cases in the test case set and the coverage of test points. Among the test case sets with little difference in the number of test cases, the test case sets are comprehensively evaluated and analyzed from several dimensions such as level coverage rate, level uniformity, average weight of test cases, and size of use case reduction rate to select the optimal test case set. The test case generation method of the present invention can effectively reduce the number of test cases, reduce the test cost, and can generate test cases flexibly and efficiently. Description of the Drawings
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained according to the provided accompanying drawings.
[0042] Figure 1 It is a flowchart of an automatic test case generation method based on an orthogonal array provided by the present invention;
[0043] Figure 2 It is a schematic diagram of matching an orthogonal array using the pseudo-level method provided by the present invention;
[0044] Figure 3 It is a schematic diagram of matching an orthogonal array using a modified two-level orthogonal array provided by the present invention;
[0045] Figure 4 It is a schematic diagram of matching an orthogonal array using the combined factor method provided by the present invention. Detailed implementation manners
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0047] The embodiments of the present invention disclose an automatic test case generation method based on an orthogonal array, as Figure 1 shown, including the following steps:
[0048] S1: Receive the input various factors and the corresponding number of levels, and match an orthogonal array according to the various factors and the number of levels using an orthogonal array matching strategy;
[0049] S2: Generate a number of test case sets according to the data mapping of the matched orthogonal array;
[0050] S3: Evaluate the test case sets, and select the optimal test case set according to the preset evaluation rules.
[0051] Furthermore, since the data input by the user is very complex, different matching processing methods will be used according to different situations. The orthogonal array matching strategy includes:
[0052] S11: If the number of levels of each factor is the same, search for a known standard orthogonal array with the same number of factors and levels. If it exists, match the corresponding standard orthogonal array; otherwise, go to S12. If the number of levels of each factor is different, go to S13.
[0053] S12: Search for a standard orthogonal array with the same number of levels, greater than the number of factors and with the smallest difference from the number of factors; search for a standard orthogonal array with the same number of factors, greater than the number of levels and with the smallest difference from the number of levels; search for a standard orthogonal array greater than the number of factors, greater than the number of levels, and with the smallest differences from both the number of factors and the number of levels; match the corresponding standard orthogonal array; compare the number of levels in the standard orthogonal array with the number of levels, and compare the number of factors in the standard orthogonal array with the number of factors.
[0054] S13: Search for a known mixed-level orthogonal array with the same number of factors and levels respectively. If it exists, match the corresponding mixed-level orthogonal array; otherwise, go to S14.
[0055] S14: If the number of levels of each factor is only two, then determine whether the number of factors and levels satisfy the conditions of the n 1 ×2 n type mixed-level orthogonal array. If satisfied, match the n-order Hadamard matrix and construct a new orthogonal array L 2n (n 1 ×2 n ) as the matched orthogonal array; otherwise, go to S15. If the number of levels of each factor is greater than two, go to S15.
[0056] S15: Search for a standard orthogonal array with the same number of factors and the maximum number of levels respectively. If it exists, match the corresponding standard orthogonal array; otherwise, go to S16. Construct a new orthogonal array according to the method of virtual levels; construct a new orthogonal array according to the method of transforming two-level orthogonal arrays; construct a new orthogonal array according to the method of combining factors; match the corresponding orthogonal array.
[0057] S16: Search for a standard orthogonal array with the same maximum number of levels, greater than the number of factors and with the smallest difference from the number of factors; search for a standard orthogonal array with the same number of factors, greater than the maximum number of levels and with the smallest difference from the number of levels; search for a standard orthogonal array greater than the number of factors, greater than the maximum number of levels, and with the smallest differences from both the number of factors and the number of levels; match the corresponding standard orthogonal array.
[0058] Furthermore, the quasi-level method is to virtualize one or several levels for factors with fewer levels, so that the number of levels of each factor is equal to the corresponding number of levels in the orthogonal table, which is used to match the orthogonal table, and arrange the factors with fewer levels on the multi-level factor column of the orthogonal table, so as to arrange the internal elements with fewer levels on the multi-level orthogonal table. When the input factor level data cannot be matched to the right orthogonal table, the quasi-level method needs to be used for orthogonal table matching. The process of constructing an orthogonal table using the quasi-level method is:
[0059] S111: Find the standard orthogonal table with the same number of factors and maximum number of levels;
[0060] Virtualize the input level number that is less than the maximum level number as the maximum level number, and use 0 to fill the level number corresponding to the factor to the maximum level number; find the standard orthogonal table with the same number of factors and levels after virtualization;
[0061] S112: Sort the factors according to the number of levels, combine adjacent factors with different number of levels, virtualize the small number of levels in the combination into a large number of levels, and match the same mixed-level orthogonal table according to the number of virtualized factors and levels.
[0062] Further, the two-level orthogonal table method is to transform 2 n Any x columns in the orthogonal table are merged into one column x <n,若合并后的该列为一个2 x The new column of the level, then the two-level orthogonal table is changed to a mixed-level orthogonal table, which realizes the arrangement of multi-level factors in a small-level orthogonal table. For example: n Any two columns in the orthogonal table can be combined to form a 4 i ×2 n-2i type orthogonal array, i represents the number of merging. Because each column of a two-level orthogonal array has only two values 0 and 1, there are four combinations between any two columns: (0, 0), (0, 1), (1, 0), and (1, 1). When merging two columns into one: (0, 0) is replaced by 0, (0, 1) is replaced by 1, (1, 0) is replaced by 2, and (1, 1) is replaced by 3. The merged column is a new column with 4 levels. n Any three columns in the orthogonal table can be combined to form an 8 i ×2 n-3i The process of constructing an orthogonal array using the modified two-level orthogonal array method is as follows:
[0063] S121: Screen out all factors whose number of levels is not equal to two;
[0064] S122: The number of levels corresponding to the selected factors is virtualized as a multiple of 2 and then split into several two-level factors;
[0065] S123: Match the same standard orthogonal table according to the number of virtual factors and levels.
[0066] Furthermore, the combined factor method is a design method that combines two factors with fewer levels into one factor with more levels and arranges it in a multi-level orthogonal array. The principle of combining the levels of two factors is to combine them pairwise between the levels of different factors, and the number of levels after combination must be less than the maximum number of levels, otherwise they cannot be combined. The process of constructing an orthogonal array using the combined factor method is as follows:
[0067] S131: Select the maximum number of levels among all factors;
[0068] S132: Combine two factors with the same number of levels pairwise. The number of levels after combination is the product of the original number of levels of the two groups. When the number of levels after combination is greater than the maximum number of levels, terminate the corresponding combination;
[0069] S133: Match the orthogonal array using the pseudo-level method according to the combined factors and the corresponding number of levels.
[0070] Furthermore, in S2, record the orthogonal array data in the matched orthogonal array and generate test cases.
[0071] Furthermore, the process of selecting the optimal test case set according to the preset evaluation rules is as follows:
[0072] S31: Sort the test case sets in ascending order according to the number of test cases, select the second test case set, and use the number of test cases corresponding to the selected test case set as the lower limit of the number num_min; and set the acceptable difference value of the number of test cases num_gap;
[0073] S32: Screen out the test case sets whose number of test cases is less than or equal to num_min + num_gap from all test case sets;
[0074] S33: Calculate the evaluation indicators corresponding to the screened test case sets;
[0075] S34: Screen out the optimal test case set according to the evaluation indicators and the preset indicator constraints.
[0076] Furthermore, the evaluation indicators include whether the test cases cover each level of each factor, the evenness of the level distribution of the corresponding each factor, the average weight of the test cases, and the case reduction rate.
[0077] Furthermore, use the evaluation selection model to calculate the case reduction rate and screen out the test case set with a large case reduction rate. The expression is:
[0078]
[0079] Among them, OrthogonalNum represents the number of generated test cases; CompleteNum represents the number of test cases generated by the comprehensive test method; the test case reduction rate represents the test burden reduced by the test case generation method based on the orthogonal table.
[0080] In a specific embodiment, for a piece of data with four two-level factors, two three-level factors, and one four-level factor, it can be expressed mathematically as 2 4 ×3 2 ×4. The process of matching the orthogonal table using the pseudo-level method is as Figure 2 shown and includes the following steps:
[0081] S1: Search for the maximum number of levels in the 2 4 ×3 2 ×4 data is 4, the number of factors is 7. Use the pseudo-equal-level algorithm to virtualize the levels of all factors with less than 4 levels to 4, and convert the original data into seven four-level factors, which can be expressed mathematically as 4 7 , and match a standard orthogonal table L 32 4 9 ;
[0082] S2: Combine the factors corresponding to two different numbers of levels, traverse the combinations in turn, and virtualize different numbers of levels for different factors to match the appropriate mixed-level orthogonal table; when a three-level factor and a four-level factor are combined, after virtualizing the two three-level factors into two four-level factors, the original data 2 4 ×3 2 ×4 becomes 2 4 ×4 3 , and match the mixed-level orthogonal table L8(2 4 ×4 3 ); when a two-level factor and a three-level factor are combined, after virtualizing the four two-level factors into four three-level factors, the original data 2 4 ×3 2 ×4 becomes 3 6 ×4, and match the mixed-level orthogonal table L 18 (3 6 ×4).
[0083] In a specific embodiment, for a piece of data with four two-level factors, two three-level factors, and one four-level factor 2 4 ×3 2 ×4, the process of matching the orthogonal table using the modified two-level orthogonal table method is as Figure 3 shown, and the specific steps include:
[0084] S1: Search for the maximum number of levels in the 2 4 ×3 2 ×4 data is 4;
[0085] S2: After traversal analysis, it is obtained that two-level factors do not need to be merged in parallel, and each three-level factor and four-level factor need to merge two columns, and the number of levels is virtually set to two levels, so 2 4 ×3 2 ×4 requires a total of 10 columns;
[0086] S3: Match the two-level standard orthogonal table L 12 2 11 。
[0087] In a specific embodiment, for a set of data with four two-level factors, two three-level factors, and one four-level factor 2 4 ×3 2 ×4, the orthogonal table is matched by the modified combined factor method as Figure 4 shown, which specifically includes the following steps:
[0088] S1: Search for 2 4 ×3 2 ×4 data, and the maximum number of levels is 4;
[0089] S2: Combine the four two-level factors in pairs. The number of levels after combination is the product of the original two sets of levels, and two four-level factors are obtained by combination;
[0090] S3: Since the number of levels after combining the two three-level factors is greater than the maximum number of levels, the combination of three-level factors is terminated;
[0091] S4: After combination, the original data 2 4 ×3 2 ×4 is converted to 3 2 ×4 2 ;
[0092] S4: Use the idea of the pseudo-level method to match the number of combined factors and levels, and match the standard orthogonal table L 16 4 5 。
[0093] In this specification, each embodiment is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and reference can be made to the description in the method part for relevant parts.
[0094] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for automatically generating test cases based on an orthogonal table, characterized in that: The following steps are involved: Step 1: Receive the input factors and the corresponding number of levels, and match the orthogonal array using the orthogonal array matching strategy according to the factors and the number of levels; Step 2: Generate several test case sets according to the data mapping of the matching orthogonal table; Step 3: Evaluate the test case set and select the optimal test case set based on the preset evaluation rules.
2. The method for automatically generating test cases based on an orthogonal table according to claim 1, characterized in that: Orthogonal array matching strategies include: Step 11: If the number of levels of each factor is the same, then search for a known standard orthogonal table with the same number of factors and levels. If it exists, match the corresponding standard orthogonal table, otherwise go to step 12; if the number of levels of each factor is different, go to step 13; Step 12: Find the standard orthogonal table with the same number of levels, greater than the number of factors and the smallest difference with the number of factors; find the standard orthogonal table with the same number of factors, greater than the number of levels and the smallest difference with the number of levels; find the standard orthogonal table with greater than the number of factors, greater than the number of levels and the smallest difference with the number of factors and the number of levels; match the corresponding standard orthogonal table; compare the number of levels in the standard orthogonal table with the number of levels, and compare the number of factors in the table with the number of factors; Step 13: Find a known mixed-level orthogonal table with the same number of factors and levels. If it exists, match the corresponding mixed-level orthogonal table, otherwise go to step 14; Step 14: If there are only two levels for each factor, determine whether the number of factors and levels satisfies n 1 ×2 n The condition of the type mixed level orthogonal table is met. If it is met, the n-order Hadamard matrix is matched, and a new orthogonal table L is constructed according to the Hadamard matrix. 2n (n 1 ×2 n ) as the matching orthogonal table, otherwise go to step 15; if the number of levels of each factor is greater than two, go to step 15; Step 15: Find the standard orthogonal table with the same number of factors and the maximum number of levels. If it exists, match the corresponding standard orthogonal table, otherwise go to step 16; construct a new orthogonal table according to the quasi-level method; construct a new orthogonal table according to the modified two-level orthogonal table method; construct a new orthogonal table according to the combined factor method; match the corresponding orthogonal table; Step 16: Find a standard orthogonal table with the same number of levels as the maximum number of levels, greater than the number of factors, and the smallest difference in the number of factors; find a standard orthogonal table with the same number of factors, greater than the maximum number of levels, and the smallest difference in the number of levels; find a standard orthogonal table with a number greater than the number of factors, greater than the maximum number of levels, and the smallest difference in the number of factors and the number of levels; match the corresponding standard orthogonal tables.
3. The method for automatically generating test cases based on an orthogonal table according to claim 2, characterized in that: The process of constructing an orthogonal array using the quasi-horizontal method is as follows: Step 111: Find the standard orthogonal table with the same number of factors and the same maximum number of levels; Step 112: Sort the factors according to the number of levels, combine adjacent factors with different number of levels, virtualize the small number of levels in the combination into a large number of levels, and match the same mixed-level orthogonal table according to the number of virtualized factors and levels.
4. The method for automatically generating test cases based on an orthogonal table according to claim 2, characterized in that: The process of constructing an orthogonal array using the modified two-level orthogonal array method is as follows: Step 121: Screen out all factors whose number of levels is not equal to two; Step 122: virtualize the number of levels corresponding to the selected factors to be multiples of 2 and then split them into several two-level factors; Step 123: Match the same standard orthogonal table according to the number of virtual factors and levels.
5. The method for automatically generating test cases based on an orthogonal array according to claim 2, characterized in that: The process of constructing an orthogonal array using the combined factor method is as follows: Step 131: Select the maximum number of levels in each factor; Step 132: Combine factors with the same number of levels in pairs. The number of levels after the combination is the product of the two groups of original level numbers. When the number of levels after the combination is greater than the maximum number of levels, the corresponding combination is terminated. Step 133: Use the quasi-level method to match the orthogonal array according to the combined factors and the corresponding level numbers.
6. The method for automatically generating test cases based on an orthogonal array according to claim 1, characterized in that: In step 2, the orthogonal array data in the matched orthogonal array is recorded, and test cases are generated.
7. The method for automatically generating test cases based on an orthogonal array according to claim 1, characterized in that: The process of selecting the optimal test case set according to the preset evaluation rules is: Step 31: Sort the test case sets in ascending order according to the number of test cases, select the second test case set, and use the number of test cases corresponding to the selected test case set as the lower limit num_min; and set the acceptable test case number gap value num_gap; Step 32: Filter out the test case sets whose number of test cases is less than or equal to num_min+num_gap from all test case sets; Step 33: Calculate the evaluation index corresponding to the screened test case set; Step 34: Filter out the optimal test case set based on the evaluation indicators and preset indicator constraints.
8. The method for automatically generating test cases based on an orthogonal array according to claim 7, characterized in that: The evaluation indicators include whether the test cases cover each level of each factor, the corresponding level distribution uniformity of each factor, the average weight of the test cases and the case reduction rate.
9. The method for automatically generating test cases based on an orthogonal array according to claim 8, characterized in that: The use case reduction rate is calculated using the evaluation selection model, and the expression is: Among them, OrthogonalNum represents the number of test cases generated; CompleteNum represents the number of test cases generated by the comprehensive test method.
Citation Information
Patent Citations
Method and device for generating orthogonal test cases
CN102073483A
Software test support device, software test support method and program
JP2011039786A