CN113312269A - Software defect grading method, device, equipment and storage medium - Google Patents

Software defect grading method, device, equipment and storage medium Download PDF

Info

Publication number
CN113312269A
CN113312269A CN202110705821.5A CN202110705821A CN113312269A CN 113312269 A CN113312269 A CN 113312269A CN 202110705821 A CN202110705821 A CN 202110705821A CN 113312269 A CN113312269 A CN 113312269A
Authority
CN
China
Prior art keywords
defect
software
defects
classified
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110705821.5A
Other languages
Chinese (zh)
Inventor
阮绍臣
王欣
李佩刚
苏畅
周荣林
高建瓴
王成
马骁雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202110705821.5A priority Critical patent/CN113312269A/en
Publication of CN113312269A publication Critical patent/CN113312269A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The application provides a software defect classification method, a device, equipment and a storage medium, wherein the method comprises the following steps: determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified, establishing a defect classification measurement space containing software defect grades and the attribute information, determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively in the defect classification measurement space, and determining target defect classification of the defects to be classified according to the defect classification probabilities corresponding to the different software defect grades. The method and the device can greatly improve the accuracy of software defect classification.

Description

Software defect grading method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for software defect classification.
Background
The software defect classification is an important component of a software test standard, can be used for analyzing the influence degree of software defects on a software system, and is an important means for improving the software quality and evaluating the software process.
Currently, software defect grades are generally classified into four categories according to software operation results in the industry, namely fatal errors, serious errors, general errors and recommendation problems. On the basis of the software defect grade division criterion, a tester divides the software defects into corresponding grades according to the influence degree of the software defects on software operation output in the software test process and by combining self experience. However, the above-mentioned method of manually classifying software defects depends on the familiarity of testers with systems and services, and if the testers are inexperienced, software defects cannot be accurately classified.
Disclosure of Invention
The application provides a software defect classification method, a device, equipment and a storage medium, which are used for solving the problem that a tester with insufficient experience cannot accurately classify software defects and improving the accuracy of software defect classification.
In a first aspect, the present application provides a software defect classification method, including:
determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified;
establishing a defect grading measurement space containing software defect grade and attribute information;
determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively in a defect grading measurement space;
and determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
Optionally, in the defect classification measurement space, determining corresponding defect classification probabilities when the defects to be classified are different software defect classes respectively includes: determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively according to the following Bayesian formula:
Figure BDA0003131196540000021
wherein, R represents the software requirement corresponding to the software defect, X represents the software test case execution corresponding to the software defect, V represents the software version in which the software defect occurs, S represents the software defect level, P (S | R, X, V) represents the defect classification probability, i.e., the probability of S occurring in the case of R, X, V, P (R, X, V | S) represents the probability of R, X, V occurring in the case of S, P (S) represents the probability of S occurring, and P (R, X, V) represents the probability of R, X, V occurring.
Optionally, the software defect levels include fatal errors, serious errors, general errors and suggested problems, and in the defect classification measurement space, determining corresponding defect classification probabilities when the defects to be classified are different software defect levels respectively includes: in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a fatal error; determining corresponding defect grading probability when the software defect grade of the defect to be graded is a serious error in a defect grading measurement space; in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a common error; and in the defect grading measurement space, determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem.
Optionally, determining the target defect classification of the defect to be classified according to the defect classification probabilities corresponding to different software defect grades, including: and determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect grades.
Optionally, determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability thresholds corresponding to different software defect classes, including: if the defect classification probability corresponding to the software defect grade is greater than the probability threshold, determining the software defect grade with the defect classification probability greater than the probability threshold as the target defect classification of the defect to be classified; and if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold, determining that the preset original software defect grade of the defect to be graded is the target defect grade of the defect to be graded.
Optionally, after determining a target defect classification of the defects to be classified, the software defect classification method further includes: and storing the target defects of the defects to be classified into a database in a classified mode.
In a second aspect, the present application provides a software defect classification apparatus, comprising:
the first determining module is used for determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified;
the establishing module is used for establishing a defect grading measurement space containing software defect grade and attribute information;
the second determining module is used for determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively in the defect grading measurement space;
and the processing module is used for determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
Optionally, the second determining module is specifically configured to: determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively according to the following Bayesian formula:
Figure BDA0003131196540000031
wherein, R represents the software requirement corresponding to the software defect, X represents the software test case execution corresponding to the software defect, V represents the software version in which the software defect occurs, S represents the software defect level, P (S | R, X, V) represents the defect classification probability, i.e., the probability of S occurring in the case of R, X, V, P (R, X, V | S) represents the probability of R, X, V occurring in the case of S, P (S) represents the probability of S occurring, and P (R, X, V) represents the probability of R, X, V occurring.
Optionally, the software defect level includes a fatal error, a serious error, a general error, and a recommendation problem, and the second determining module is specifically configured to: in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a fatal error; determining corresponding defect grading probability when the software defect grade of the defect to be graded is a serious error in a defect grading measurement space; in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a common error; and in the defect grading measurement space, determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem.
Optionally, the processing module is specifically configured to: and determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect grades.
Optionally, when the processing module is configured to determine the target defect classification of the defect to be classified according to the defect classification probabilities and the probability thresholds corresponding to different software defect classes, the processing module is specifically configured to: if the defect classification probability corresponding to the software defect grade is greater than the probability threshold, determining the software defect grade with the defect classification probability greater than the probability threshold as the target defect classification of the defect to be classified; and if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold, determining that the preset original software defect grade of the defect to be graded is the target defect grade of the defect to be graded.
Optionally, after determining the target defect classification of the defect to be classified, the processing module is further configured to: and storing the target defects of the defects to be classified into a database in a classified mode.
In a third aspect, the present application provides an electronic device, comprising: a memory and a processor;
the memory is used for storing program instructions;
the processor is configured to invoke program instructions in the memory to perform the software defect classification method according to the first aspect of the application.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon computer program instructions which, when executed, implement the software defect classification method according to the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a software defect classification method as described in the first aspect of the present application.
The software defect grading method, the device, the equipment and the storage medium provided by the application establish a defect grading measurement space containing software defect grades and attribute information by determining the attribute information of the defects to be graded, wherein the attribute information comprises software requirements corresponding to the defects to be graded, software test case execution corresponding to the defects to be graded and software versions with the defects to be graded, the defect grading measurement space determines corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively, and the target defect grading of the defects to be graded is determined according to the defect grading probabilities corresponding to the different software defect grades. According to the software defect grading method and device, the software defect is associated with the corresponding software requirement, the software test case execution and the software version with the software defect, and the software defect is automatically graded from the dimension of the test process data, so that the accuracy of software defect grading can be greatly improved, and further more powerful guarantee is provided for software defect repair and software quality.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a software defect classification method according to an embodiment of the present application;
FIG. 3 is a flowchart of a software defect classification method according to another embodiment of the present application;
FIG. 4 is a schematic structural diagram of a software defect classification apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First, some technical terms related to the present application are explained:
software bugs, i.e., software that does not achieve the functionality specified in the product specification, or software that exhibits inconsistent performance from the product specification. According to the relevant standards in the industry, the software defect grades are generally divided into:
(1) fatal error: namely, system crash, crash and endless loop are caused, so that the problems of database data loss, wrong connection with a database, main function loss, basic module loss and the like are caused.
(2) Serious errors: i.e., loss of a major portion of the system's functionality, database save calls, loss of user data, and testing of the function menu that cannot be used without affecting other functions. The functional design is not in accordance with the requirement seriously, the module can not be started or called, the program is restarted, the automatic exit is realized, the calling conflict among the associated programs, the safety problem, the stability and the like are realized.
(3) General errors: that is, the function is not completely realized but the use is not influenced, and the function menu has defects but the system stability is not influenced.
(4) The proposal problem is as follows: the method can optimize performance schemes, such as wrongly written characters, irregular interface formats, overlapped page displays, hidden display, unclear description, lost prompt words, irregular text arrangement, incorrect cursor position, poor user experience, and the like.
Software defect classification is an important means for improving software quality and evaluating software processes. According to the related standard suggestions such as Capability Maturity Model Integration (CMMI), national standards and the like, software defect levels can be generally classified into four categories according to operation results, namely fatal errors, serious errors, general errors and suggestion problems. The relevant standards give more detailed definitions and lists of different levels of severity, but these lists are usually evaluated from the end result of the software run and it is difficult to implement the metrics according to the specific software requirements. At present, on the basis of the software defect classification criterion, a tester generally classifies software defects into corresponding classes according to the degree of influence of the software defects on software operation output in a software testing process and by combining self experience, but the above-mentioned method of classifying software defects manually has two disadvantages: firstly, only the result of a software test case is objectively considered, which is not beneficial to finding out the potential risk in the execution process of the test case; secondly, subjectively, the familiarity of testers on executed test cases and related services is excessively depended, and the accuracy of the testers with insufficient experience on software defect grading is greatly reduced.
Based on the problems, the application provides a software defect classification method, a device, equipment and a storage medium, software defects correspond to software requirements, the execution process of a software test case is integrated from the software requirements, the software defect classification result is further optimized, the software defect classification is objectively evaluated from the dimensionality of test process data, a valuable objective basis is provided for the traditional software defect classification method, and the accuracy of software defect classification is improved.
First, an application scenario of the solution provided in the present application will be described below.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. As shown in fig. 1, in the application scenario, the client 110 sends the defect to be classified to the server 120, the server 120 classifies the defect to be classified, and sends the determined target defect corresponding to the defect to be classified to the client 110 in a classified manner. For a specific implementation process of the server 120 for classifying the defects to be classified, refer to the schemes of the following embodiments.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided in this embodiment, and this embodiment of the present application does not limit the devices included in fig. 1, and also does not limit the positional relationship between the devices in fig. 1. For example, in the application scenario shown in fig. 1, a data storage device may be further included, and the data storage device may be an external memory with respect to the client 110 or the server 120, or may be an internal memory integrated in the client 110 or the server 120.
Next, a software defect classification method will be described by way of a specific embodiment.
Fig. 2 is a flowchart of a software defect classification method according to an embodiment of the present application. The method of the embodiment of the application can be applied to electronic equipment, and the electronic equipment can be a server or a server cluster and the like. As shown in fig. 2, the method of the embodiment of the present application includes:
s201, determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified.
In the embodiment of the application, the attribute information corresponding to each software defect comprises a software requirement corresponding to the software defect, a software test case execution corresponding to the software defect, and a software version with the software defect. Wherein:
a software requirement, i.e. a set of elements of a specific series of functional requirements, which set is unique in the embodiments of the present application, each specific software requirement in the software requirement (set) has a unique code (e.g. denoted by r).
The software version, i.e. the code number of the software product which is developed according to the software requirement (set) and formally submitted to the test, is updated every time the test is submitted. The code sign is encoded by a positive integer (e.g., denoted by v) and incremented by a fixed step size (e.g., denoted by p, typically p ═ 1).
A software test case, which is a collection of execution schemes for testing software according to software requirements. Each software test case in the set of software test cases has a unique code (e.g., denoted by c).
The software test case execution is executed, that is, a specific execution is performed on a certain software test case, each pair of software test cases is executed once, that is, a code is generated, corresponding to the specific execution (for example, denoted by x), and the software test case execution is related to the software test case.
Illustratively, the software defect may be further defined to have the following attribute information: identification (ID), i.e. the unique identification code of the software defect; requirement (Requirement), namely the code r of a certain Requirement corresponding to the software defect; case Execution (Case Execution), that is, the software defect is found in which Execution of the software test Case, corresponding to the Execution code x of the Execution; whether to reopen (isReopen), that is, whether the software defect appears in the previous software version, if not, the corresponding value is 0, and if so, the corresponding value is the software version v in which the software defect appears. According to the above steps, each software defect is assigned with a set of attribute values, the software defect and the corresponding attribute values can be stored in, for example, a database, and the attribute values of the software defect are associated with the software requirement corresponding to the software defect, the software test case execution corresponding to the software defect, and the software version with the software defect, or can be understood as establishing the mapping relationship between the software requirement corresponding to the software defect, the software test case execution corresponding to the software defect, the software version with the software defect, and the software defect.
The defects to be classified are software defects found in the execution process of the software test cases, so the attribute information of the defects to be classified comprises software requirements corresponding to the defects to be classified, the execution of the software test cases corresponding to the defects to be classified and the software versions with the defects to be classified.
S202, establishing a defect grading measurement space containing software defect grade and attribute information.
In this step, the defect classification metric space is a four-dimensional vector space, and is represented by [ R, X, V, S ], where R represents the software requirement (set) corresponding to the software defect, X represents the software test case execution (set) corresponding to the software defect, V represents the software version (set) in which the software defect occurs, and S represents the software defect level (set), S is, for example, the software defect level determined according to the industry-related standard, including fatal errors, general errors, and proposed problems, and S may also be referred to as the classification (set) in the original software defect classification. The defect grading measurement space is a four-dimensional vector space established after the attribute information corresponding to the software defect is subjected to numerical processing. Each specific four-dimensional vector in the four-dimensional vector space is represented by [ r, x, v, s ], wherein r is a software requirement code corresponding to a software defect, x is a software test case execution code corresponding to the software defect, v is a software version with the software defect (if the software defect does not appear in a previous software version, the corresponding value is 0, and if the software defect appears in the previous software version, the corresponding value is a software version code value with the software defect), and s is a software defect level code.
After determining the attribute information of the defect to be classified, a defect classification measurement space containing the software defect grade and the attribute information can be established according to the attribute information of the defect to be classified and the software defect grade.
S203, in the defect grading measurement space, determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively.
After a defect classification measurement space containing software defect grades and attribute information is established, corresponding defect classification probabilities when the defects to be classified are different software defect grades can be determined in the defect classification measurement space. For how to determine the defect classification probability corresponding to the defects to be classified as different software defect classes in the defect classification measurement space, reference may be made to related technologies or subsequent embodiments, which are not described herein again.
And S204, determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
After the corresponding defect classification probabilities when the defects to be classified are different software defect grades are determined, the target defect classification of the defects to be classified can be determined according to the corresponding defect classification probabilities of the different software defect grades. For how to determine the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades, reference may be made to related technologies or subsequent embodiments, which are not described herein again.
The software defect classification method provided by the embodiment of the application establishes a defect classification measurement space containing software defect grades and attribute information by determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified, the defect classification measurement space determines corresponding defect classification probabilities when the defects to be classified are different software defect grades, and the target defect classification of the defects to be classified is determined according to the defect classification probabilities corresponding to the different software defect grades. According to the software defect grading method and device, the software defect is associated with the corresponding software requirement, the software test case execution and the software version with the software defect, and the software defect is automatically graded from the dimension of the test process data, so that the accuracy of software defect grading can be greatly improved, and further more powerful guarantee is provided for software defect repair and software quality.
Based on the foregoing embodiment, in a specific implementation manner, in the defect classification metric space, determining corresponding defect classification probabilities when the defects to be classified are respectively different software defect classes in step S203, where the method may further include: determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively according to the following Bayesian formula:
Figure BDA0003131196540000091
wherein, R represents the software requirement corresponding to the software defect, X represents the software test case execution corresponding to the software defect, V represents the software version in which the software defect occurs, S represents the software defect level, P (S | R, X, V) represents the defect classification probability, i.e., the probability of S occurring in the case of R, X, V, P (R, X, V | S) represents the probability of R, X, V occurring in the case of S, P (S) represents the probability of S occurring, and P (R, X, V) represents the probability of R, X, V occurring.
Illustratively, assuming that the defect to be classified is a defect b, in the defect classification metric space, the software requirement (i.e., R), the software test case execution (i.e., X) and the software version (i.e., V) where the defect b occurs corresponding to the defect b can be determined. The most probable grade on the probability corresponding to the defect b can be obtained by the following Bayes theory calculation:
Figure BDA0003131196540000092
wherein, the value range of S is determined (for example, the software defect level determined according to the industry related standard), and P (S, R, X, V) represents the probability of S, R, X, V occurring simultaneously. Since R, X, V has been determined for defect b, the value of P (R, X, V) can be determined. Further, a formula corresponding to the bayesian theory can be converted into the bayesian formula according to bayesian theorem:
Figure BDA0003131196540000093
The value of P (R, X, V) is already determined, the value of P (S) can be determined according to the value range of S, and the value of P (R, X, V | S) can be further determined according to R, X, V corresponding to the defect b, so the value of the defect classification probability P (S | R, X, V) can be determined according to the bayesian formula.
Optionally, the software defect levels include fatal errors, serious errors, general errors, and suggested problems, and S203, in the defect classification metric space, determining corresponding defect classification probabilities when the defects to be classified are different software defect levels, respectively, may further include: in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a fatal error; determining corresponding defect grading probability when the software defect grade of the defect to be graded is a serious error in a defect grading measurement space; in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a common error; and in the defect grading measurement space, determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem.
Illustratively, based on the defect b in the above embodiment, since the range of S includes four defect levels, i.e. fatal error, general error, and suggestive problem, according to the bayesian formula, the values of the defect classification probabilities P (S | R, X, V) corresponding to the four defect levels can be obtained, specifically as follows:
Figure BDA0003131196540000101
where i represents any one of the four defect levels.
Therefore, in the defect classification metric space, the defect classification probability corresponding to the case where the software defect class of the defect to be classified is a fatal error, the defect classification probability corresponding to the case where the software defect class of the defect to be classified is a general error, and the defect classification probability corresponding to the case where the software defect class of the defect to be classified is a proposed problem can be respectively determined according to the software defect classes.
Fig. 3 is a flowchart of a software defect classification method according to another embodiment of the present application. On the basis of the above embodiments, the embodiments of the present application further illustrate how to perform software defect classification. As shown in fig. 3, the method of the embodiment of the present application may include:
s301, determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified.
For a detailed description of this step, reference may be made to the description related to S201 in the embodiment shown in fig. 2, and details are not described here.
S302, establishing a defect grading measurement space containing software defect grade and attribute information.
For a detailed description of this step, reference may be made to the description related to S202 in the embodiment shown in fig. 2, and details are not repeated here.
S303, determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively in the defect grading measurement space.
For a detailed description of this step, reference may be made to the related description of S203 in the embodiment shown in fig. 2, and details are not repeated here.
S304, determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect grades.
Illustratively, the probability threshold is, for example, 0.5. After determining the corresponding defect classification probabilities when the defects to be classified are respectively different software defect grades, determining the target defect classification of the defects to be classified according to the corresponding defect classification probabilities of the different software defect grades and the probability threshold value of 0.5.
Further, determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect classes may include: if the defect classification probability corresponding to the software defect grade is greater than the probability threshold, determining the software defect grade with the defect classification probability greater than the probability threshold as the target defect classification of the defect to be classified; and if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold, determining that the preset original software defect grade of the defect to be graded is the target defect grade of the defect to be graded.
Illustratively, the probability threshold is, for example, 0.5, assuming that the defect b in the above embodiment corresponds to four defect classification probabilities P (S) respectively obtained for four defect levels (i.e., fatal error, general error, and suggestive problem)iThe value of | R, X, V) is: since the corresponding defect classification probability P (S ═ critical error | R, X, V) when the software defect level is a critical error is greater than the probability threshold value of 0.5, it can be determined that the target defect of defect b (i.e., the defect to be classified) is classified as a critical error, which may also be referred to as a corrected software defect classification. Illustratively, if the defect b in the above embodiment is corresponding to four defect levels (i.e., fatal error, general error, proposed problem), four defect classification probabilities P (S | R, X, V) are obtained respectively, and have the values: since the probability of classification of four types of defects is less than 0.5, the target defect classification of the defect b (i.e., the defect to be classified) can be determined as a preset original software defect classification (e.g., a classification made on the defect to be classified by an artificial software defect classification determined according to an industry-related standard).
S305, storing the target defects of the defects to be classified into a database in a classified mode.
This step is an optional step.
After the target defect classification of the defects to be classified is determined, the target defects of the defects to be classified can be stored into a database in a classification mode and used for classifying the defects of the software in the subsequent software testing process.
The software defect classification method provided by the embodiment of the application establishes a defect classification measurement space containing software defect grades and attribute information by determining attribute information of defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified, the defect classification measurement space determines corresponding defect classification probabilities when the defects to be classified are different software defect grades, the target defect classification of the defects to be classified is determined according to the defect classification probabilities corresponding to the different software defect grades and probability threshold values, and the target defect classification of the defects to be classified is stored in a database in a classification mode. According to the software defect grading method and device, the software defect is associated with the corresponding software requirement, the software test case execution and the software version with the software defect, and the software defect is automatically graded from the dimension of the test process data, so that the accuracy of software defect grading can be greatly improved, and further more powerful guarantee is provided for software defect repair and software quality.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a software defect classification apparatus according to an embodiment of the present application, and as shown in fig. 4, the software defect classification apparatus 400 according to the embodiment of the present application includes: a first determining module 401, a establishing module 402, a second determining module 403 and a processing module 404. Wherein:
the first determining module 401 is configured to determine attribute information of the defect to be classified, where the attribute information includes a software requirement corresponding to the defect to be classified, a software test case execution corresponding to the defect to be classified, and a software version with the defect to be classified.
A creating module 402 for creating a defect-ranking metric space containing software defect-ranking and attribute information.
A second determining module 403, configured to determine, in the defect classification metric space, corresponding defect classification probabilities when the defects to be classified are different software defect classes respectively.
And the processing module 404 is configured to determine a target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect classifications.
In some embodiments, the second determining module 403 may be specifically configured to: determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively according to the following Bayesian formula:
Figure BDA0003131196540000121
wherein, R represents the software requirement corresponding to the software defect, X represents the software test case execution corresponding to the software defect, V represents the software version in which the software defect occurs, S represents the software defect level, P (S | R, X, V) represents the defect classification probability, i.e., the probability of S occurring in the case of R, X, V, P (R, X, V | S) represents the probability of R, X, V occurring in the case of S, P (S) represents the probability of S occurring, and P (R, X, V) represents the probability of R, X, V occurring.
Optionally, the software defect levels include fatal errors, serious errors, general errors, and suggestive problems, and the second determining module 403 may be specifically configured to: in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a fatal error; determining corresponding defect grading probability when the software defect grade of the defect to be graded is a serious error in a defect grading measurement space; in a defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a common error; and in the defect grading measurement space, determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem.
In some embodiments, the processing module 404 may be specifically configured to: and determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect grades.
Optionally, when the processing module 404 is configured to determine the target defect classification of the defect to be classified according to the defect classification probabilities and the probability thresholds corresponding to different software defect classes, the processing module may specifically be configured to: if the defect classification probability corresponding to the software defect grade is greater than the probability threshold, determining the software defect grade with the defect classification probability greater than the probability threshold as the target defect classification of the defect to be classified; and if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold, determining that the preset original software defect grade of the defect to be graded is the target defect grade of the defect to be graded.
Optionally, after determining the target defect classification of the defect to be classified, the processing module 404 may further be configured to: and storing the target defects of the defects to be classified into a database in a classified mode.
The apparatus of this embodiment may be configured to implement the technical solution of any one of the above-mentioned method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Illustratively, the electronic device may be provided as a server or a computer. Referring to fig. 5, an electronic device 500 includes a processing component 501 that further includes one or more processors and memory resources, represented by memory 502, for storing instructions, such as applications, that are executable by the processing component 501. The application programs stored in memory 502 may include one or more modules that each correspond to a set of instructions. Furthermore, the processing component 501 is configured to execute instructions to perform any of the above-described method embodiments.
The electronic device 500 may also include a power component 503 configured to perform power management of the electronic device 500, a wired or wireless network interface 504 configured to connect the electronic device 500 to a network, and an input/output (I/O) interface 505. The electronic device 500 may operate based on an operating system, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like, stored in the memory 502.
The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the scheme of the software defect classification method is implemented.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements an aspect of the software defect classification method as above.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the software defect classification apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for classifying software defects, comprising:
determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified;
establishing a defect grading measurement space containing software defect grades and the attribute information;
determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively in the defect grading measurement space;
and determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
2. The software defect classification method of claim 1, wherein the determining, in the defect classification metric space, the corresponding defect classification probabilities when the defects to be classified are different software defect classes respectively comprises:
determining corresponding defect classification probabilities when the defects to be classified are different software defect grades respectively according to the following Bayesian formula:
Figure FDA0003131196530000011
wherein, R represents the software requirement corresponding to the software defect, X represents the software test case execution corresponding to the software defect, V represents the software version in which the software defect occurs, S represents the software defect level, P (S | R, X, V) represents the defect classification probability, i.e., the probability of S occurring in the case of R, X, V, P (R, X, V | S) represents the probability of R, X, V occurring in the case of S, P (S) represents the probability of S occurring, and P (R, X, V) represents the probability of R, X, V occurring.
3. The method according to claim 1, wherein the software defect levels comprise fatal errors, serious errors, general errors and recommended problems, and the determining the defect classification probabilities corresponding to the defects to be classified respectively in different software defect levels in the defect classification metric space comprises:
determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a fatal error in the defect grading measurement space;
determining corresponding defect grading probability when the software defect grade of the defect to be graded is a serious error in the defect grading measurement space;
in the defect grading measurement space, determining corresponding defect grading probability when the software defect grade of the defect to be graded is a common error;
and in the defect grading measurement space, determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem.
4. The software defect classification method of any one of claims 1 to 3, wherein the determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect classes comprises:
and determining the target defect classification of the defects to be classified according to the defect classification probabilities and the probability threshold values corresponding to different software defect grades.
5. The software defect classification method of claim 4, wherein the determining the target defect classification of the defects to be classified according to the defect classification probability and the probability threshold corresponding to different software defect classes comprises:
if the defect classification probability corresponding to the software defect grade is greater than the probability threshold, determining the software defect grade with the defect classification probability greater than the probability threshold as the target defect grade of the defect to be classified;
and if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold, determining that the preset original software defect grade of the defect to be graded is the target defect grade of the defect to be graded.
6. The software defect classification method of any one of claims 1 to 3, further comprising, after determining a target defect classification for the defect to be classified:
and storing the target defects of the defects to be classified into a database in a classified mode.
7. A software defect classification apparatus, comprising:
the first determining module is used for determining attribute information of the defects to be classified, wherein the attribute information comprises software requirements corresponding to the defects to be classified, software test case execution corresponding to the defects to be classified and software versions with the defects to be classified;
the establishing module is used for establishing a defect grading measurement space containing software defect grades and the attribute information;
the second determining module is used for determining corresponding defect grading probabilities when the defects to be graded are different software defect grades respectively in the defect grading measurement space;
and the processing module is used for determining the target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
8. An electronic device, comprising: a memory and a processor;
the memory is to store program instructions;
the processor is configured to call program instructions in the memory to perform the software defect classification method of any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored therein which, when executed, implement the software defect classification method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the software defect classification method according to any one of claims 1 to 6.
CN202110705821.5A 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium Pending CN113312269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110705821.5A CN113312269A (en) 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110705821.5A CN113312269A (en) 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113312269A true CN113312269A (en) 2021-08-27

