CN113312269B - 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
CN113312269B
CN113312269B CN202110705821.5A CN202110705821A CN113312269B CN 113312269 B CN113312269 B CN 113312269B CN 202110705821 A CN202110705821 A CN 202110705821A CN 113312269 B CN113312269 B CN 113312269B
Authority
CN
China
Prior art keywords
defect
software
probability
grading
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.)
Active
Application number
CN202110705821.5A
Other languages
Chinese (zh)
Other versions
CN113312269A (en
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/CN113312269B/en
Publication of CN113312269A publication Critical patent/CN113312269A/en
Application granted granted Critical
Publication of CN113312269B publication Critical patent/CN113312269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a software defect grading method, a device, equipment and a storage medium, wherein the method comprises the following steps: 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 of the defects to be classified, establishing a defect classification measurement space containing the software defect grades and the attribute information, determining corresponding defect classification probabilities when the defects to be classified are respectively different software defect grades 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 application 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 classifying software defects.
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, the industry generally classifies software defect levels into four categories, namely fatal errors, serious errors, general errors and recommended problems according to software running results. Based on the software defect grade dividing rule, a tester divides the software defects into corresponding grades according to the influence degree of the software defects on the software operation output in the software testing process and the self experience. However, the method of manually classifying the software defects depends on the familiarity of the testers with the system and the business, and if the testers are inexperienced, the software defects cannot be accurately classified.
Disclosure of Invention
The application provides a software defect grading method, device, equipment and storage medium, which are used for solving the problem that a tester with insufficient experience cannot accurately grade software defects and improving the accuracy of grading the software defects.
In a first aspect, the present application provides a method for classifying software defects, 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 of the defects to be classified;
establishing a defect grading measurement space containing software defect grades and attribute information;
In the defect classification measurement space, determining corresponding defect classification probability when defects to be classified are respectively different software defect grades;
and determining target defect classification of the defects to be classified according to the defect classification probabilities corresponding to the different software defect grades.
Optionally, determining, in the defect classification metric space, a corresponding defect classification probability when the defects to be classified are respectively different software defect grades, includes: determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades according to the following Bayesian formula:
Wherein R represents software requirements corresponding to the software defect, X represents software test case execution corresponding to the software defect, V represents software version of the software defect, S represents software defect level, P (s|r, X, V) represents defect grading probability, i.e., probability of S occurrence in R, X, V cases, P (R, X, v|s) represents probability of R, X, V occurrence in S cases, P (S) represents probability of S occurrence, and P (R, X, V) represents probability of R, X, V occurrence.
Optionally, the software defect level includes fatal error, serious error, general error and advice problem, and determining the corresponding defect grading probability when the defect to be graded is respectively different software defect levels in the defect grading measurement space includes: 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 fatal error; 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 serious error; 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 general error; and determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem in the defect grading measurement space.
Optionally, determining the target defect classification of the defect to be classified according to the defect classification probabilities corresponding to different software defect grades includes: and determining the target defect classification of the defects to be classified according to the defect classification probabilities and probability thresholds corresponding to different software defect grades.
Optionally, determining the target defect classification of the defect to be classified according to the defect classification probabilities and probability thresholds corresponding to different software defect grades includes: if the defect grading probability corresponding to the software defect grade is larger than the probability threshold value, determining the software defect grade with the defect grading probability larger than the probability threshold value as the target defect grade of the defect to be graded; if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading of the defect to be graded.
Optionally, after determining the target defect classification of the defect to be classified, the software defect classification method further includes: and storing the target defect grades of the defects to be graded into a database.
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 of the defects to be classified;
the establishing module is used for establishing a defect grading measurement space containing software defect grades and attribute information;
the second determining module is used for determining the corresponding defect grading probability when the defects to be graded are respectively different software defect grades in the defect grading measurement space;
and the processing module is used for determining target defect classification of the defects to be classified according to the defect classification probabilities corresponding to the different software defect grades.
Optionally, the second determining module is specifically configured to: determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades according to the following Bayesian formula:
Wherein R represents software requirements corresponding to the software defect, X represents software test case execution corresponding to the software defect, V represents software version of the software defect, S represents software defect level, P (s|r, X, V) represents defect grading probability, i.e., probability of S occurrence in R, X, V cases, P (R, X, v|s) represents probability of R, X, V occurrence in S cases, P (S) represents probability of S occurrence, and P (R, X, V) represents probability of R, X, V occurrence.
Optionally, the software defect level includes fatal errors, serious errors, general errors, and advice problems, and the second determining module is specifically configured to: 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 fatal error; 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 serious error; 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 general error; and determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem in the defect grading measurement space.
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 probability thresholds corresponding to different software defect grades.
Optionally, the processing module is configured to, when determining the target defect classification of the defect to be classified according to the defect classification probabilities and probability thresholds corresponding to different software defect levels, specifically: if the defect grading probability corresponding to the software defect grade is larger than the probability threshold value, determining the software defect grade with the defect grading probability larger than the probability threshold value as the target defect grade of the defect to be graded; if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading 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 defect grades of the defects to be graded into a database.
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, in which computer program instructions are stored, which when executed implement a method for classifying software defects 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 the software defect classification method according to the first aspect of the application.
According to the software defect grading method, device and equipment and the storage medium, the attribute information of the defects to be graded is determined, the attribute information comprises the software requirement corresponding to the defects to be graded, the software test case execution corresponding to the defects to be graded and the software version of the defects to be graded, a defect grading measurement space containing the software defect grades and the attribute information is established, the defect grading probability corresponding to the defects to be graded when the defects to be graded are respectively different software defect grades is determined in the defect grading measurement space, 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 embodiment of the application, the software defects are associated with the corresponding software requirements, software test case execution and software versions with the software defects, and the software defects are automatically graded from the dimension of the test process data, so that the accuracy of grading the software defects can be greatly improved, and further more powerful guarantee is provided for repairing the software defects and guaranteeing the software quality.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of 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 diagram illustrating a software defect classifying 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
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
First, some technical terms related to the present application will be explained:
Software defects, i.e., software that does not achieve the functionality indicated in the product specification, or software that exhibits inconsistent behavior in the product specification. Software defect levels are generally classified according to industry related standards:
(1) Fatal errors: namely, the problems of system breakdown, dead halt and dead circulation, database data loss, database connection error, main function loss, basic module loss and the like are caused.
(2) Serious errors: i.e. a partial loss of the main functions of the system, a database save call error, a loss of user data, and a test that the function menu cannot be used but does not affect other functions. The functional design is seriously inconsistent with the requirements, the module cannot be started or called, the program is restarted, the program is automatically exited, the calling conflict among the related programs, the safety problem, the stability and the like.
(3) General errors: i.e. the functions are not fully realized but the use is not affected, the function menu is defective but the system stability is not affected.
(4) Suggested problem: i.e. interface, performance defect, suggestion problem, not influencing the execution of operation function, scheme capable of optimizing performance, such as wrongly written characters, non-standard interface format, overlapped page display, indistinct display to be hidden, unclear description, lost prompt, irregular character arrangement, incorrect cursor position, poor user experience, scheme capable of optimizing performance, etc.
Software defect classification is an important means for improving software quality and evaluating software processes. According to the related standard suggestions of capacity maturity model integration (Capability Maturity Model Integration, CMMI), national standards and the like, software defect levels can be generally classified into four categories, namely fatal errors, serious errors, general errors and suggestion problems according to operation results. The relevant criteria give a more detailed definition and enumeration of the different levels of severity, but these enumeration are typically evaluated from the end result of the software operation, making it difficult to implement metrics based on specific software requirements. At present, on the basis of the software defect grading rule, a tester generally classifies the software defects into corresponding grades according to the influence degree of the software defects on the software operation output in the software test process and by combining self experience, but the mode of manually classifying the software defects has two defects: firstly, objectively considering only the result of a software test case, which is unfavorable for finding out the potential risk existing in the execution process of the test case; secondly, subjectively depending on the familiarity degree of testers on executed test cases and related services, the accuracy of the software defect classification by the testers with insufficient experience is greatly reduced.
Based on the above problems, the application provides a software defect grading method, a device, equipment and a storage medium, which are characterized in that by corresponding software defects to software requirements, starting from the software requirements, the execution process of a software test case is synthesized, the software defect grading result is further optimized, the software defect grade is objectively evaluated from the dimension of test process data, a valuable objective basis is provided for the traditional software defect grading method, and the accuracy of the software defect grading is improved.
In the following, first, an application scenario of the solution provided by the present application is illustrated.
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 present application scenario, a client 110 sends a defect to be classified to a server 120, the server 120 classifies the defect to be classified, and sends a target defect classification corresponding to the determined defect to be classified to the client 110. The specific implementation process of grading the defects to be graded by the server 120 may be referred to as the schemes of the following embodiments.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided by an embodiment of the present application, and the embodiment of the present application does not limit the devices included in fig. 1 or 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 an external memory with respect to the client 110 or the server 120, or an internal memory integrated into the client 110 or the server 120.
Next, a software defect classification method is described by way of specific embodiments.
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 the 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 defect to be classified, wherein the attribute information comprises software requirements corresponding to the defect to be classified, software test case execution corresponding to the defect to be classified and software version of the defect 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 of the software defect. Wherein:
A software requirement, i.e., a specific set of functional requirement elements, which in an embodiment of the present application is unique, each particular software requirement in a software requirement (set) has a unique code (e.g., denoted by r).
The software version, i.e. the code of the software product developed according to the software requirement (set) and formally submitted to the test, is updated each time the test is submitted. The code 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).
Software test cases, i.e., a collection of execution schemes that test 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 cases are executed, that is, a specific execution is performed on a certain software test case, each execution is performed on a piece of software test case, 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 as having the following attribute information: an identification (Identity Document, ID), i.e. a unique identification code of the software bug; a Requirement (Requirement), namely a code r of a certain Requirement corresponding to the software defect; case Execution (Case Execution), i.e., when a software test Case is executed, the software defect is found at which time, the Execution code x corresponding to the Execution; whether to restart (isReopen), i.e. whether a software defect has occurred 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 has occurred. According to the above steps, a set of attribute values is assigned to each software defect, and the software defect and the corresponding attribute values may be stored in a database, for example, where 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 in which the software defect occurs, and may be understood as establishing a mapping relationship between the software requirement corresponding to the software defect, the software test case execution corresponding to the software defect, the software version in which the software defect occurs, and the software defect.
The defect to be classified is a software defect discovered in the execution process of the software test case, so the attribute information of the defect to be classified comprises the software requirement corresponding to the defect to be classified, the execution of the software test case corresponding to the defect to be classified and the software version of the defect to be classified.
S202, establishing a defect grading measurement space containing software defect grades and attribute information.
In this step, the defect classification metric space is illustratively a four-dimensional vector space, denoted by [ R, X, V, S ], where R represents a software requirement (set) corresponding to a software defect, X represents a software test case execution (set) corresponding to a software defect, V represents a software version (set) in which a software defect occurs, S represents a software defect level (set), S is, for example, a software defect level determined according to an industry related standard, including fatal errors, serious errors, general errors, and recommended problems, and S may also be referred to as a 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 defects 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 the software defect, x is a software test case execution code corresponding to the software defect, v is a software version in which the software defect occurs (if the software defect does not occur in a previous software version, the corresponding value is 0, if the software defect occurs in the previous software version, the corresponding value is a software version code value in which the software defect occurs), and s is a software defect grade code.
After the attribute information of the defect to be classified is determined, 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, determining corresponding defect grading probabilities when defects to be graded are respectively different software defect grades in the defect grading measurement space.
After the defect classification measurement space containing the software defect grades and the attribute information is established, the corresponding defect classification probability when the defects to be classified are respectively different software defect grades can be determined in the defect classification measurement space. For how to determine the probability of defect classification corresponding to the defects to be classified respectively in the defect classification metric space, reference may be made to the related art or the subsequent embodiments, and the description thereof will not be repeated here.
S204, determining target defect classification of the defects to be classified according to the defect classification probabilities corresponding to different software defect grades.
After determining the corresponding defect grading probabilities when the defects to be graded are respectively different software defect grades, determining the target defect grading of the defects to be graded according to the defect grading probabilities corresponding to the different software defect grades. For determining 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 the related art or the subsequent embodiments, and details thereof will not be repeated herein.
According to the software defect grading method provided by the embodiment of the application, the attribute information of the defects to be graded is determined, the attribute information comprises the software requirement corresponding to the defects to be graded, the software test case execution corresponding to the defects to be graded and the software version of the defects to be graded, a defect grading measurement space containing the software defect grade and the attribute information is established, in the defect grading measurement space, the corresponding defect grading probability when the defects to be graded are respectively different software defect grades is determined, and the target defect grading of the defects to be graded is determined according to the defect grading probability corresponding to the different software defect grades. According to the embodiment of the application, the software defects are associated with the corresponding software requirements, software test case execution and software versions with the software defects, and the software defects are automatically graded from the dimension of the test process data, so that the accuracy of grading the software defects can be greatly improved, and further more powerful guarantee is provided for repairing the software defects and guaranteeing the software quality.
Based on the foregoing embodiment, in a specific implementation manner, in the defect classification metric space, determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades may further include: determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades according to the following Bayesian formula:
Wherein R represents software requirements corresponding to the software defect, X represents software test case execution corresponding to the software defect, V represents software version of the software defect, S represents software defect level, P (s|r, X, V) represents defect grading probability, i.e., probability of S occurrence in R, X, V cases, P (R, X, v|s) represents probability of R, X, V occurrence in S cases, P (S) represents probability of S occurrence, and P (R, X, V) represents probability of R, X, V occurrence.
Illustratively, assuming that the defect to be classified is defect b, in the defect classification metric space, the software requirement (i.e., R), software test case execution (i.e., X), and the software version (i.e., V) in which defect b occurs may be determined for defect b. The probability most probable classification for defect b can be calculated according to the following bayesian theory: Wherein the value range of S is determined (e.g., a software defect level determined according to an industry-related standard), and P (S, R, X, V) represents a probability of S, R, X, V occurring simultaneously. Since R, X, V corresponding to defect b has been determined, the value of P (R, X, V) can be determined. Further, the formula corresponding to the bayesian theory may be converted into the bayesian formula according to the bayesian theorem: wherein, the value of P (R, X, V) has been determined, the value of P (S) can be determined according to the value range of S, and then the value of P (R, X, v|S) can be further determined according to R, X, V corresponding to the defect b, so that the value of the defect grading probability P (S|R, X, V) can be determined according to the Bayesian formula.
Optionally, the software defect level includes fatal error, serious error, general error, and recommended problem, S203, determining, in the defect classification metric space, a corresponding defect classification probability when the defects to be classified are respectively different software defect levels, may further include: 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 fatal error; 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 serious error; 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 general error; and determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem in the defect grading measurement space.
Illustratively, based on the defect b in the above embodiment, since the value range of S includes four defect levels, that is, fatal error, serious error, general error, and advice problem, according to the above bayesian formula, the values of the defect classification probabilities P (s|r, X, V) corresponding to the four defect levels, respectively, can be obtained as follows:
where i represents any one of four defect levels.
Therefore, in the defect classification measurement space, the defect classification probability corresponding to the case that the software defect grade of the defect to be classified is a fatal error, the defect classification probability corresponding to the case that the software defect grade of the defect to be classified is a serious error, the defect classification probability corresponding to the case that the software defect grade of the defect to be classified is a general error, and the defect classification probability corresponding to the case that the software defect grade of the defect to be classified is a suggested problem can be respectively determined according to the software defect grade.
FIG. 3 is a flowchart of a software defect classification method according to another embodiment of the present application. Based on the above embodiments, the embodiments of the present application further describe how to classify software defects. As shown in fig. 3, the method of the embodiment of the present application may include:
s301, determining attribute information of the defect to be classified, wherein the attribute information comprises software requirements corresponding to the defect to be classified, software test case execution corresponding to the defect to be classified and software versions of the defect to be classified.
A detailed description of this step may be referred to the related description of S201 in the embodiment shown in fig. 2, and will not be repeated here.
S302, establishing a defect grading measurement space containing software defect grades and attribute information.
A detailed description of this step may be referred to the related description of S202 in the embodiment shown in fig. 2, and will not be repeated here.
S303, determining corresponding defect grading probabilities when defects to be graded are respectively different software defect grades in the defect grading measurement space.
A detailed description of this step may be referred to the related description of S203 in the embodiment shown in fig. 2, and will not be repeated here.
S304, determining target defect classification of the defects to be classified according to defect classification probabilities corresponding to different software defect grades and probability thresholds.
Illustratively, the probability threshold is, for example, 0.5. After determining the defect classification probability corresponding to the defects to be classified 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 defect classification probability corresponding to the different software defect grades and the probability threshold value of 0.5.
Further, determining the target defect classification of the defect to be classified according to the defect classification probability and the probability threshold corresponding to different software defect grades may include: if the defect grading probability corresponding to the software defect grade is larger than the probability threshold value, determining the software defect grade with the defect grading probability larger than the probability threshold value as the target defect grade of the defect to be graded; if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading of the defect to be graded.
Illustratively, the probability threshold is, for example, 0.5, and the values of the four defect classification probabilities P (S i |r, X, V) obtained for the four defect classes (i.e., fatal error, serious error, general error, advice problem) respectively are assumed to be: p (s=fatal error|r, X, V) is 0.1, P (s=fatal error|r, X, V) is 0.6, P (s=general error|r, X, V) is 0.2, P (s=recommended problem|r, X, V) is 0.1, and since the corresponding defect classification probability P (s=fatal error|r, X, V) is greater than the probability threshold value 0.5 when the software defect level is a fatal error, it is possible to determine the target defect classification of the defect b (i.e., defect to be classified) as a fatal error, which may also be referred to as correcting the software defect classification. Illustratively, if the defect b in the above embodiment corresponds to four defect levels (i.e., fatal error, serious error, general error, recommended problem), the values of the four defect classification probabilities P (s|r, X, V) obtained respectively are: p (s=fatal error |r, X, V) is 0.3, P (s=general error |r, X, V) is 0.2, P (s=recommended problem |r, X, V) is 0.2, and since the probability of classification of four defects is less than the probability threshold value of 0.5, it is possible to determine that the target defect classification of defect b (i.e., defect to be classified) is a preset original software defect classification (such as a classification made manually for the defect to be classified according to the software defect classification determined by the industry-related standard).
S305, storing the target defect grades of the defects to be graded into a database.
This step is an optional step.
After determining the target defect classification of the defects to be classified, the target defect classification of the defects to be classified can be stored in a database for classifying the defects of the software which appear in the subsequent software testing process.
According to the software defect grading method provided by the embodiment of the application, the attribute information of the defects to be graded is determined, the attribute information comprises the software requirement corresponding to the defects to be graded, the software test case execution corresponding to the defects to be graded and the software version of the defects to be graded, a defect grading measurement space containing the software defect grade and the attribute information is established, the defect grading probability corresponding to the defects to be graded when the defects to be graded are respectively different software defect grades is determined in the defect grading measurement space, 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 and the probability threshold, and the target defect grading of the defects to be graded is stored in the database. According to the embodiment of the application, the software defects are associated with the corresponding software requirements, software test case execution and software versions with the software defects, and the software defects are automatically graded from the dimension of the test process data, so that the accuracy of grading the software defects can be greatly improved, and further more powerful guarantee is provided for repairing the software defects and guaranteeing the software quality.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a software defect grading apparatus according to an embodiment of the present application, and as shown in fig. 4, a software defect grading apparatus 400 according to an embodiment of the present application includes: a first determination module 401, a setup module 402, a second determination 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, execution of a software test case corresponding to the defect to be classified, and a software version of the defect to be classified.
An establishing module 402 is configured to establish a defect classification metric space containing software defect levels and attribute information.
The second determining module 403 is configured to determine, in the defect classification metric space, a corresponding defect classification probability when the defects to be classified are respectively different software defect grades.
And the processing module 404 is configured to determine a target defect classification of the defect to be classified according to the defect classification probabilities corresponding to the different software defect grades.
In some embodiments, the second determining module 403 may be specifically configured to: determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades according to the following Bayesian formula:
Wherein R represents software requirements corresponding to the software defect, X represents software test case execution corresponding to the software defect, V represents software version of the software defect, S represents software defect level, P (s|r, X, V) represents defect grading probability, i.e., probability of S occurrence in R, X, V cases, P (R, X, v|s) represents probability of R, X, V occurrence in S cases, P (S) represents probability of S occurrence, and P (R, X, V) represents probability of R, X, V occurrence.
Optionally, the software defect level includes fatal errors, serious errors, general errors, advice questions, and the second determining module 403 may be specifically configured to: 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 fatal error; 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 serious error; 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 general error; and determining the corresponding defect grading probability when the software defect grade of the defect to be graded is a suggested problem in the defect grading measurement space.
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 probability thresholds 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 probability thresholds corresponding to different software defect grades, the processing module may be specifically configured to: if the defect grading probability corresponding to the software defect grade is larger than the probability threshold value, determining the software defect grade with the defect grading probability larger than the probability threshold value as the target defect grade of the defect to be graded; if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading of the defect to be graded.
Optionally, the processing module 404 may be further configured to, after determining the target defect classification of the defect to be classified: and storing the target defect grades of the defects to be graded into a database.
The device of the present embodiment may be used to execute the technical solution of any of the above-described method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may be provided as a server or computer, for example. 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, executable by the processing component 501. The application program stored in memory 502 may include one or more modules each corresponding to a set of instructions. Further, the processing component 501 is configured to execute instructions to perform any of the method embodiments described above.
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 stored in the memory 502, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the scheme of the software defect grading method is realized.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements a solution of the software defect classification method as above.
The computer readable storage medium described above 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 disk, or optical disk. A readable storage medium can be any available medium 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. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). The processor and the readable storage medium may, of course, also reside as discrete components in a software defect classification apparatus.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (6)

