Movatterモバイル変換


[0]ホーム

URL:


CN112527631A - bug positioning method, system, electronic equipment and storage medium - Google Patents

bug positioning method, system, electronic equipment and storage medium
Download PDF

Info

Publication number
CN112527631A
CN112527631ACN202011300296.0ACN202011300296ACN112527631ACN 112527631 ACN112527631 ACN 112527631ACN 202011300296 ACN202011300296 ACN 202011300296ACN 112527631 ACN112527631 ACN 112527631A
Authority
CN
China
Prior art keywords
bug
machine learning
code block
learning model
function
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
CN202011300296.0A
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.)
Wuhan Maiwei Communications Co ltd
Original Assignee
Wuhan Maiwei Communications Co ltd
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 Wuhan Maiwei Communications Co ltdfiledCriticalWuhan Maiwei Communications Co ltd
Priority to CN202011300296.0ApriorityCriticalpatent/CN112527631A/en
Publication of CN112527631ApublicationCriticalpatent/CN112527631A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the invention provides a bug positioning method, a bug positioning system, electronic equipment and a storage medium based on machine learning, wherein the method comprises the following steps: inputting the bug to be positioned into the trained machine learning model, and outputting a code block corresponding to the bug to be positioned; the machine learning model is trained according to a training set including bugs and code blocks corresponding to each bug. According to the embodiment of the invention, the code block generating the bug is positioned by training the machine learning model, so that the time for positioning the bug is shortened, and the iteration efficiency of the product quality is improved.

Description

bug positioning method, system, electronic equipment and storage medium
Technical Field
The invention relates to the field of software testing, in particular to a bug positioning method, a bug positioning system, electronic equipment and a storage medium.
Background
In the field of software testing, software testing is to analyze the reason for bug occurrence, that is, to find out the code block generating bug.
At present, software engineering is fine in labor division, testers are uneven in level, and one BUG usually needs multiple research and development or test layer-by-layer positioning to know the cause of the problem. The time for BUG resolution often depends on the time at which the BUG is located, rather than the time at which the code is modified.
Therefore, a method for shortening the time for positioning the bug is needed to improve the efficiency of product quality iteration.
Disclosure of Invention
Embodiments of the present invention provide a method, a system, an electronic device, and a storage medium for positioning a bug based on machine learning, which overcome or at least partially solve the above problems.
According to a first aspect of the embodiments of the present invention, there is provided a bug positioning method based on machine learning, including:
inputting a bug to be positioned into the trained machine learning model, and outputting a code block corresponding to the bug to be positioned;
the machine learning model is trained according to a training set including bugs and code blocks corresponding to each bug.
On the basis of the above technical solutions, the embodiments of the present invention may be further improved as follows.
Further, the method also comprises the following steps:
collecting each bug, functionally classifying each bug, and establishing detailed description information and a solution for each bug, wherein the relevant code blocks can be associated through the detailed description information and the solution of each bug;
collecting each code block, and performing functional classification on each code block;
establishing an incidence relation between each bug and the code block, and taking each bug and the corresponding code block as a training set;
and training the machine learning model by adopting a training set.
Further, each collected bug comprises bugs with different products, different modules, different severity degrees and different priorities, and each collected code block comprises code blocks with different products, different modules and different versions.
Further, the method also comprises the following steps:
marking each bug and each code block in the training set with the function attribute;
correspondingly, the code block corresponding to the bug to be positioned and output by the machine learning model is marked with functional attributes.
Further, the code block corresponding to each bug is a function or a function module or an API interface, and the training set includes each bug and its corresponding function or its corresponding function module or its corresponding API interface;
correspondingly, the bug to be positioned is input into the trained machine learning model, and a code block corresponding to the bug to be positioned is output; the method comprises the following steps:
and inputting the bug to be positioned into the trained machine learning model, and outputting a function or functional module or API (application programming interface) corresponding to the bug to be positioned.
According to a second aspect of the embodiments of the present invention, there is provided a bug positioning system based on machine learning, including:
the training module is used for training the machine learning model according to a training set comprising the bugs and the code blocks corresponding to the bugs;
and the input module is used for inputting the bug to be positioned into the trained machine learning model and outputting the code block corresponding to the bug to be positioned.
Further, the code block corresponding to each bug is a function or a function module or an API interface, and the training set includes each bug and its corresponding function or its corresponding function module or its corresponding API interface;
correspondingly, the input module is configured to input the bug to be positioned into the trained machine learning model, and outputting the code block corresponding to the bug to be positioned includes:
and inputting the bug to be positioned into the trained machine learning model, and outputting a function or functional module or API (application programming interface) corresponding to the bug to be positioned.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device, including a memory, and a processor, where the processor is configured to implement the steps of the bug positioning method based on machine learning when executing a computer management class program stored in the memory.
According to a fourth aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, on which a computer management class program is stored, which, when executed by a processor, implements the steps of the machine learning-based bug positioning method.
The embodiment of the invention provides a bug positioning method, a bug positioning system, electronic equipment and a storage medium based on machine learning, wherein a bug to be positioned is input into a trained machine learning model, and a code block corresponding to the bug to be positioned is output; the machine learning model is trained according to a training set including bugs and code blocks corresponding to each bug. According to the embodiment of the invention, the code block generating the bug is positioned by training the machine learning model, so that the time for positioning the bug is shortened, and the iteration efficiency of the product quality is improved.
Drawings
Fig. 1 is a flowchart of a bug positioning method based on machine learning according to an embodiment of the present invention;
fig. 2 is an overall flowchart of a bug positioning method based on machine learning according to an embodiment of the present invention;
fig. 3 is a structural diagram of a bug positioning system based on machine learning according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a possible electronic device according to an embodiment of the present invention;
fig. 5 is a schematic hardware structure diagram of a possible computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Fig. 1 is a flowchart of a bug positioning method based on machine learning according to an embodiment of the present invention, and as shown in fig. 1, the method includes: 101. training the machine learning model according to a training set comprising the bugs and the code blocks corresponding to the bugs; 102. and inputting the bug to be positioned into the trained machine learning model, and outputting the code block corresponding to the bug to be positioned.
It can be understood that, based on the problem that in the prior art, the efficiency is low when a code block generating a bug is manually positioned, the embodiment of the invention provides a method and a device for automatically positioning a code block generating a bug. Based on supervised learning, training a machine learning model through various collected bugs and a code block for generating the bugs, inputting the bugs to be positioned into the trained machine learning model, and outputting the code block for generating the bugs.
The code blocks for generating the bug can be automatically positioned by training the machine learning model, so that the bug positioning time is shortened, and the iteration efficiency of the product quality is improved.
In a possible implementation manner, the method further includes: collecting each bug, functionally classifying each bug, and establishing detailed description information and a solution for each bug, wherein the relevant code blocks can be associated through the detailed description information and the solution of each bug; collecting each code block, and performing functional classification on each code block; establishing an incidence relation between each bug and the code block, and taking each bug and the corresponding code block as a training set; and training the machine learning model by adopting a training set.
It can be understood that, when the training set is collected, various bugs are collected, each bug is functionally classified, and detailed description information and a solution are established for each bug, wherein the detailed description information and the solution of each bug can be used as a basis for association of the code block. The collected code blocks are also functionally classified. After the bugs and the code blocks are collected, each bug and each code block are corresponding to each other to serve as a training set, a machine learning model is trained through the training set, and the trained machine learning model is used for positioning the code blocks of the bug to be positioned.
In a possible embodiment mode, each collected bug comprises bugs with different products, different modules, different degrees of severity and different priorities, and each collected code block comprises code blocks with different products, different modules and different versions.
It can be understood that, in order to increase the application range of the machine learning model, when various bugs are collected, bugs of different products, different modules, different severity degrees and different priorities are collected; likewise, when collecting code blocks, different products, different modules, and different versions of code blocks are collected. The machine learning model is trained through a large area, various bugs and different code blocks, and the trained machine learning model can be suitable for more scenes.
In a possible implementation manner, the method further includes: marking each bug and each code block in the training set with the function attribute; correspondingly, the code block corresponding to the bug to be positioned and output by the machine learning model is marked with functional attributes.
It is understood that, by introducing the foregoing, the bugs and the code blocks in the training set are functionally classified, and each bug and the corresponding code block in the training set may be labeled with a functional attribute.
When the machine learning model is trained, the bug marked with the functional attribute and the code block marked with the functional attribute are used for training, and after the machine learning model is trained, when the bug to be positioned is input into the trained machine learning model, the output code block is also marked with the functional attribute.
In a possible embodiment, the code block corresponding to each bug is a function or a function module or an API interface, and the training set includes each bug and its corresponding function or its corresponding function module or its corresponding API interface. Correspondingly, inputting the bug to be positioned into the trained machine learning model, and outputting the code block corresponding to the bug to be positioned comprises: and inputting the bug to be positioned into the trained machine learning model, and outputting a function or functional module or API (application programming interface) corresponding to the bug to be positioned.
It should be understood that the code block in the embodiment of the present invention is located to a certain function or a certain functional module or an API (Application Programming Interface), and correspondingly, the training set includes each bug and the corresponding function or functional module or API Interface. When training the machine learning model, the bug and the function or function module or API interface generating the bug are used for training.
Similarly, the bug with the location is input into the trained machine learning model, and the output is the function or functional module or API interface for generating the bug to be located.
Referring to fig. 2, a description is given of a bug positioning method based on machine learning according to an embodiment of the present invention, first, various bugs and various code blocks are collected, each bug and a corresponding code block are associated to form a training set, and a machine learning model is trained by using the training set. And finally, accurately positioning the code block corresponding to the bug to be positioned by using the trained machine learning model.
According to the embodiment of the invention, the code block generating the bug is positioned by training the machine learning model, so that the time for positioning the bug is shortened, and the iteration efficiency of the product quality is improved.
Referring to fig. 3, there is provided a bug positioning system based on machine learning, comprising a training module 301 and an input module 302, wherein:
the training module 301 is configured to train a machine learning model according to a training set including the bugs and the code blocks corresponding to the bugs;
the input module 302 is configured to input the bug to be positioned into the trained machine learning model, and output the code block corresponding to the bug to be positioned.
The code block corresponding to each bug is a function or a function module or an API interface, and the training set comprises each bug and the function or the function module or the API interface corresponding to the bug. Correspondingly, the bug to be positioned is input into the trained machine learning model, and a function or functional module or API interface corresponding to the bug to be positioned is output.
The bug positioning system based on machine learning provided by the embodiment of the present invention corresponds to the bug positioning method based on machine learning provided by the foregoing embodiments, and the relevant technical features of the bug positioning system based on machine learning may refer to the relevant technical features of the bug positioning method based on machine learning, and will not be described again here.
Referring to fig. 4, fig. 4 is a schematic view of an embodiment of an electronic device according to an embodiment of the present disclosure. As shown in fig. 4, an electronic device according to an embodiment of the present application includes amemory 410, aprocessor 420, and acomputer program 411 stored in thememory 420 and executable on theprocessor 420, where theprocessor 420 executes thecomputer program 411 to implement the following steps: inputting a bug to be positioned into the trained machine learning model, and outputting a code block corresponding to the bug to be positioned; the machine learning model is trained according to a training set including bugs and code blocks corresponding to each bug.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating an embodiment of a computer-readable storage medium according to the present application. As shown in fig. 5, the present embodiment provides a computer-readable storage medium 500 having acomputer program 511 stored thereon, thecomputer program 511 implementing the following steps when executed by a processor: inputting a bug to be positioned into the trained machine learning model, and outputting a code block corresponding to the bug to be positioned; the machine learning model is trained according to a training set including bugs and code blocks corresponding to each bug.
It should be noted that, in the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to relevant descriptions of other embodiments for parts that are not described in detail in a certain embodiment.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include such modifications and variations.

Claims (9)

CN202011300296.0A2020-11-182020-11-18bug positioning method, system, electronic equipment and storage mediumPendingCN112527631A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011300296.0ACN112527631A (en)2020-11-182020-11-18bug positioning method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011300296.0ACN112527631A (en)2020-11-182020-11-18bug positioning method, system, electronic equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN112527631Atrue CN112527631A (en)2021-03-19

Family

ID=74981600

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011300296.0APendingCN112527631A (en)2020-11-182020-11-18bug positioning method, system, electronic equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN112527631A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113254329A (en)*2021-04-302021-08-13展讯通信(天津)有限公司Bug processing method, system, equipment and storage medium based on machine learning

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105653444A (en)*2015-12-232016-06-08北京大学Internet log data-based software defect failure recognition method and system
CN105893256A (en)*2016-03-302016-08-24西北工业大学Software failure positioning method based on machine learning algorithm
CN107153630A (en)*2016-03-042017-09-12阿里巴巴集团控股有限公司The training method and training system of a kind of machine learning system
CN107491388A (en)*2017-07-282017-12-19深圳市元征科技股份有限公司Bug method and device in a kind of positioning program code
CN109298993A (en)*2017-07-212019-02-01深圳市中兴微电子技术有限公司 A method, apparatus and computer-readable storage medium for detecting faults
CN109697162A (en)*2018-11-152019-04-30西北大学A kind of software defect automatic testing method based on Open Source Code library
CN110502361A (en)*2019-08-292019-11-26扬州大学 Fine-grained defect localization method for bug reporting

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105653444A (en)*2015-12-232016-06-08北京大学Internet log data-based software defect failure recognition method and system
CN107153630A (en)*2016-03-042017-09-12阿里巴巴集团控股有限公司The training method and training system of a kind of machine learning system
CN105893256A (en)*2016-03-302016-08-24西北工业大学Software failure positioning method based on machine learning algorithm
CN109298993A (en)*2017-07-212019-02-01深圳市中兴微电子技术有限公司 A method, apparatus and computer-readable storage medium for detecting faults
CN107491388A (en)*2017-07-282017-12-19深圳市元征科技股份有限公司Bug method and device in a kind of positioning program code
CN109697162A (en)*2018-11-152019-04-30西北大学A kind of software defect automatic testing method based on Open Source Code library
CN110502361A (en)*2019-08-292019-11-26扬州大学 Fine-grained defect localization method for bug reporting

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113254329A (en)*2021-04-302021-08-13展讯通信(天津)有限公司Bug processing method, system, equipment and storage medium based on machine learning

Similar Documents

PublicationPublication DateTitle
CN117421217B (en)Automatic software function test method, system, terminal and medium
CN106446412B (en)Model-based test method for avionics system
CN107908550B (en)Software defect statistical processing method and device
CN105320589B (en)The automatic resolution system of test script and its implementation in cloud test environment
WO2019056720A1 (en)Automated test case management method and apparatus, device, and storage medium
CN109697468B (en)Sample image labeling method and device and storage medium
CN104182335A (en)Software testing method and device
CN111475401A (en)Test method and related equipment
CN110109831A (en)Automated test frame system, automated testing method and terminal device
CN105912460A (en)Software test method and system based on QTP
CN110969600A (en) A product defect detection method, device, electronic device and storage medium
CN109145981B (en)Deep learning automatic model training method and equipment
CN111198811A (en) A method, device, electronic device and storage medium for automated page testing
CN111651365B (en)Automatic interface testing method and device
CN110069414B (en)Regression testing method and system
CN115576834A (en)Software test multiplexing method, system, terminal and medium for supporting fault recovery
WO2022134001A1 (en)Machine learning model framework development method and system based on containerization technology
CN112527676A (en)Model automation test method, device and storage medium
CA3144852A1 (en)Automatic generation of integrated test procedures using system test procedures
CN108132881A (en)A kind of automated testing method and system
CN108959078A (en)A kind of end Windows automatic software test method and system
CN112527631A (en)bug positioning method, system, electronic equipment and storage medium
Njomou et al.On the challenges of migrating to machine learning life cycle management platforms
CN116383095B (en) Smoke testing method, system and readable storage medium based on RPA robot
CN109871172B (en)Mouse clicking method and device in automatic test and readable storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210319


[8]ページ先頭

©2009-2025 Movatter.jp