Family

ID=77380080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110705821.5A Pending CN113312269A (en) 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113312269A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180095859A1 (en) * 2016-09-30 2018-04-05 Wipro Limited Software testing system and a method for facilitating structured regression planning and optimization
CN109634833A (en) * 2017-10-09 2019-04-16 北京京东尚科信息技术有限公司 A kind of Software Defects Predict Methods and device
CN111078544A (en) * 2019-12-04 2020-04-28 腾讯科技(深圳)有限公司 Software defect prediction method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180095859A1 (en) * 2016-09-30 2018-04-05 Wipro Limited Software testing system and a method for facilitating structured regression planning and optimization
CN109634833A (en) * 2017-10-09 2019-04-16 北京京东尚科信息技术有限公司 A kind of Software Defects Predict Methods and device
CN111078544A (en) * 2019-12-04 2020-04-28 腾讯科技(深圳)有限公司 Software defect prediction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10002064B2 (en) Static analysis based efficient elimination of false positive
CN109344831B (en) Data table identification method and device and terminal equipment
US8209671B2 (en) Computer program testing after source code modification using execution conditions
US8453027B2 (en) Similarity detection for error reports
US9552274B2 (en) Enhancements to logging of a computer program
US20240061680A1 (en) Methods and Apparatus for Finding Long Methods in Code
CN109033772B (en) Verification information input method and device
CN111931731A (en) Question judging method and device, electronic equipment and storage medium
CN112221155B (en) Game data identification method based on artificial intelligence and big data and game cloud center
CN110990276A (en) Automatic testing method and device for interface field and storage medium
CN113780466A (en) Model iterative optimization method and device, electronic equipment and readable storage medium
CN110032505B (en) Software quality determination apparatus and method, and non-transitory computer readable medium
CN115098292A (en) Application program crash root cause identification method and device and electronic equipment
CN111104400A (en) Data normalization method and device, electronic equipment and storage medium
CN112306568A (en) Service instance configuration method and device, electronic equipment and storage medium
US8031950B2 (en) Categorizing images of software failures
US20200250560A1 (en) Determining pattern similarities using a multi-level machine learning system
CN113312269A (en) Software defect grading method, device, equipment and storage medium
US20190317777A1 (en) Determining candidate patches for a computer software
CN111352610A (en) Interface return value modification method and device, electronic equipment and storage medium
CN113377650B (en) Automatic test case operation method and device, test equipment and storage medium
CN113297092A (en) Defect prediction method of software and related equipment
CN114220550A (en) Single disease reporting general method and device, electronic equipment and storage medium
US10152407B1 (en) Optimization of analysis of automated test results
CN111552586B (en) Application crash processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination