A use case quality determination method and device, electronic equipment and storage medium

By automatically calculating the reverse test case rate and test case quality compliance rate, and combining entropy weighting and normalization matrix processing, the problems of low efficiency and poor accuracy in traditional methods are solved, achieving efficient and accurate test case quality determination and ensuring the reliability of testing.

CN115576830BActive Publication Date: 2026-08-25AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211326625.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-08-25
Estimated Expiration
2042-10-27

AI Technical Summary

Technical Problem

Traditional methods for determining test case quality are inefficient and inaccurate, impacting project progress and test reliability.

Method used

By automatically identifying the current project for which the quality of test cases to be determined, calculating the reverse test case rate and test case quality compliance rate, determining the weights using the entropy weight method, processing the data using a normalized matrix, calculating the test case quality coefficient, and finally determining the test case quality.

Benefits of technology

This improved the efficiency and accuracy of test case quality determination, ensuring the reliability of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576830B_ABST
    Figure CN115576830B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a use case quality determination method and device, electronic equipment and a storage medium. The use case quality determination method comprises: determining a current project for which use case quality is to be determined; determining a reverse use case rate and a use case quality compliance rate of the current project; and determining use case quality of the current project according to the reverse use case rate and the use case quality compliance rate. The technical solution of the embodiments of the present application can automatically determine use case quality, thereby improving the efficiency and accuracy of determining use case quality, and further ensuring the reliability of testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, apparatus, electronic device and storage medium for determining use case quality. Background Technology

[0002] A test case is a set of elements provided to the system under test for the purpose of conducting tests. This set includes elements such as the test environment, operational steps, test data, and expected results. In daily testing progress and project management, test cases are the most important asset in test management and project management. However, due to project requirements and the subjective and objective differences among testers, the quality of test cases varies considerably.

[0003] Traditional methods for determining the quality of test cases typically involve test managers or project managers conducting online or offline expert reviews. All experts and project stakeholders need to prepare in advance and have a deep understanding of the system. This approach often consumes a lot of time and can even affect the project schedule in large projects or become a mere formality in agile projects, resulting in low efficiency and poor accuracy in determining the quality of test cases. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for determining test case quality, which can automatically determine the quality of test cases, thereby improving the efficiency and accuracy of determining test case quality and ensuring the reliability of testing.

[0005] According to one aspect of the present invention, a method for determining use case quality is provided, comprising:

[0006] Determine the current project for the quality of the use cases to be determined;

[0007] Determine the reverse test case rate and test case quality compliance rate of the current project;

[0008] The quality of the use cases in the current project is determined based on the reverse use case rate and the use case quality compliance rate.

[0009] According to another aspect of the present invention, a use case quality determination apparatus is provided, comprising:

[0010] The current project determination module is used to determine the quality of the current project for the test cases to be determined.

[0011] The metric determination module is used to determine the reverse test case rate and test case quality compliance rate of the current project.

[0012] The use case quality determination module is used to determine the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the use case quality determination method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the use case quality determination method according to any embodiment of the present invention.

[0018] The technical solution of this invention determines the quality of test cases in the current project by identifying the current project for which test case quality needs to be determined, and by determining the reverse test case rate and test case quality compliance rate of the current project. Based on the reverse test case rate and test case quality compliance rate, the quality of test cases in the current project is determined. This solves the problems of low efficiency and poor accuracy in test case quality determination caused by manual determination of test case quality in existing methods. It can automatically determine the quality of test cases, thereby improving the efficiency and accuracy of test case quality determination, and thus ensuring the reliability of testing.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a method for determining use case quality provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of a method for determining use case quality provided in Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of a normalized matrix provided in Embodiment 2 of the present invention;

[0024] Figure 4 This is an example flowchart of a method for determining use case quality provided in Embodiment 2 of the present invention;

[0025] Figure 5 This is a schematic diagram of a use case quality determination device provided in Embodiment 3 of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the use case quality determination method of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] Example 1

[0030] Figure 1 This is a flowchart of a test case quality determination method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the efficiency and accuracy of test case quality determination are improved. The method can be executed by a test case quality determination device, which can be implemented through software and / or hardware, and is generally directly integrated into the electronic device executing this method. This electronic device can be a terminal device or a server device. The present invention does not limit the type of electronic device executing the test case quality determination method. Specifically, as shown... Figure 1 As shown, the method for determining the quality of this use case may specifically include the following steps:

[0031] S110. Determine the current item for the quality of the use cases to be determined.

[0032] In this context, the current project for which the quality of test cases needs to be determined can be any project for which the quality of test cases needs to be assessed. It's understandable that a project can correspond to multiple test cases, allowing for testing of the project from different perspectives using various test cases.

[0033] In this embodiment of the invention, the current project for which the quality of test cases to be determined is identified. It is understood that before a project is deployed after development, it needs to be tested using test cases. The quality of the test cases for a project affects its stability; therefore, it is necessary to determine the quality of the project's test cases.

[0034] S120. Determine the reverse use case rate and use case quality compliance rate of the current project.

[0035] The reverse test case rate represents the proportion of reverse test cases in a test case set. It's understood that a project's test cases can include both reverse and forward test cases to comprehensively test the project. Reverse test cases can consist of valid and invalid equivalence classes. Valid equivalence classes are sets of reasonable and meaningful input data. Invalid equivalence classes are sets of input data that are meaningless and unreasonable according to the software specifications. It should be noted that valid equivalence classes can be sets of data that are meaningful but do not meet the software's business requirements. The test case quality compliance rate represents the proportion of test cases that meet the required quality standards.

[0036] In this embodiment of the invention, after determining the current project for which the use case quality needs to be determined, the reverse use case rate and use case quality compliance rate of the current project can be further determined, so as to determine the use case quality of the current project based on the reverse use case rate and use case quality compliance rate.

[0037] S130. Determine the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate.

[0038] In this embodiment of the invention, after determining the reverse test case rate and test case quality compliance rate of the current project, the test case quality of the current project can be further determined based on the reverse test case rate and test case quality compliance rate.

[0039] The technical solution of this embodiment determines the quality of test cases in the current project by identifying the current project's reverse test case rate and test case quality compliance rate, and then determines the quality of test cases in the current project based on the reverse test case rate and test case quality compliance rate. This solves the problems of low efficiency and poor accuracy in test case quality determination caused by manual determination of test case quality in existing methods. It can automatically determine the quality of test cases, thereby improving the efficiency and accuracy of test case quality determination and ensuring the reliability of testing.

[0040] Example 2

[0041] Figure 2 This is a flowchart of a method for determining use case quality according to Embodiment 2 of the present invention. This embodiment further refines the above-described technical solutions, providing various specific and optional implementation methods for determining the reverse use case rate and use case quality compliance rate of the current project, and for determining the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate. The technical solutions in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method may include the following steps:

[0042] S210. Determine the current item for the quality of the use cases to be determined.

[0043] S220. Determine the reverse use case rate and use case quality compliance rate of the current project.

[0044] Optionally, determining the reverse test case rate for the current project may include: determining the number of reverse test cases corresponding to the current project and the total number of test cases corresponding to the current project; and determining the reverse test case rate for the current project based on the number of reverse test cases and the total number of test cases.

[0045] The number of reverse test cases can be the number of reverse test cases corresponding to the current project. The total number of test cases can be the total number of test cases corresponding to the current project.

[0046] Specifically, after identifying the current project for which the quality of test cases needs to be determined, the number of reverse test cases and the total number of test cases corresponding to the current project can be further determined, so as to determine the reverse test case rate of the current project based on the number of reverse test cases and the total number of test cases.

[0047] Optionally, the reverse use case rate for the current project can be determined based on the following formula:

[0048]

[0049] Where r1 represents the reverse test case rate of the current project, n1 represents the number of reverse test cases, and N represents the total number of test cases.