1. A method for classifying software defects, comprising:
determining attribute information of a defect to be classified, wherein the attribute information comprises software requirements corresponding to the defect to be classified, software test case execution corresponding to the defect to be classified and a software version of the defect to be classified; wherein the software requirement refers to a set of specific functional requirement elements; the software test case execution is one-time execution of one software test case; the software test case is a set of execution schemes for testing the software according to the software requirement; establishing a software requirement corresponding to the software defect, executing a software test case corresponding to the software defect, and generating a mapping relation between a software version of the software defect and the software defect;
Establishing a defect grading measurement space containing software defect grades and the attribute information; wherein the defect grading metric space is a four-dimensional vector space, using The representation, wherein,Representing the software requirements corresponding to the software defect,Representing the execution of the software test case corresponding to the software defect,Indicating the software version in which the software defect has occurred,Representing a software defect level;
in the defect grading measurement space, determining corresponding defect grading probability when the defects to be graded are respectively different software defect grades;
Determining target defect classification of the defects to be classified according to defect classification probabilities corresponding to different software defect grades and probability thresholds;
The software defect level includes fatal error, serious error, general error and suggestion problem, and the determining the corresponding defect grading probability when the defects to be graded are respectively different software defect levels in the defect grading measurement space includes:
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 fatal error;
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 serious error;
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 general error;
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 the defect classification measurement space, determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades includes:
Determining the corresponding defect classification probability when the defects to be classified are respectively different software defect grades according to the following Bayesian formula: Representing the probability of defect grading, i.e. at In the case of occurrenceThe probability of the occurrence of this is,Is shown inIn the case of occurrenceThe probability of the occurrence of this is,Representation ofThe probability of the occurrence of this is,Representation ofProbability of occurrence;
the determining the target defect classification of the defects to be classified according to the defect classification probabilities and probability thresholds corresponding to different software defect grades comprises the following steps:
if the defect grading probability corresponding to the software defect grade is larger than the probability threshold, determining that the software defect grade with the defect grading probability larger than the probability threshold is the target defect grade of the defect to be graded;
if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading of the defect to be graded.
2. The software defect classification method of claim 1, further comprising, after determining the target defect classification of the defect to be classified:
And storing the target defect classification of the defect to be classified into a database.
3. A software defect classification apparatus, comprising:
The first determining module is used for determining attribute information of the defect to be classified, wherein the attribute information comprises software requirements corresponding to the defect to be classified, software test case execution corresponding to the defect to be classified and a software version of the defect to be classified; wherein the software requirement refers to a set of specific functional requirement elements; the software test case execution is one-time execution of one software test case; the software test case is a set of execution schemes for testing the software according to the software requirement; establishing a software requirement corresponding to the software defect, executing a software test case corresponding to the software defect, and generating a mapping relation between a software version of the software defect and the software defect;
the establishing module is used for establishing a defect grading measurement space containing software defect grades and the attribute information; wherein the defect grading metric space is a four-dimensional vector space, using The representation, wherein,Representing the software requirements corresponding to the software defect,Representing the execution of the software test case corresponding to the software defect,Indicating the software version in which the software defect has occurred,Representing a software defect level;
the second determining module is used for determining the corresponding defect grading probability when the defects to be graded are respectively different software defect grades in the defect grading measurement space;
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;
the software defect level includes fatal errors, serious errors, general errors, and recommended problems; the second determining module is specifically configured to determine, in the defect classification metric space, a defect classification probability corresponding to when the software defect level of the defect to be classified is a fatal error;
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 serious error;
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 general error;
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;
the second determining module is specifically configured to determine, according to the following bayesian formula, a corresponding defect classification probability when the defects to be classified are respectively different software defect levels: Representing the probability of defect grading, i.e. at In the case of occurrenceThe probability of the occurrence of this is,Is shown inIn the case of occurrenceThe probability of the occurrence of this is,Representation ofThe probability of the occurrence of this is,Representation ofProbability of occurrence;
The processing module is specifically configured to determine a target defect classification of the defect to be classified according to defect classification probabilities and probability thresholds corresponding to different software defect levels;
The processing module is specifically configured to determine that the software defect level with the defect classification probability greater than the probability threshold is the target defect classification of the defect to be classified if the defect classification probability corresponding to the software defect level is greater than the probability threshold;
if the defect grading probability corresponding to the software defect grade is smaller than or equal to the probability threshold value, determining that the preset original software defect grading of the defect to be graded is the target defect grading of the defect to be graded.
4. 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 any of claims 1 to 2.
5. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein computer program instructions which, when executed, implement the software defect classification method according to any of claims 1 to 2.
6. A computer program product comprising a computer program which, when executed by a processor, implements the software defect classification method according to any one of claims 1 to 2.
CN202110705821.5A 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium Active CN113312269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110705821.5A CN113312269B (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 CN113312269B (en) 2021-06-24 2021-06-24 Software defect grading method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113312269A CN113312269A (en) 2021-08-27
CN113312269B true CN113312269B (en) 2024-07-09

Family

ID=77380080

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113312269B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10127134B2 (en) * 2016-09-30 2018-11-13 Wipro Limited Software testing system and a method for facilitating structured regression planning and optimization
US20190346338A1 (en) * 2017-01-25 2019-11-14 Bechtel Oil, Gas & Chemicals, Inc. Systems and methods for evaluating and maintaining structural integrity

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN113312269A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN109284269B (en) Abnormal log analysis method and device, storage medium and server
US8209671B2 (en) Computer program testing after source code modification using execution conditions
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
US7747987B1 (en) System and method of analyzing risk in risk-based software testing
US11835987B2 (en) Methods and apparatus for finding long methods in code
US20150378863A1 (en) Enhancements to logging of a computer program
US10133651B2 (en) Software defect analysis tool
US20150074648A1 (en) Software defect verification
US10140201B2 (en) Software defect detection tool
US20150378869A1 (en) Measuring the logging quality of a computer program
Allier et al. A framework to compare alert ranking algorithms
US10783067B2 (en) Software quality determination apparatus, software quality determination method, and software quality determination program
CN112149136A (en) loT device firmware vulnerability detection method and system and electronic device
CN113282513A (en) Interface test case generation method and device, computer equipment and storage medium
CN113377650B (en) Automatic test case operation method and device, test equipment and storage medium
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN112306568A (en) Service instance configuration method and device, electronic equipment and storage medium
CN113312269B (en) Software defect grading method, device, equipment and storage medium
CN109446077A (en) A kind of data library test method and device
CN117171030A (en) Method, device, equipment and storage medium for detecting software running environment
WO2020157795A1 (en) Test device, test method, and test program
CN111382052A (en) Code quality evaluation method and device and electronic equipment
US20180275981A1 (en) Determining candidate patches for a computer software
CN113157583A (en) Test method, device and equipment
CN113297092A (en) Defect prediction method of software and related equipment

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
GR01 Patent grant
GR01 Patent grant