CN106909502A - Accidental correctness test case recognition methods and software error localization method - Google Patents
Accidental correctness test case recognition methods and software error localization method Download PDFInfo
- Publication number
- CN106909502A CN106909502A CN201710025373.8A CN201710025373A CN106909502A CN 106909502 A CN106909502 A CN 106909502A CN 201710025373 A CN201710025373 A CN 201710025373A CN 106909502 A CN106909502 A CN 106909502A
- Authority
- CN
- China
- Prior art keywords
- accidental
- correctness
- test case
- program
- track information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to the recognition methods of accidental correctness test case and software error localization method, when software error positioning is carried out, implement the steps of successively:The perform track information of acquisition program;Recognize accidental correctness element;Characteristic element is picked out from the accidental correctness element for identifying;Dimension to the program perform track information for obtaining is carried out according to the characteristic element picked out brief, uncorrelated element in removal program perform track information;Program perform track information and Fuzzy c means clustering algorithms according to dimension after brief recognize accidental correctness test case, then carry out location of mistake using the accidental correctness test case for identifying.Reliability is higher when carrying out the identification of accidental correctness test case using the algorithm, not only can effectively recognize accidental correctness test case, and when carrying out software error using the recognition methods and positioning, location efficiency can be obviously improved.
Description
Technical field
The present invention relates to the recognition methods of accidental correctness test case and software error localization method, belong to using accidentally just
True property test case carries out the technical field of software error positioning.
Background technology
Software error location efficiency may be influenceed by factors, such as the accidental correctness of test case, test case
Prioritization, test case composition and test case coverage rate etc.;Particularly with complicated big software program, removal is even
Right correctness test case can effectively improve the efficiency of software error positioning.And it is based on the location of mistake method of coverage information
It is deep to receive industrial quarters and academia's extensive concern.But the location efficiency of this kind of location of mistake method is due to various factors, for example,
Priorities of test cases sequence, accidental correctness etc..Influence present invention is primarily concerned with accidental correctness to location of mistake efficiency.
Accidental correctness refer to there is mistake in program but test still through phenomenon, i.e. program performs wrong sentence, but
Correctness of the error condition of infection without influence on output result.It is that influence (negative effect) location of mistake efficiency is most important
One of factor.The generality that the accidental correctness of researcher's positive research such as Masri, Hierons and Richardson is present.
Masri et al. researchs show that program multidate information stream can not transmit any metric, it means that the program shape of many infection
State can not travel to output, so as to result in the generation of accidental correctness.
For the correct problem of contingency, Wang et al. assumes that commissioning staff can be known a priori by bugs type, to mistake
Controlling stream and traffic flow information before and after triggering are matched with AD HOC, purify code coverage information, so as to remove accidentally correct
Adverse effect of the property to location of mistake efficiency.Masri et al. proposes the accidental correctness test case based on k-means clusters
Recognition methods, test result indicate that, removed for the location of mistake method (such as Tarantula) based on coverage information accidentally correct
Property test case can improve its efficiency.Accidental correctness removes the efficiency that can improve location of mistake method, and this excites us and tries
It is to improve the efficiency of location of mistake method that figure goes the method purpose of the research accidental correctness test case of identification.
Assuming that test case is concentrated n accidentally correctness test case, accidental correctness identification is exactly that these are accidental
The process that correctness test case is identified and removed.
The research of Masri et al. shows that program multidate information stream can not transmit any metric, so that much infect
Program state can not have influence on program output, thus, cause the generation of accidental correctness.Accidental correctness is commonly present, and
The location efficiency of this phenomena impair location of mistake method.Accidental correctness is likely to be influenceed by Program Type, under
Lift a usability of program fragments to illustrate how accidental correctness is influenceed by Program Type in face.
Give program element e, P (a TF, e) it is failure testing use-case TFPerform the ratio of e, P (TP, it is e) successfully to test
Use-case TPThe ratio of configuration processor element e.Program element e is wanted for accidental correctness element cce, then require that program element e goes out
In currently all failure testing, i.e. P (TF, e)=1, and the probability appeared in successfully test is 0<P(TP,e)<1, use function f
E () represents cceIt is as follows:
cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1} (1)
As shown in figure 1, such as x=3 is a program state for infection, if by the mapping of edge1, variable x and output y
Relation is as follows:{ 1 → 2,2 → 4,3* → 6*, 4 → 8 }, so that the variable x=3 derivatives program output y of infection is infected, because
X and y is one-to-one relationship.If by edge2, variable x is as follows with the mapping relations of output y:1 → 1*, 2 → 0,3* → 1*,
4 → 2 }, output y=1 may be infected by variable x=3, be propagated so as to export y=1 by 3* → 1*;Output y=1 may be by
Variable x=1 is realized by 1 → 1*, so that it is 1 to export y.If the similar mapping relations by edge3, variable x and output y are such as
Under:{ 1 → -1,2 → 1*, 3* → 1*, 4 → 1* }, it can be seen that output y=1 may be infected by variable x=3, it is also possible to be received
To the influence of correct variable x=1 or x=4.
Recognized for the accidental correctness test case recognition methods based on k-means clusters of Masri et al. propositions
To lift the efficiency of location of mistake, k-means clusters belong to Hard clustering method to accidental correctness test case, and each program is performed
Trace information can only belong to a certain class in all categories, either-or, belong to ordinary set opinion category, and that so brings asks
Topic:All program perform track information are identical to calculating cluster centre contribution degree.So, this accidental correctness test case
Recognition methods is inefficient, it is impossible to reliably identify accidental correctness test case, and then it is wrong reliably to carry out software
Position by mistake.
The content of the invention
It is an object of the invention to provide a kind of accidental correctness test case recognition methods, be used to solve it is existing accidentally just
The reliability of true property test case recognition methods problem not high.Present invention simultaneously provides a kind of software error localization method.
To achieve the above object, the solution of the present invention includes a kind of accidental correctness test case recognition methods, including such as
Lower step:
(1) the perform track information of program is obtained;
(2) accidental correctness element is recognized;
(3) characteristic element is picked out from the accidental correctness element for identifying;
(4) to carry out dimension to the program perform track information for obtaining according to the characteristic element picked out brief, removes program
Uncorrelated element in perform track information;
(5) program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief recognizes idol
Right correctness test case.
The detailed process for recognizing accidental correctness test case according to Fuzzy c-means clustering algorithms is:
1) cluster centre set is initialized;
2) calculated using following computing formula or renewal subordinated-degree matrix U:
Cluster centre set V is updated using following computing formula(b+1):
If 3) | | V(b)-V(b+1)| | < ε, then algorithm stop and export subordinated-degree matrix U and cluster centre set V;
Wherein, program perform track information includes n test case, xjRepresent j-th perform track letter of test case
Breath;dij=| | vi-xj| |, represent sample xjWith the cluster centre v of the i-th classiEuclidean distance;M is Weighted Index, m ∈
[1,∞);uijIt is degree of membership, uij∈ { 0,1 }, wherein i=1,2 ..., c, j=1,2 ..., n;Subordinated-degree matrix U=[uij]c×n;
C is given cluster classification number, 2≤c≤n;ε is setting iteration stopping threshold value.
The acquisition process of described program perform track information is:
(I) the perform track information of test case driving source Code obtaining program is used;
(II) program perform track information is divided into by successful procedure perform track information and failure program by test language
Perform track information.
The identification process of the accidental correctness element is:
A () gives a program element e, obtain failure testing use-case TFPerform the ratio P (T of eF, e), obtain and successfully test
Use-case TPRatio P (the T of configuration processor element eP,e);
B () represents accidental correctness element cc using function f (e)e, it is as follows:
cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1 },
The program element for meeting the function is accidental correctness element.
Realize that the means that characteristic element is picked out from the accidental correctness element for identifying are:
(A) suspicious degree calculating is carried out to each accidental correctness element using Tarantula methods, the size of suspicious degree is made
It is the weight of accidental correctness element, sequence from big to small is carried out to the suspicious degree of each accidental correctness element;
(B) select ratio to select the accidental correctness element of suspicious degree high according to what is set, as characteristic element.
A kind of software error localization method, comprises the following steps:
(1) accidental correctness test case is recognized;
(2) the accidental correctness test case for identifying is removed;
(3) real success test case and the corresponding program perform track information of failure testing use-case are obtained, is used
The suspicious degree of the suspicious degree computing formula calculation procedure entity in Tarantula methods, and the suspicious degree of program entity is pressed from
Small sequence is arrived greatly, program is examined according to sequence, realize the location of mistake of software;
The recognition methods of the accidental correctness test case comprises the following steps:
(1) the perform track information of program is obtained;
(2) accidental correctness element is recognized;
(3) characteristic element is picked out from the accidental correctness element for identifying;
(4) to carry out dimension to the program perform track information for obtaining according to the characteristic element picked out brief, removes program
Uncorrelated element in perform track information;
(5) program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief recognizes idol
Right correctness test case.
The detailed process for recognizing accidental correctness test case according to Fuzzy c-means clustering algorithms is:
1) cluster centre set is initialized;
2) calculated using following computing formula or renewal subordinated-degree matrix U:
Cluster centre set V is updated using following computing formula(b+1):
If 3) | | V(b)-V(b+1)| | < ε, then algorithm stop and export subordinated-degree matrix U and cluster centre set V;
Wherein, program perform track information includes n test case, xjRepresent j-th perform track letter of test case
Breath;dij=| | vi-xj| |, represent sample xjWith the cluster centre v of the i-th classiEuclidean distance;M is Weighted Index, m ∈
[1,∞);uijIt is degree of membership, uij∈ { 0,1 }, wherein i=1,2 ..., c, j=1,2 ..., n;Subordinated-degree matrix U=[uij]c×n;
C is given cluster classification number, 2≤c≤n;ε is setting iteration stopping threshold value.
The acquisition process of described program perform track information is:
(I) the perform track information of test case driving source Code obtaining program is used;
(II) program perform track information is divided into by successful procedure perform track information and failure program by test language
Perform track information.
The identification process of the accidental correctness element is:
A () gives a program element e, obtain failure testing use-case TFPerform the ratio P (T of eF, e), obtain and successfully test
Use-case TPRatio P (the T of configuration processor element eP,e);
B () represents accidental correctness element cc using function f (e)e, it is as follows:
cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1 },
The program element for meeting the function is accidental correctness element.
Realize that the means that characteristic element is picked out from the accidental correctness element for identifying are:
(A) suspicious degree calculating is carried out to each accidental correctness element using Tarantula methods, the size of suspicious degree is made
It is the weight of accidental correctness element, sequence from big to small is carried out to the suspicious degree of each accidental correctness element;
(B) select ratio to select the accidental correctness element of suspicious degree high according to what is set, as characteristic element.
In the accidental correctness test case recognition methods that the present invention is provided, follow the steps below successively:Acquisition program
Perform track information;Recognize accidental correctness element;Characteristic element is picked out from the accidental correctness element for identifying;According to
It is brief that the characteristic element picked out carries out dimension to the program perform track information for obtaining, in removal program perform track information not
Coherent element;Program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief is accidental to recognize
Correctness test case.So, in this method solve current software error position fixing process, first with the mode of feature selecting
The dimension of sample data, incoherent attribute in removal sample data are reduced, so as to reduce the data processing amount of cluster, improves poly-
The processing speed of alanysis;And can effectively identify that accidental correctness tests use by Fuzzy c-means clustering algorithms
Example, using the algorithm, in the identification of accidental correctness test case, reliability is higher, and institute in this way not only can be effective
Accidental correctness test case is recognized, and when software error positioning is carried out using the recognition methods, location efficiency can be obtained
To being obviously improved.
Brief description of the drawings
Fig. 1 is for illustrating the usability of program fragments schematic diagram that accidental correctness is influenceed by Program Type;
Fig. 2 is the overall flow schematic diagram of software error positioning;
Fig. 3 is the schematic flow sheet of program perform track acquisition of information;
Fig. 4 is accidental correctness feature selecting schematic flow sheet;
Fig. 5 is program perform track information Dimensionality reduction schematic flow sheet;
Fig. 6 is Fuzzy c-means Clustering analysis process schematic diagram;
Fig. 7 is to remove accidental correctness test case schematic flow sheet;
Fig. 8 is software error positioning flow schematic diagram;
Fig. 9 is that software error positions complete software frame and implementation process schematic diagram.
Specific embodiment
Software error localization method embodiment
Explanation is introduced to Fuzzy c-means Clustering analysis first, it is specific as follows:
Fuzzy c-means Clustering analysis solves object function J (U, V) to (U, V) by finding optimal group used, so that
Clustering problem is converted into a nonlinear programming problem for belt restraining, optimal stroke of data set is obtained by continuous iterative
Point, wherein, U represents subordinated-degree matrix, and V represents cluster centre point.Its cluster analysis result is applied to software error and determined by us
The accidental correctness test case identification of position.FCM object functions are:
Wherein, because the data object for processing herein is program perform track information, then, setting program perform track letter
Breath includes n test case (t1, t2..., tj..., tn) configuration processor trace information, wherein xjRepresent j-th test case
Perform track information, be expressed as (x with characteristic vector1j, x2j..., xij..., xmj)T∈Rm。dij=| | vi-xj| | represent sample
xjWith the cluster centre v of the i-th classiEuclidean distance, m ∈ [1, ∞) be Weighted Index, due to m values increase, cluster
Ambiguity is bigger, therefore the present embodiment selection m=3.In addition, degree of membership uij∈ { 0,1 }, wherein i=1,2 ..., c;J=1,
2、…、n;Fuzzy membership matrix U=[uij]c×n, represent which cluster certain data object may belong to using from 0 to 1 degree of membership,
Degree of membership meets:
The following new object function of construction, can try to achieve the necessary condition that formula formula (2) reaches minimum value:
Wherein λj(j=1,2 ..., n) are the n Lagrange multiplier of constraint formula in formula (4).For all inputs
Parameter (u, v) differentiate so that the necessary condition that formula (2) reaches minimum value is:
As shown in Fig. 2 software error localization method generally comprises following steps:
(1) program perform track acquisition of information;
(2) accidental correctness elemental recognition;
(3) accidentally correctness element selection, i.e., pick out characteristic element from the accidental correctness element for identifying;
(4) to carry out dimension to the program perform track information for obtaining according to the characteristic element picked out brief, removes program
Uncorrelated element in perform track information;
(5) program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief recognizes idol
Right correctness test case;
(6) accidental correctness test case is removed;
(7) software error positioning.
Understand by analysis, above-mentioned software error localization method is divided into three parts, Part I be step (1) to (5), be
Accidental correctness test case recognition methods;Part II is step (6), is tested for the accidental correctness that removal is identified and used
Example;Part III is step (7), is to carry out software error positioning using Part I and Part II.Next coming in order to this three
Partial implementation process is described in detail.
Part I:
(1) program perform track acquisition of information:Source code is driven first by test case to obtain the execution rail of program
Mark information, specially:When the operating system of operation is Ubuntu 12.04.2, when compiler is gcc-4.6.3, use gcc's
Gcov components obtain the perform track information of program;Then program perform track information is divided into by successful procedure by test language
Perform track information and failure program perform track information.
That is, as shown in figure 3, program perform track information acquiring step has following sub-step:
(1)-1:Beginning state;
(1)-2:Operating system is Ubuntu 12.04.2, compiler in the case of gcc-4.6.3, to use test case
Source code is driven, the perform track information of program is obtained using the Gcov components of gcc to obtain the perform track information of program;
(1)-3:Using test language, program perform track information is divided into successful procedure perform track information and failure journey
Sequence perform track information;
(1)-4:Finished after being divided to two classes by program perform track information.
(2) accidental correctness elemental recognition:First, a program element e is given, failure testing use-case T is obtainedFPerform e
Ratio P (TF, e), obtain successfully test case TPRatio P (the T of configuration processor element eP,e).Want to make program element e for occasionally
Right correctness element cce, it is necessary to it is required that during program element e appears in all failure testings, i.e. P (TF, e)=1, and appear in
Probability during success is tested is 0<P(TP,e)<1, represent cc with function f (e)eIf, specially:cce=e | P (TF, e)=1
∧0<P(TP,e)<1 }, so, can carry out accidental correctness element using the functional relation and differentiate:Meet the program of the function
Element is exactly accidental correctness element.
That is, accidental correctness elemental recognition step has following sub-step:
(2)-1:Initial state;
(2)-2:Obtain failure testing use-case TFPerform the ratio P (T of eF, e), obtain successfully test case TPConfiguration processor
Ratio P (the T of element eP,e);
(2)-3:Cc is represented using function f (e)eIt is as follows:cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1 }, using this
Function carries out accidental correctness element and differentiates;
(2)-4:Accidental correctness elemental recognition is finished.
(3) accidental correctness feature selecting:First using Tarantula methods to obtain in step (2) it is each accidentally just
True property element carries out suspicious degree calculating, using the size of suspicious degree as accidental correctness element weight, to each accidental correctness
The suspicious degree of element carries out sequence from big to small, and arrange parameter θ is used as the scale parameter for selecting accidental correctness element, and root
The accidental correctness element of suspicious degree high is selected to be characterized element according to scale parameter θ is selected.Assuming that there is a accidentally correctness unit
Element, the suspicious degree for calculating is a, this suspection degrees of data is arranged from big to small, if selecting accidental correctness element
Scale parameter θ is A%, then, select A%*a suspection degrees of data, the corresponding idol of suspicious degree picked out successively from big to small
Right correctness element is exactly characteristic element.For example:There are 20 accidental correctness elements, the suspicious degree for calculating is 20, by this
20 are suspected that degrees of data are arranged from big to small, if the scale parameter θ for selecting accidental correctness element is 10%, then, from big
10%*20=2 suspection degrees of data is selected successively to small, the corresponding accidental correctness element of this 2 suspicious degrees is picked out, and is special
Levy element.
That is, as shown in figure 4, accidentally correctness feature selection step has following sub-step:
(3)-1:Initial state;
(3)-2:Suspicious degree calculating is carried out to accidental correctness element using Tarantula methods;
(3)-3:Using the size of suspicious degree as the weight of accidental correctness element, accidental correctness element is arranged
Sequence;
(3)-4:The scale parameter of arrange parameter θ alternatively accidental correctness elements;
(3)-5:Feature selecting is finished.
(4) program perform track information Dimensionality reduction:Step (1) Program is performed according to the characteristic element that obtains is selected
Trace information carries out Dimensionality reduction, uncorrelated element in removal program perform track information.
That is, as shown in figure 5, program perform track information Dimensionality reduction step has following sub-step:
(4)-1:Initial state;
(4)-2:According to the characteristic element selected to program perform track information acquiring step Program perform track information
Carry out Dimensionality reduction;
(4)-3:Obtain the program perform track information after dimensionality reduction;
(4)-4:Program perform track information dimensionality reduction is finished.
The mode of feature selecting is carried out to program element carrying out the use of Dimensionality reduction to program perform track is:Select
Go out the element that can most reflect accidental correctness characteristic as characteristic element.In implementation process, if not selecting characteristic element to journey
Sequence perform track carries out yojan, and the rate of failing to report of cluster analysis result is relatively low and rate of false alarm is higher, and rate of false alarm is high to represent that some are real
Successful test case is considered as accidental correctness test case.Therefore, in order to lift accuracy rate, it is necessary to program perform track
Information Dimensionality reduction.
(5) Fuzzy c-means Clustering analysis (program perform track information and Fuzzy c- i.e. according to dimension after brief
Means clustering algorithms recognize accidental correctness test case):Fuzzy c- are used to the program trace information after dimensionality reduction
Means clustering algorithms are calculated, by parameter c values 2 in Fuzzy c-means clustering algorithms, then by all perform tracks
After information is clustered, it is divided into two clusters, referred to as the first cluster and the second cluster, if the first cluster is included than the second cluster more unsuccessfully surveyed
Example, i.e. the first cluster on probation are more comprising failure testing use-case, then, this is included into the success in the more clusters of failure testing use-case
Test case is set to accidental correctness test case, and reason is the perform track and failure testing of accidental correctness test case
The perform track of use-case is most like;Successful test case in another cluster is real success test case.To remove accidentally just
The test case of true property test case is used to software error improve location efficiency.
First, cluster centre point and subordinated-degree matrix are initialized, and the number of times of iteration is set and end condition is clustered, its
In, the condition for giving cluster classification number c satisfactions is 2≤c≤n, sets iteration stopping threshold epsilon, and set the iteration meter of initialization
Number device b=0;
Then, calculated using following computing formula or renewal subordinated-degree matrix U:
Cluster centre set V is updated using following computing formula(b+1):
Finally, if | | V(b)-V(b+1)| | < ε, then algorithm stop and export subordinated-degree matrix U and cluster centre set V;
Otherwise, b=b+1 is made, beginning is turned to.The implication of the relevant parameter in the step sees above described.
That is, as shown in fig. 6, Fuzzy c-means Clustering analytical procedure has following sub-step:
(5)-1:Initial state;
(5)-2:Initialization cluster centre point and subordinated-degree matrix;
(5)-3:The number of times or cluster end condition of iteration are set;
(5)-4:New degree of membership is calculated, subordinated-degree matrix is updated;
(5)-5:Degree of membership division is carried out, new cluster centre point is obtained;
(5)-6:Judge whether object function is eligible, that is, judge | | V(b)-V(b+1)| | < ε;
(5)-7:If meeting above-mentioned condition, algorithm stops and exports subordinated-degree matrix U and cluster centre set V;It is no
Beginning is then turned to recalculate.
(5)-8:Cluster analysis terminates.
Accidental correctness test case can recognize that by the Fuzzy c-means clustering algorithms, that is to say, that above-mentioned
5 steps can recognize that accidental correctness test case after having implemented.And, further, for practical application, it should
After accidental correctness test case has been recognized, accidental correctness test case is removed.
(6) accidental correctness test case is removed:, it is necessary to remove accidentally just after accidental correctness test case has been recognized
True property test case.Removing accidental correctness test case mainly has two ways:1. removed in success test case accidental
Correctness test case, then adds failure testing use-case set by accidental correctness test case;2. in success test case
In directly remove accidental correctness test case.2., reason is that the accidental correctness test case of identification is deposited to employing mode of the present invention
In the situation of wrong report, if bigger mistake will be caused during the accidental correctness test case reported by mistake is added into failure testing use-case set
Difference.
That is, as shown in fig. 7, removing accidental correctness test case step has following sub-step:
(6)-1:Initial state;
(6)-2:Obtain successfully test use cases;
(6)-3:Accidental correctness test case is directly removed in success test case;
(6)-4:Accidental correctness test case is removed and finished.
Software error is carried out using the accidental correctness test case for identifying position the accidental correctness test case
Concrete application, the procedure for carrying out location of mistake using the accidental correctness test case recognition methods is specially following
Three parts.
Part III:
(7) software error positioning:To be accidental comprising the successful test case in that more cluster of failure testing use-case
Correctness test case, the successful test case in another cluster is real success test case.Acquisition is really successfully tested
Use-case and the corresponding program perform track information of failure testing use-case, using the suspicious degree of suspicious degree computing formula program entity,
And the suspicious degree to program entity sorts from big to small by suspicious degree, developer checks program by this order, realizes to software
Location of mistake, and generation error positioning reporting.
That is, as shown in figure 8, software error positioning step has following sub-step:
(7)-1:Initial state;
(7)-2:Obtain real success test case and the corresponding program perform track information of failure testing use-case;
(7)-3:Use the suspicious degree of suspicious degree computing formula program entity;
(7)-4:And it is sorted from big to small by suspicious degree, developer checks program by this order;
(7)-5:Generation error positioning reporting;
(7)-6:Software error positioning is finished.
Because the implementation process for carrying out software error positioning using accidental correctness test case belongs to routine techniques, institute
With above-mentioned to be simply simply described.
Can to sum up obtain, software error positions complete software frame and implementation process as shown in figure 9, wherein, the 1st~5 row
Accidental correctness element cce, wherein, the 1st row initializes accidental correctness element and is2-3 rows calculate accidental correctness unit
All elements in element, wherein E (t) representation programs perform track, the 4th row calculates accidental correctness element set;6th~7 behavior
Characteristic element is selected, and suspicious degree is calculated using Tarantula, to accidental correctness element cceSorted from big to small by suspicious degree,
Suspicious accidental correctness element ratio high is selected according to parameter θ setting to select characteristic element;Eighth row program track dimension is about
All program perform tracks are carried out Dimensionality reduction by letter by the characteristic element picked out, and program perform track information is made after yojan
It is the input of Fuzzy c-means clusters;9th~15 behavior Fuzzy c-means cluster process, the 9th behavior initialization is subordinate to
Degree matrix U0And matrix meets formula:
fcce=e | e ∈ cce∧θ*ranking(cce)} (7)
Wherein, e is to give any one program element;cceIt is accidental correctness element;ranking(cce) press suspicious degree
Sort the sequence for obtaining from big to small;θ is parameter, 0<θ<1.
10th~12 behavior clusters iterative process, according to above-mentioned formula (6) and the optimal (U of formula (5) iterativef,
Vf), wherein UfRepresent optimal subordinated-degree matrix, VfOptimal cluster centers point is represented, the 14th~15 row is according to optimal (Uf,Vf) generation
Final cluster Cluster1, Cluster2, it is believed that accidental correctness test case is included in one of cluster.
Accidental correctness test case recognition methods embodiment
In the present embodiment, during accidental correctness test case recognition methods is above-mentioned software error localization method embodiment
The Part I of software error localization method, due to being made to accidental correctness test case recognition methods in above-described embodiment
Describe in detail, the present embodiment just no longer illustrates.
Specific embodiment is presented above, but the present invention is not limited to described implementation method.Base of the invention
This thinking is above-mentioned basic scheme, and for those of ordinary skill in the art, various changes are designed in teaching of the invention
The model of shape, formula, parameter simultaneously need not spend creative work.It is right without departing from the principles and spirit of the present invention
Change, modification, replacement and the modification that implementation method is carried out are still fallen within protection scope of the present invention.
Claims (10)
1. a kind of accidental correctness test case recognition methods, it is characterised in that comprise the following steps:
(1) the perform track information of program is obtained;
(2) accidental correctness element is recognized;
(3) characteristic element is picked out from the accidental correctness element for identifying;
(4) carry out that dimension is brief to the program perform track information for obtaining according to the characteristic element picked out, removal program is performed
Uncorrelated element in trace information;
(5) the program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief come recognize accidentally just
True property test case.
2. accidental correctness test case recognition methods according to claim 1, it is characterised in that according to Fuzzy c-
Means clustering algorithms recognize that the detailed process of accidental correctness test case is:
1) cluster centre set is initialized;
2) calculated using following computing formula or renewal subordinated-degree matrix U:
Cluster centre set V is updated using following computing formula(b+1):
If 3) | | V(b)-V(b+1)| | < ε, then algorithm stop and export subordinated-degree matrix U and cluster centre set V;
Wherein, program perform track information includes n test case, xjRepresent the j-th perform track information of test case;dij
=| | vi-xj| |, represent sample xjWith the cluster centre v of the i-th classiEuclidean distance;M is Weighted Index, m ∈ [1, ∞);
uijIt is degree of membership, uij∈ { 0,1 }, wherein i=1,2 ..., c, j=1,2 ..., n;Subordinated-degree matrix U=[uij]c×n;C is given
Cluster classification number, 2≤c≤n;ε is setting iteration stopping threshold value.
3. accidental correctness test case recognition methods according to claim 1, it is characterised in that described program performs rail
The acquisition process of mark information is:
(I) the perform track information of test case driving source Code obtaining program is used;
(II) program perform track information is divided into by successful procedure perform track information and failure program execution by test language
Trace information.
4. accidental correctness test case recognition methods according to claim 1, it is characterised in that the accidental correctness
The identification process of element is:
A () gives a program element e, obtain failure testing use-case TFPerform the ratio P (T of eF, e), obtain successfully test case
TPRatio P (the T of configuration processor element eP,e);
B () represents accidental correctness element cc using function f (e)e, it is as follows:
cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1 },
The program element for meeting the function is accidental correctness element.
5. accidental correctness test case recognition methods according to claim 1, it is characterised in that realize from identifying
The means that characteristic element is picked out in accidental correctness element are:
(A) suspicious degree calculating is carried out to each accidental correctness element using Tarantula methods, using the size of suspicious degree as idol
The weight of right correctness element, sequence from big to small is carried out to the suspicious degree of each accidental correctness element;
(B) select ratio to select the accidental correctness element of suspicious degree high according to what is set, as characteristic element.
6. a kind of software error localization method, it is characterised in that comprise the following steps:
(1) accidental correctness test case is recognized;
(2) the accidental correctness test case for identifying is removed;
(3) real success test case and the corresponding program perform track information of failure testing use-case are obtained, is used
The suspicious degree of the suspicious degree computing formula calculation procedure entity in Tarantula methods, and the suspicious degree of program entity is pressed from
Small sequence is arrived greatly, program is examined according to sequence, realize the location of mistake of software;
The recognition methods of the accidental correctness test case comprises the following steps:
(1) the perform track information of program is obtained;
(2) accidental correctness element is recognized;
(3) characteristic element is picked out from the accidental correctness element for identifying;
(4) carry out that dimension is brief to the program perform track information for obtaining according to the characteristic element picked out, removal program is performed
Uncorrelated element in trace information;
(5) the program perform track information and Fuzzy c-means clustering algorithms according to dimension after brief come recognize accidentally just
True property test case.
7. software error localization method according to claim 6, it is characterised in that according to Fuzzyc-means clustering algorithms
The detailed process for recognizing accidental correctness test case is:
1) cluster centre set is initialized;
2) calculated using following computing formula or renewal subordinated-degree matrix U:
Cluster centre set V is updated using following computing formula(b+1):
If 3) | | V(b)-V(b+1)| | < ε, then algorithm stop and export subordinated-degree matrix U and cluster centre set V;
Wherein, program perform track information includes n test case, xjRepresent the j-th perform track information of test case;dij
=| | vi-xj| |, represent sample xjWith the cluster centre v of the i-th classiEuclidean distance;M is Weighted Index, m ∈ [1, ∞);
uijIt is degree of membership, uij∈ { 0,1 }, wherein i=1,2 ..., c, j=1,2 ..., n;Subordinated-degree matrix U=[uij]c×n;C is given
Cluster classification number, 2≤c≤n;ε is setting iteration stopping threshold value.
8. software error localization method according to claim 6, it is characterised in that described program perform track information is obtained
The process of taking is:
(I) the perform track information of test case driving source Code obtaining program is used;
(II) program perform track information is divided into by successful procedure perform track information and failure program execution by test language
Trace information.
9. software error localization method according to claim 6, it is characterised in that the identification of the accidental correctness element
Process is:
A () gives a program element e, obtain failure testing use-case TFPerform the ratio P (T of eF, e), obtain successfully test case
TPRatio P (the T of configuration processor element eP,e);
B () represents accidental correctness element cc using function f (e)e, it is as follows:
cce=e | P (TF, e)=1 ∧ 0<P(TP,e)<1 },
The program element for meeting the function is accidental correctness element.
10. software error localization method according to claim 6, it is characterised in that realize accidental correct from what is identified
The means that characteristic element is picked out in property element are:
(A) suspicious degree calculating is carried out to each accidental correctness element using Tarantula methods, using the size of suspicious degree as idol
The weight of right correctness element, sequence from big to small is carried out to the suspicious degree of each accidental correctness element;
(B) select ratio to select the accidental correctness element of suspicious degree high according to what is set, as characteristic element.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710025373.8A CN106909502A (en) | 2017-01-13 | 2017-01-13 | Accidental correctness test case recognition methods and software error localization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710025373.8A CN106909502A (en) | 2017-01-13 | 2017-01-13 | Accidental correctness test case recognition methods and software error localization method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106909502A true CN106909502A (en) | 2017-06-30 |
Family
ID=59206819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710025373.8A Pending CN106909502A (en) | 2017-01-13 | 2017-01-13 | Accidental correctness test case recognition methods and software error localization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106909502A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992426A (en) * | 2017-12-26 | 2018-05-04 | 河南工业大学 | A kind of software error localization method excavated based on Frequent tree mining and processing unit |
CN109145609A (en) * | 2018-09-06 | 2019-01-04 | 平安科技(深圳)有限公司 | A kind of data processing method and device |
CN109254924A (en) * | 2018-09-28 | 2019-01-22 | 中国科学院长春光学精密机械与物理研究所 | A kind of software fault positioning method, device, equipment and readable storage medium storing program for executing |
CN112685327A (en) * | 2021-01-28 | 2021-04-20 | 重庆大学 | Method for generating failure test case of model domain |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117331A (en) * | 2015-08-17 | 2015-12-02 | 浪潮(北京)电子信息产业有限公司 | Error-location-oriented coincidence correctness test case identification method and device |
-
2017
- 2017-01-13 CN CN201710025373.8A patent/CN106909502A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117331A (en) * | 2015-08-17 | 2015-12-02 | 浪潮(北京)电子信息产业有限公司 | Error-location-oriented coincidence correctness test case identification method and device |
Non-Patent Citations (3)
Title |
---|
曹鹤玲 等: ""软件错误定位研究综述"", 《计算机科学》 * |
曹鹤玲 等: ""面向有效错误定位的偶然正确性识别方法"", 《电子学报》 * |
闻新 等: "《应用MATLAB实现神经网络》", 30 June 2015, 国防工业出版社 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992426A (en) * | 2017-12-26 | 2018-05-04 | 河南工业大学 | A kind of software error localization method excavated based on Frequent tree mining and processing unit |
CN109145609A (en) * | 2018-09-06 | 2019-01-04 | 平安科技(深圳)有限公司 | A kind of data processing method and device |
CN109145609B (en) * | 2018-09-06 | 2023-06-23 | 平安科技(深圳)有限公司 | Data processing method and device |
CN109254924A (en) * | 2018-09-28 | 2019-01-22 | 中国科学院长春光学精密机械与物理研究所 | A kind of software fault positioning method, device, equipment and readable storage medium storing program for executing |
CN109254924B (en) * | 2018-09-28 | 2022-02-08 | 中国科学院长春光学精密机械与物理研究所 | Software fault positioning method, device, equipment and readable storage medium |
CN112685327A (en) * | 2021-01-28 | 2021-04-20 | 重庆大学 | Method for generating failure test case of model domain |
CN112685327B (en) * | 2021-01-28 | 2023-06-27 | 重庆大学 | Method for generating failure test case of model domain |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Izza et al. | On explaining random forests with SAT | |
CN106909502A (en) | Accidental correctness test case recognition methods and software error localization method | |
CN110928764B (en) | Automated evaluation method for crowdsourcing test report of mobile application and computer storage medium | |
CN111024898B (en) | Vehicle exhaust concentration standard exceeding judging method based on Catboost model | |
CN106124175A (en) | A kind of compressor valve method for diagnosing faults based on Bayesian network | |
CN105809193B (en) | A kind of recognition methods of the illegal vehicle in use based on kmeans algorithm | |
CN107292330A (en) | A kind of iterative label Noise Identification algorithm based on supervised learning and semi-supervised learning double-point information | |
CN102473354A (en) | State detecting device, state detecting method, and program | |
CN109101483B (en) | Error identification method for power inspection text | |
CN106203377A (en) | A kind of coal dust image-recognizing method | |
WO2021179514A1 (en) | Novel coronavirus patient condition classification system based on artificial intelligence | |
CN109389325B (en) | Method for evaluating state of electronic transformer of transformer substation based on wavelet neural network | |
CN110133410A (en) | Diagnosis Method of Transformer Faults and system based on Fuzzy C-Means Cluster Algorithm | |
CN110794360A (en) | Method and system for predicting fault of intelligent electric energy meter based on machine learning | |
CN113376516A (en) | Medium-voltage vacuum circuit breaker operation fault self-diagnosis and early-warning method based on deep learning | |
CN116523284A (en) | Automatic evaluation method and system for business operation flow based on machine learning | |
CN103838210B (en) | Remote wireless monitoring system and method for toxic gas in emergency site | |
CN110596490A (en) | Intelligent detection method for railway turnout fault | |
Baxter et al. | Towards a classification of state misinterpretation | |
CN115169504B (en) | Equipment abnormity identification method in coal gas fine desulfurization process | |
CN109242008B (en) | Compound fault identification method under incomplete sample class condition | |
CN117032165A (en) | Industrial equipment fault diagnosis method | |
CN111737993A (en) | Method for extracting health state of equipment from fault defect text of power distribution network equipment | |
CN113722239B (en) | Airborne embedded software quality detection method, device, medium and electronic equipment | |
CN114629047A (en) | Method, device and equipment for detecting slippage of damper |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170630 |