[0050] Optionally, determining the test case quality compliance rate of the current project may include: identifying the functional modules and their complexity corresponding to the current project; determining the test case sampling weights for each functional module based on their complexity; sampling test cases for each functional module based on their sampling weights to obtain sampled test cases; determining the number of sampled test cases that meet the quality standards and the total number of sampled test cases; and determining the test case quality compliance rate of the current project based on the number of sampled test cases that meet the quality standards and the total number of sampled test cases.

[0051] In this context, a functional module can be any module in the current project that implements a specific function. This means that a functional module can implement a function through code. Functional module complexity refers to the level of complexity required to implement a functional module's function. This means that if a functional module is easy to implement, its functional module complexity is low; conversely, if a functional module is difficult to implement, its functional module complexity is high. Test case sampling weight refers to the weight given when sampling test cases. Test case sampling can involve sampling all test cases corresponding to the current project. Sampling test cases are the sampled test cases. This means that sampled test cases can be either reverse or forward test cases. The number of test cases meeting quality standards refers to the number of sampled test cases that meet the required quality standards. The number of sampled test cases can be the total number of sampled test cases.

[0052] Specifically, after identifying the current project for which test case quality needs to be determined, the corresponding functional modules and their complexity can be further identified. Based on the complexity of each functional module, a test case sampling weight is determined for each module. Test cases are then sampled from these weights to obtain sampled test cases. The number of sampled test cases that meet the quality standards and the total number of sampled test cases are then determined. Finally, the test case quality compliance rate for the current project is determined based on the number of test cases that meet the quality standards and the sampled test case data. It is understandable that one functional module can correspond to multiple test cases.

[0053] Optionally, the functional modules and their complexity for the current project can be determined based on the size estimation document. This size estimation document can be a document used to statistically analyze functional modules and their complexity for human resource estimation.

[0054] Optionally, the sampling weight of test cases for each functional module can be determined based on the complexity of each functional module. The higher the complexity of the functional module, the higher the sampling weight of the test cases for the determined functional module; the lower the complexity of the functional module, the lower the sampling weight of the test cases for the determined functional module.

[0055] For example, assuming that the complexity of functional modules includes complex, medium, and simple, the sampling weight for test cases determined by the complexity of a functional module could be 3, the sampling weight for test cases determined by the medium complexity of a functional module could be 2, and the sampling weight for test cases determined by the simple complexity of a functional module could be 1. Assuming that 60 test cases need to be sampled, then 30 test cases can be sampled for the complex functional module, 20 for the medium complexity functional module, and 10 for the simple complexity functional module.

[0056] Optionally, before determining the number of sampled test cases that meet the quality standard, the quality of each sampled test case can be determined. It should be noted that this embodiment of the invention does not limit the specific implementation method for determining the quality of each sampled test case, as long as it enables the determination of the quality of the sampled test cases.

[0057] Optionally, the use case quality compliance rate of the current project can be determined based on the following formula:

[0058]

[0059] Where r2 represents the test case quality compliance rate, n2 represents the number of test cases that meet the quality standards, and n3 represents the number of sampled test cases.

[0060] S230. Determine the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determine the total number of test cases corresponding to the current project.

[0061] The first weight can be the weight corresponding to the reverse test case rate. The second weight can be the weight corresponding to the test case quality compliance rate.

[0062] In this embodiment of the invention, after determining the reverse test case rate and the test case quality compliance rate of the current project, the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate can be further determined, and the total number of test cases corresponding to the current project can be determined.

[0063] Optionally, the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate can be determined using the entropy weight method. Specifically, according to the basic principles of information theory, information is a measure of the orderliness of a system, while entropy is a measure of the disorderliness of a system. According to the definition of information entropy, for a given indicator, the entropy value can be used to judge the degree of dispersion of that indicator. The smaller the information entropy value, the greater the dispersion of the indicator, and the greater the influence (i.e., weight) of that indicator on the comprehensive evaluation. If all values ​​of an indicator are equal, then that indicator has no effect in the comprehensive evaluation. Therefore, information entropy can be used to calculate the weights of each indicator, providing a basis for multi-indicator comprehensive evaluation.

[0064] Optionally, determining the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate may include: obtaining a preset number of historical projects and determining the calculation indicator data corresponding to the weight calculation indicator of each historical project; determining the calculation indicator proportion corresponding to each historical project based on the calculation indicator data corresponding to the weight calculation indicator of each historical project; determining the calculation indicator entropy value corresponding to the weight calculation indicator based on the calculation indicator proportion; determining the calculation indicator weight corresponding to the weight calculation indicator based on the calculation indicator entropy value; and determining the first weight and the second weight based on the calculation indicator weight.

[0065] The preset quantity can be a pre-defined number. It is understood that the preset quantity can be the total number of projects, or the number of some projects, etc., and this embodiment of the invention does not impose any limitations on this. Historical projects can be any project that has completed testing. The weight calculation indicator can be an indicator corresponding to the calculated weight of a historical project. It is understood that there can be one or more weight calculation indicators, and this embodiment of the invention does not impose any limitations on this. The calculation indicator data can be the data corresponding to the calculated weight indicator of a historical project. The calculation indicator proportion can be the weight of the calculated indicator data corresponding to a historical project. The calculation indicator entropy value can be the entropy value corresponding to the weight calculation indicator. The calculation indicator weight can be the weight of the calculated weight indicator corresponding to a historical project. It is understood that the more historical projects there are, the higher the accuracy of the calculated indicator weight.

[0066] Specifically, after determining the reverse use case rate and use case quality compliance rate of the current project, a preset number of historical projects can be obtained, and the calculation indicator data corresponding to the weight calculation indicator of each historical project can be determined. Based on the calculation indicator data, the weight of the calculation indicator corresponding to each historical project can be determined, and then the entropy value of the calculation indicator corresponding to the weight calculation indicator can be determined based on the weight of the calculation indicator entropy value. Finally, the first weight and the second weight can be determined based on the weight of the calculation indicator.

[0067] Optionally, before determining the weight of each historical item based on the calculated indicator data, the data for each calculated indicator can be standardized to eliminate the impact of inconsistent indicator units. It is understandable that inconsistent indicator units will result in data for different indicators varying in size, affecting the weight calculation results.

[0068] Optionally, after determining the calculation index data corresponding to the weight calculation index for each historical project, the calculation index data can be further processed using a normalization matrix. Specifically, the normalization matrix can be expressed as the following formula:

[0069] W = {X ij} n*m

[0070] Among them, X ij This represents the calculated index data corresponding to the j-th weight calculation index of the i-th historical project, where n represents the number of rows in the normalized matrix and m represents the number of columns in the normalized matrix.

[0071] Optionally, the weight of each historical item's corresponding calculation indicator can be determined based on the calculation indicator data corresponding to the weighted calculation indicators of each historical item. This can be done using the following formula:

[0072]

[0073] Among them, P ij This represents the weight of the calculated indicator corresponding to the j-th weight calculation indicator of the i-th historical project.

[0074] Optionally, the entropy value of the weighted calculation indicator can be determined based on the proportion of each calculation indicator, using the following formula:

[0075]

[0076]

[0077] Among them, e j Let represent the entropy value of the calculated index corresponding to the j-th weight calculation index, and k represent the entropy weight method coefficient.

[0078] Optionally, the weight of the corresponding weight calculation indicator can be determined based on the entropy value of the calculated indicator, which can be based on the following formula:

[0079]

[0080] Among them, w j This represents the weight of the calculated index corresponding to the j-th weight calculation index.

[0081] For example, Figure 3 This is a schematic diagram of a normalized matrix provided in Embodiment 2 of the present invention, as shown below. Figure 3 As shown, the weighted calculation metrics can include the reverse use case rate metric and the use case quality compliance rate metric. A normalized matrix can statistically analyze the reverse use case rate metric (j1 metric) and the use case quality compliance rate metric (j2 metric) for different projects into a single matrix. The weight of the calculated metric corresponding to the reverse use case rate metric for project A1 is 33 / (33+21+10+11+15+19)=0.30.

[0082] Optionally, the weight calculation metric may include the reverse use case rate metric, and the weight of the calculated metric may include the weight of the reverse use case rate metric; determining the first weight based on the weight of the calculated metric may include: determining the first weight based on the weight of the reverse use case rate metric.

[0083] The reverse use case rate metric can be a metric calculated using the reverse use case rate as a weight. The weight of the reverse use case rate metric can be the weight obtained when calculating the weight of the metric using the reverse use case rate as a weight.

[0084] Specifically, when the weight calculation metric includes the reverse use case rate metric, and the weight calculation metric includes the reverse use case rate metric weight, the first weight can be determined based on the reverse use case rate metric weight. Optionally, determining the first weight based on the reverse use case rate metric weight can be done by setting the reverse use case rate metric weight as the first weight.

[0085] Optionally, the weight calculation metric may include the use case quality compliance rate metric, and the weight of the metric may include the weight of the use case quality compliance rate metric; determining the second weight based on the weight of the metric may include: determining the second weight based on the weight of the use case quality compliance rate metric.

[0086] The use case quality compliance rate metric can be a metric calculated by using the use case quality compliance rate as a weight. The weight of the use case quality compliance rate metric can be the weight obtained when calculating the weight of the use case quality compliance rate.

[0087] Specifically, when the weight calculation metric includes the test case quality compliance rate, and the metric weight includes the weight of the test case quality compliance rate metric, a second weight can be determined based on the weight of the test case quality compliance rate metric. Optionally, determining the second weight based on the weight of the test case quality compliance rate metric can be done by setting the weight of the test case quality compliance rate metric as the second weight.

[0088] S240. Determine the test case quality coefficient based on the reverse test case rate, the test case quality compliance rate, the total number of test cases, the first weight, and the second weight.

[0089] The use case quality coefficient can be a coefficient used to determine the quality of use cases in the current project.

[0090] In this embodiment of the invention, after determining the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determining the total number of test cases corresponding to the current project, the test case quality coefficient can be further determined based on the reverse test case rate, the test case quality compliance rate, the total number of test cases, the first weight, and the second weight.

[0091] Optionally, the use case quality coefficient can be determined based on the following formula:

[0092]

[0093] Where Q represents the use case quality coefficient, λ1 represents the first weight, and λ2 represents the second weight.

[0094] S250. Determine the use case quality of the current project based on the use case quality coefficient.

[0095] In this embodiment of the invention, after determining the test case quality coefficient based on the reverse test case rate, test case quality compliance rate, total number of test cases, first weight, and second weight, the test case quality of the current project can be further determined based on the test case quality coefficient. It is understood that a larger test case quality coefficient indicates higher test case quality, and a smaller test case quality coefficient indicates lower test case quality. Similarly, a smaller reverse test case rate indicates fewer reverse test cases considered, resulting in poorer test case quality; conversely, a larger reverse test case rate indicates more reverse test cases considered, resulting in better test case quality. The test case quality compliance rate can reflect the overall quality of test cases in the project through sample data; a higher compliance rate indicates better test case quality for the project.

[0096] For example, Figure 4 This is an example flowchart of a method for determining use case quality provided in Embodiment 2 of the present invention, as follows: Figure 4 As shown, this method specifically includes determining the reverse test case rate of the current project and the test case quality compliance rate. Then, the entropy method is used to weight the reverse test case rate and the sample test case quality compliance rate to obtain a quality indicator (i.e., the test case quality monitoring coefficient). The quality of test cases is then controlled based on this indicator. Specifically, determining the test case quality compliance rate involves determining the functional complexity of each functional module in the current project (i.e., functional module complexity), randomly selecting test cases according to the functional complexity weight ratio, and determining whether the quality of the selected test cases meets the standards through expert review. The result of dividing the number of expert-reviewed compliance cases by the total number of samples is the test case quality compliance rate.

[0097] The above technical solution extracts both the reverse test case rate and test cases from different projects, ensuring data independence. The weight value corresponding to the reverse test case rate can also change according to different projects in the same period, making it applicable to multiple projects. By randomly sampling based on the test case sampling weight, it ensures that the sample can reflect the overall situation of test cases to the greatest extent. Sampling surveys rather than full inspections save a lot of human resources. Combining the two indicators, reverse test case rate and test case quality compliance rate, can solve the contradictions that may occur when focusing on two indicators at the same time. If other indicators exist, an additional column can be added to the normalization matrix, making it scalable.

[0098] The technical solution of this embodiment determines the current project for which the test case quality needs to be determined, as well as the reverse test case rate and test case quality compliance rate of the current project. Then, it determines the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determines the total number of test cases corresponding to the current project. Based on the reverse test case rate, test case quality compliance rate, total number of test cases, first weight, and second weight, a test case quality coefficient is determined. The test case quality of the current project is then determined based on the test case quality coefficient. This solves the problems of low efficiency and poor accuracy in test case quality determination caused by manual determination of test case quality in existing test case quality determination methods. It can automatically determine the test case quality, thereby improving the efficiency and accuracy of test case quality determination and ensuring the reliability of testing.

[0099] Example 3

[0100] Figure 5 This is a schematic diagram of a use case quality determination device provided in Embodiment 3 of the present invention, as shown below. Figure 5 As shown, the device includes: a current project determination module 510, a calculation index determination module 520, and a test case quality determination module 530, wherein:

[0101] The current project determination module 510 is used to determine the quality of the current project for the test cases to be determined.

[0102] The metric determination module 520 is used to determine the reverse use case rate and use case quality compliance rate of the current project.

[0103] The use case quality determination module 530 is used to determine the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate.

[0104] The technical solution of this embodiment determines the quality of test cases in the current project by identifying the current project's reverse test case rate and test case quality compliance rate, and then determines the quality of test cases in the current project based on the reverse test case rate and test case quality compliance rate. This solves the problems of low efficiency and poor accuracy in test case quality determination caused by manual determination of test case quality in existing methods. It can automatically determine the quality of test cases, thereby improving the efficiency and accuracy of test case quality determination and ensuring the reliability of testing.

[0105] Optionally, the calculation metric determination module 520 can be specifically used to: determine the number of reverse test cases corresponding to the current project, and the total number of test cases corresponding to the current project; and determine the reverse test case rate of the current project based on the number of reverse test cases and the total number of test cases.

[0106] Optionally, the calculation index determination module 520 can also be specifically used for: determining the functional modules and their complexity corresponding to the current project; determining the test case sampling weights for each functional module based on their complexity; sampling test cases for each functional module based on their sampling weights to obtain sampled test cases; determining the number of sampled test cases that meet the quality standards and the total number of sampled test cases; and determining the test case quality compliance rate for the current project based on the number of sampled test cases that meet the quality standards and the total number of sampled test cases.

[0107] Optionally, the test case quality determination module 530 can be specifically used to: determine the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determine the total number of test cases corresponding to the current project; determine the test case quality coefficient based on the reverse test case rate, the test case quality compliance rate, the total number of test cases, the first weight, and the second weight; and determine the test case quality of the current project based on the test case quality coefficient.

[0108] Optionally, the use case quality determination module 530 can be further used to: obtain a preset number of historical projects and determine the calculation indicator data corresponding to the weight calculation indicator of each historical project; determine the weight of the calculation indicator corresponding to each historical project based on the calculation indicator data corresponding to the weight calculation indicator of each historical project; determine the entropy value of the calculation indicator corresponding to the weight calculation indicator based on the weight of each calculation indicator; determine the weight of the calculation indicator corresponding to the weight calculation indicator based on the entropy value of the calculation indicator; and determine the first weight and the second weight based on the weight of the calculation indicator.

[0109] Optionally, the weight calculation metric may include the reverse use case rate metric, and the weight of the metric may include the weight of the reverse use case rate metric; correspondingly, the use case quality determination module 530 may be further used to: determine the first weight based on the weight of the reverse use case rate metric.

[0110] Optionally, the weight calculation metric may include the use case quality compliance rate metric, and the weight of the metric may include the weight of the use case quality compliance rate metric; correspondingly, the use case quality determination module 530 may be further used to: determine the second weight based on the weight of the use case quality compliance rate metric.

[0111] The test case quality determination device provided in the embodiments of the present invention can execute the test case quality determination method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0112] Example 4

[0113] Figure 6A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0114] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0115] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0116] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as use case quality determination methods.

[0117] In some embodiments, the use case quality determination method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the use case quality determination method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the use case quality determination method by any other suitable means (e.g., by means of firmware).

[0118] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0119] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0120] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0122] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0123] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0124] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for determining use case quality, characterized in that, include: Determine the current project for the quality of the use cases to be determined; Determine the reverse test case rate and test case quality compliance rate of the current project; The quality of the test cases in the current project is determined based on the reverse test case rate and the test case quality compliance rate. The step of determining the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate includes: Determine the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determine the total number of test cases corresponding to the current project; The test case quality coefficient is determined based on the reverse test case rate, the test case quality compliance rate, the total number of test cases, the first weight, and the second weight. The quality of the use cases in the current project is determined based on the use case quality coefficient.

2. The method according to claim 1, characterized in that, Determining the reverse use case rate of the current project includes: Determine the number of reverse test cases corresponding to the current project, and the total number of test cases corresponding to the current project; The reverse test case rate of the current project is determined based on the number of reverse test cases and the total number of test cases.

3. The method according to claim 1, characterized in that, Determining the use case quality compliance rate of the current project includes: Determine the functional modules and their complexity corresponding to the current project; Based on the complexity of each functional module, determine the use case sampling weight corresponding to each functional module; Based on the test case sampling weight, test cases corresponding to each functional module are sampled to obtain sampled test cases. Determine the number of sampled test cases that meet the quality standards, and the total number of sampled test cases; The quality compliance rate of the current project's test cases is determined based on the number of test cases that meet the quality standards and the number of sampled test cases.

4. The method according to claim 1, characterized in that, The determination of the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate includes: Obtain a preset number of historical projects and determine the calculation index data corresponding to the weight calculation index of each historical project; Based on the calculation indicator data corresponding to the weight calculation indicators of each historical project, determine the weight of the calculation indicator corresponding to each historical project. Based on the weight of each of the aforementioned calculation indicators, determine the entropy value of the calculation indicator corresponding to the weight calculation indicator; Based on the entropy value of the calculated index, determine the weight of the calculated index corresponding to the weight calculated index; The first weight and the second weight are determined based on the calculated index weights.

5. The method according to claim 4, characterized in that, The weight calculation metric includes the reverse use case rate metric, and the weight of the calculated metric includes the weight of the reverse use case rate metric. Determining the first weight based on the calculated index weight includes: The first weight is determined based on the weight of the reverse use case rate metric.

6. The method according to claim 4, characterized in that, The weight calculation index includes the use case quality compliance rate index, and the weight of the calculated index includes the weight of the use case quality compliance rate index. Determining the second weight based on the calculated index weight includes: The second weight is determined based on the weight of the use case quality compliance rate indicator.

7. A device for determining the quality of use cases, characterized in that, include: The current project determination module is used to determine the quality of the current project for the test cases to be determined. The metric determination module is used to determine the reverse test case rate and test case quality compliance rate of the current project. The use case quality determination module is used to determine the use case quality of the current project based on the reverse use case rate and the use case quality compliance rate. The test case quality determination module is specifically used for: Determine the first weight corresponding to the reverse test case rate and the second weight corresponding to the test case quality compliance rate, and determine the total number of test cases corresponding to the current project; The test case quality coefficient is determined based on the reverse test case rate, the test case quality compliance rate, the total number of test cases, the first weight, and the second weight. The quality of the use cases in the current project is determined based on the use case quality coefficient.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the use case quality determination method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the use case quality determination method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Application program testing method and device, computer equipment and storage medium

    CN114064497A

  • Test case screening method and device, and medium

    WO2021143175A1