CN110084321A - A kind of software test destination path selection method based on K- mean cluster - Google Patents
A kind of software test destination path selection method based on K- mean cluster Download PDFInfo
- Publication number
- CN110084321A CN110084321A CN201910380031.7A CN201910380031A CN110084321A CN 110084321 A CN110084321 A CN 110084321A CN 201910380031 A CN201910380031 A CN 201910380031A CN 110084321 A CN110084321 A CN 110084321A
- Authority
- CN
- China
- Prior art keywords
- path
- code
- cluster centre
- discrimination
- program
- 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.)
- Granted
Links
- 238000010187 selection method Methods 0.000 title claims abstract description 12
- 238000012360 testing method Methods 0.000 claims abstract description 35
- 238000000034 method Methods 0.000 claims abstract description 30
- 238000003064 k means clustering Methods 0.000 claims abstract description 6
- 239000011159 matrix material Substances 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 2
- 238000013522 software testing Methods 0.000 abstract description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000000275 quality assurance Methods 0.000 description 1
- 230000008929 regeneration Effects 0.000 description 1
- 238000011069 regeneration method Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
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
-
- 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/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Hardware Design (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Quality & Reliability (AREA)
- Software Systems (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Debugging And Monitoring (AREA)
Abstract
The software test destination path selection method based on K- mean cluster that the present invention relates to a kind of.This method gives program to be measured, converts selection structure for the loop structure in program using Z covering method, is encoded based on Huffman encoding to Program path;Path is randomly choosed from path code set as cluster centre, calculates the discrimination of residual paths and cluster centre, path is clustered;Finally, being selected in class with the indexing of other datapath sections and the smallest path as new cluster centre, until cluster centre no longer changes in conjunction with K- means clustering algorithm;Finally, test target set of paths of the output cluster centre as program to be measured.Present invention aims at solve current tested software path number it is numerous in the case where, complete trails coverage test is difficult to reach, test quality the problem of being difficult to be protected, final that tester is helped to improve Efficiency of Software Testing, while ensureing the quality of software test.
Description
Technical field
The present invention relates to software test and program analysis field, it is particularly suitable for test target selection neck in software test
Domain is a kind of helper applications tester its object is to automatically select representative test target path for tested program
Member improves Efficiency of Software Testing, the method for ensureing software quality.
Background technique
Software test is to ensure the important means of software quality.Path coverage test refers to during the test, as far as possible
All feasible paths in ground overlay program, it is that a kind of coverage rate is high and the stronger white-box testing method of error detecing capability.It is many
Software test problem can be attributed to the Test data generation problem of path-oriented, problem description are as follows: the one of preset sequence
Destination path, finds test data in the input space of program, so that being using the data as input paths traversed
Destination path.Path coverage test mostly uses the artificial mode for determining destination path, and the quality of destination path will depend on test
The experience of personnel, and distinguish similarity degree between path and be also required to take a substantial amount of time, the corresponding test data matter in path
Amount also it is difficult to ensure that.Currently, the situation numerous in face of complicated tested software path number, is extremely difficult to complete trails coverage test.
If it is possible to using certain method according to the suitable destination path of procedure selection to be measured, and select to survey according to destination path
Data are tried, can be ensured in the operating pressure that quality assurance personnel are effectively reduced, while improving the production efficiency of research and development of software
The quality of production and reliability of software product.
In actual test, it is necessary first to determine the destination path of tested program, then regeneration passes through the survey in the path
Try data.At this point, selecting which path as desired destination path, the quality of test data will have a direct impact on.Currently, having
Scholar studies for the selection method of destination path, such as Jiang Jun relaxes and proposes a kind of C# change based on function call path
Path set creation method is influenced, but this method is mainly used for the Path selection to regression test.It opens wonderful equal March 27 in 2018
In day invention disclosed patent, a kind of similar execution route generation method based on hierarchical clustering is proposed, which exists
In providing a kind of similar execution route generation method based on hierarchical clustering, mainly solve before current path testing executes
The problem of being difficult to infeasible paths in program improves the efficiency of path testing.However, there is no well for these methods
Solve the problems, such as selection test target path quality.
In this regard, the invention proposes a kind of software test destination path selection method based on K- mean cluster.The present invention
Basic thought are as follows: representative test target path in selection tested program, and then select to test according to destination path
Data ensure test quality while reducing workload.It, first will be based on Z covering method and conspicuous in this regard, be directed to program to be measured
Fu Man coding treats ranging sequence and carries out path code;Again, number of path as needed is by K- mean cluster, to numerous roads
Diameter is grouped, and reaching the path in every group has certain similarity, and the path between different groups has biggish discrimination
Purpose;Finally, selecting the path nearest apart from cluster centre as destination path in each group.In this way, can be with
Greatly reduce test job amount, and the destination path selected after clustering is representative each other, is more advantageous to lookup tested program
The defects of, thus the quality of effective guarantee test data.
Summary of the invention
The present invention is effectively solved by providing a kind of software test destination path selection method based on K- mean cluster
Presently, there are complicated tested software path number it is numerous in the case where, complete trails coverage test is difficult to reach caused test
The problem of quality is difficult to be protected finally improves Efficiency of Software Testing, while ensureing the quality of software test.
To reach above-mentioned target, the present invention proposes a kind of software test destination path selecting party based on K- mean cluster
Method.This method is directed to program to be measured, first with Z covering method and Huffman encoding, treats ranging sequence and carries out path code;?
On the basis of this, by K- means clustering method, number of path as required is grouped numerous paths, reaches the road in every group
Diameter has certain similarity, and the path between different groups has biggish discrimination;Finally, selecting distance in each group
The nearest path of cluster centre is as destination path.Specifically, this method includes the following steps.
1) path code inputs program to be measuredPG, analysisPGIn all sentences, be classified as sequential statement, case statement
And Do statement;Then, it introducesZPath covering method only considers the case where loop body is executed once, and loop body executes multiple
When, spread out into multiple selections side by side, and then generate new program to be measuredPG_2.?PG_2In each branch statement former piece
It is expressed as a node, the former piece of first branch statement is as root node, nested case statement former piece in two branch
Its two child nodes are expressed as, if subsequent branch statement is coordination with it, subsequent branch node is drawn
Onto its two stalks tree, thus by program representation to be measured at a binary tree, wherein root node represents one to each leaf node
Path.Finally, using Huffman encoding method, it is rightPG_2Middle path is encoded, and is generatedPG_2Path code setset_ path_code_PG_2;
2) clustering, fromset_path_code_PG_2Middle random selectionkA path code is as cluster centre setset_ path_code_center, residual paths coding path setset_path_code_other=set_path_code_PG_2-set_path_code_center, forset_path_code_centerEach of elementpath_code_center_i
(i=1,2 ..., k), initialize a path code setset_path_code_i={path_code_center_i, fromset_path_code_otherOne paths of middle selection codingpath_code_other, calculatepath_code_otherWithpath_code_center_i (i=1,2 ..., discrimination k), discrimination dd(Distinguish Degree) calculation formula
It is as follows:
Whereinpath p Withpath q It is two paths, SMC (path p ,path q ) indicatepath p Withpath q Simple matching coefficient
(Simple Matching Coefficient),f 00 Withf 11 Two paths are respectively indicated by bit comparison while being " 0 " and simultaneously
For the number of the position of " 1 ",f 01 Withf 10 Respectively indicate the number of the two different positions of paths step-by-step, 1-SMC (path p ,path q )
The discrimination between two paths is reacted.
Ifpath_code_otherWithpath_code_center_jDifferentiation angle value it is minimum, thenset_path_code_i
= set_path_code_i∪{path_code_other, above step is repeated, untilset_path_code_otherTraversal
It completes;It generatesset_path_code_i(i=1 ..., k) discrimination matrixmatrix_path_code_i(i=1,2,...,
K), as follows:
Each element dd in discrimination matrix (path p ,path q ) indicatepath p Withpath q Discrimination, wherein 1≤p<=m,
1<=q<=m, andp≠qWhen, calculated according to discrimination formula, whenp=qWhen, dd (path p ,path q )=0, i.e. discrimination matrix
The elements in a main diagonal is all 0.
It repeats to give birth to as new cluster centre with the indexing of other datapath sections and the smallest path in selective discrimination degree matrix
The step of at discrimination matrix and selecting new cluster centre, until cluster centre no longer changes;Finally, cluster centre is exported
Test target set of paths as program to be measured.
Further, wherein above-mentioned steps 1) specific step is as follows:
Step 1) -1: initial state;
Step 1) -2: program to be measured is inputtedPG={set_sequence_stmt, set_decision_stmt, set_loop_ stmt,
Whereinset_sequence_stmt、set_decision_stmt、set_loop_stmtIt respectively indicatesPGIn sequence language
Sentence set, case statement set, Do statement set;
Step 1) -3: fromset_loop_stmtOne Do statement of middle taking-uploop_stmt;
Step 1) -4: being based on Z covering method willloop_stmtIt is converted intodecision_stmt;
Step 1) -5:set_decision_stmt= set_decision_stmt∪{decision_stmt};
Step 1) -6: judgement is allloop_stmtWhether complete to convert, if so then execute in next step;If not then executing
Step 1) -3;
Step 1) -7: program to be measured is after conversionPG_2= {set_sequence_stmt, set_decision_stmt};
Step 1) -8: willPG_2It is converted into binary treetree_PG_2, wherein node indicates the former piece of branch statement, from root node
Path is indicated to the side of leaf node;
Step 1) -9: it is indicated based on Huffman encodingtree_PG_2In all path codesset_path_code_PG_2;
Step 1) -10: outputset_path_code_PG_2;
Step 1) -11: terminate state.
Further, wherein above-mentioned steps 2) specific step is as follows:
Step 2-1: initial state;
Step 2-2: inputset_path_code_PG_2And destination path numberk;
Step 2-3: at random fromset_path_code_PG_2Middle selectionkPathspath_code_center_1,..., path_code_center_kIt is used as cluster centre setset_path_code_center;
Step 2-4: residual paths code set isset_path_code_other=set_path_code_PG_2-set_ path_code_center;
Step 2-5: forset_path_code_centerEach of elementpath_code_center_i(i=1,
2 ..., k), initialize a path code setset_path_code_i= {path_code_center_i};
Step 2-6: fromset_path_code_otherOne paths of middle selection codingpath_code_other;
Step 2-7: minimum discrimination is initializeddd_min=MAX,j=0,i=1;
Step 2-8:dd= func_dd(path_code_other, path_code_center_i), wherein func_dd is area
Index calculation method;
Step 2-9: judgementddWhether it is less thandd_min, if so then execute in next step;Otherwise step 2-11 is executed;
Step 2-10:dd_min= dd,j = i,i++;
Step 2-11:i++;
Step 2-12: judgementiWhether it is greater thank, if so then execute next step, if otherwise return step 2) and -8;
Step 2-13:set_path_code_j = set_path_code_j ∪{path_code_other};
Step 2-14: judgementset_path_code_otherWhether traverse, if so then execute in next step;Otherwise return step
2) -6;
Step 2-15: it generates respectivelyset_path_code_i(i=1 ..., k) discrimination matrixmatrix_path_code_ i(i=1,2,...,k);
Step 2-16: for each cluster centre matrixmatrix_path_code_i, select and the indexing of other datapath sections
With the smallest path as cluster centrepath_code_center_new_i;
Step 2-17: new cluster centre set of paths is encoded toset_path_code_center_new={path_code_ center_new_1,..., path_code_center_new_k};
Step 2-18: judgementset_path_code_centerWhether it is equal toset_path_code_center_newIf then
It performs the next step;Otherwise step 2-20 is executed;
Step 2-19: initializationset_target_pathForset_path_code_center_newRespective path executes step
Rapid 2) -21;
Step 2-20:set_path_code_center=set_path_code_center_new, return step 2) and -4;
Step 2-21: output destination path setset_target_path;
Step 2-22: terminate state.
Detailed description of the invention
Fig. 1 is a kind of flow chart of software test destination path selection method based on K- mean cluster of the invention.
Fig. 2 is the flow chart of path code in Fig. 1.
Fig. 3 is the flow chart of clustering in Fig. 1.
Specific embodiment
In order to better understand the technical content of the present invention, special lift is embodied and institute's accompanying drawings is cooperated to be described as follows.
Fig. 1 is a kind of process for software test destination path selection method based on K- mean cluster that the present invention is implemented
Figure.
A kind of software test destination path selection method based on K- mean cluster, which is characterized in that include the following steps.
S1 path code gives program to be measured, utilizesZThe loop structure in program to be measured is converted selection by covering method
Structure converts binary tree for program to be measured, and treats all paths of ranging sequence based on Huffman encoding and encoded, and generates road
Diameter code set.
S2 clustering is randomly choosed from path code setkA path calculates path code collection as cluster centre
The discrimination of residual paths and cluster centre in conjunction, selection form path code set with the smallest cluster centre of its discrimination,
And generate its discrimination matrix;Finally, being indexed in selective discrimination degree matrix with other datapath sections in conjunction with K- means clustering algorithm
With the smallest path as new cluster centre, the step of repeatedly generating discrimination matrix and select new cluster centre, Zhi Daoju
Until class center no longer changes;Finally, test target set of paths of the output cluster centre as program to be measured.
Fig. 2 is the flow chart of path code.Program PG to be measured is given, all sentences in PG is analyzed, is classified as sequence language
Sentence, case statement and Do statement;Then, it introducesZPath covering method only considers the case where loop body is executed once,
When loop body executes multiple, it can be launched into multiple selections situation arranged side by side, generate new program PG_2 to be measured.Every in PG_2
The former piece of a branch statement is expressed as a node, and the former piece of first branch statement is embedding in two branch as root node
The case statement former piece of set is expressed as its two child nodes, if subsequent branch statement is coordination with it,
Subsequent branch node is signed on its two stalks tree, in this way program representation to be measured at a binary tree, and from root node to every
A leaf node represents a paths.Using Huffman encoding method is based on, path in PG_2 is encoded, the road of PG_2 is generated
Diameter code setset_path_code_PG_2, the specific steps are as follows:
Step 1: initial state;Step 2: inputting program to be measuredPG={set_sequence_stmt, set_decision_ stmt, set_loop_stmt};Step 3: fromset_loop_stmtOne Do statement of middle taking-uploop_stmt;Step 4:
It is based onZCovering method willloop_stmtIt is converted intodecision_stmt;Step 5:set_decision_stmt= set_ decision_stmt ∪ {decision_stmt};Step 6: judgement is allloop_stmtIt is whether inverted complete, if then
It performs the next step;If not thening follow the steps 3;Step 7: program to be measured is after conversionPG_2= {set_sequence_stmt, set_decision_stmt};Step 8: willPG_2It is converted into binary treetree_PG_2;Step 9: being indicated based on Huffman encoding
All path codes of PG_2set_path_code_PG_2;Step 10: outputset_path_code_PG_2;Step 11: terminating
State.
Fig. 3 is the flow chart of clustering.It is randomly choosed from path code setkA path is as cluster centre, meter
The discrimination of residual paths and cluster centre in path code set is calculated, selection forms road with the smallest cluster centre of its discrimination
Diameter code set, and generate its discrimination matrix;Finally, in conjunction with K- means clustering algorithm, in selective discrimination degree matrix with other
Datapath section indexing and the smallest path repeatedly generates discrimination matrix and selects new cluster centre as new cluster centre
Step, until cluster centre no longer changes;Finally, test target path set of the output cluster centre as program to be measured
It closes.Specific step is as follows:
Step 1: initial state;Step 2: inputset_path_code_PG_2And destination path numberk;Step 3: random selectionkPathspath_code_center_1,...,path_code_center_kIt is used as cluster centreset_path_code_ center;Step 4: residual paths code set isset_path_code_other=set_path_code_PG_2-set_ path_code_center;Step 5: initializationkA path code setset_path_code_i={path_code_ center_i}(i=1,2,...,k);Step 6: fromset_path_code_otherOne paths of middle selection codingpath_ code_other;Step 7: initializing minimum discriminationdd_min=MAX,j=0,i=1;Step 8:dd= func_dd(path_ code_other, path_code_center_i), wherein func_dd is discrimination calculation method;Step 9: judgementddWhether
It is less thandd_min, if so then execute in next step;It is no to then follow the steps 11;Step 10:dd_min= dd,j = i,i++;Step
11:i++;Step 12: judgementiWhether it is greater thank, if so then execute next step, if otherwise return step 8;Step 13:set_ path_code_j = set_path_code_j ∪{path_code_other};Step 14: judgementset_path_code_ otherWhether traverse, if so then execute in next step;Otherwise return step 6;Step 15: generating respectivelyset_path_code_i
(i=1 ..., k) discrimination matrixmatrix_path_code_i(i=1,2,...,k);Step 16: for each cluster
Center matrixmatrix_path_code_i, select with the indexing of other datapath sections and the smallest path as cluster centrepath_code_center_new_i;Step 17: new cluster centre set of paths is encoded toset_path_code_center_ new={path_code_center_new_1,..., path_code_center_new_k};Step 18: judgementset_path_ code_centerWhether it is equal toset_path_code_center_new, if so then execute in next step;It is no to then follow the steps 20;
Step 19: initializationset_target_pathForset_path_code_center_newRespective path executes step 21;Step
Rapid 20:set_path_code_center=set_path_code_center_new, return step 4;Step 21: output target
Set of pathsset_target_path;Step 22: terminating state.
In conclusion the present invention efficiently solve complicated tested software path number it is numerous in the case where, complete trails covering
The problem of test is difficult to reach, and test quality is difficult to be protected, it is final that tester is helped to improve Efficiency of Software Testing, simultaneously
Ensure the quality of software test.
Claims (3)
1. a kind of software test destination path selection method based on K- mean cluster, which is characterized in that be directed to program to be measured, benefit
WithZThe loop structure in program to be measured is converted selection structure by covering method, and it is all to treat ranging sequence based on Huffman encoding
Path is encoded, and path code set is generatedset_path_code_PG_2;On this basis, fromset_path_code_ PG_2Middle random selectionkA path is as cluster centreset_path_code_center, calculate remaining in path code set
The discrimination in path and cluster centre, selection form path code set with the smallest cluster centre of its discriminationset_path_ code_i(i=1 ..., k), and generate its discrimination matrixmatrix_path_code_i(i=1,2,...,k);Finally, in conjunction with
K- means clustering algorithm, with the indexing of other datapath sections and the smallest path as in new cluster in selective discrimination degree matrix
The heart, the step of repeatedly generating discrimination matrix and select new cluster centre, until cluster centre no longer changes;Finally, defeated
Test target set of paths of the cluster centre as program to be measured out;This method comprises the following steps:
1) path code inputs program to be measuredPG, analysisPGIn all sentences, be classified as sequential statement, case statement and follow
Ring sentence;Then, it introducesZPath covering method only considers the case where loop body is executed once, will when loop body executes multiple
It is launched into multiple selections side by side, and then generates new program to be measuredPG_2;?PG_2In each branch statement former piece indicate
At a node, the former piece of first branch statement is as root node, nested case statement former piece difference in two branch
It is expressed as its two child nodes, if subsequent branch statement is coordination with it, subsequent branch node signs in it
On two stalk trees, thus by program representation to be measured at a binary tree, wherein root node represents a paths to each leaf node;
Finally, using Huffman encoding method, it is rightPG_2Middle path is encoded, and is generatedPG_2Path code setset_path_ code_PG_2;
2) clustering, fromset_path_code_PG_2Middle random selectionkA path code is as cluster centre setset_ path_code_center, residual paths coding path setset_path_code_other=set_path_code_PG_2-set_path_code_center, forset_path_code_centerEach of elementpath_code_center_i
(i=1,2 ..., k), initialize a path code setset_path_code_i={path_code_center_i, fromset_path_code_otherOne paths of middle selection codingpath_code_other, calculatepath_code_otherWithpath_code_center_i (i=1,2 ..., discrimination k), discrimination dd(Distinguish Degree) calculation formula
It is as follows:
Whereinpath p Withpath q It is two paths, SMC (path p ,path q ) indicatepath p Withpath q Simple matching coefficient
(Simple Matching Coefficient),f 00 Withf 11 Two paths are respectively indicated by bit comparison while being " 0 " and simultaneously
For the number of the position of " 1 ",f 01 Withf 10 Respectively indicate the number of the two different positions of paths step-by-step, 1-SMC (path p ,path q )
The discrimination between two paths is reacted;
Ifpath_code_otherWithpath_code_center_jDifferentiation angle value it is minimum, thenset_path_code_i=set_path_code_i∪{path_code_other, above step is repeated, untilset_path_code_otherIt has traversed
At;It generatesset_path_code_i(i=1 ..., k) discrimination matrixmatrix_path_code_i(i=1,2 ..., k),
It is as follows:
Each element dd in discrimination matrix (path p ,path q ) indicatepath p Withpath q Discrimination, wherein 1≤p<=m, 1
<=q<=m, andp≠qWhen, calculated according to discrimination formula, whenp=qWhen, dd (path p ,path q )=0, i.e. discrimination matrix
The elements in a main diagonal is all 0;
Area is repeatedly generated as new cluster centre with the indexing of other datapath sections and the smallest path in selective discrimination degree matrix
The step of indexing matrix and selecting new cluster centre, until cluster centre no longer changes;Finally, cluster centre conduct is exported
The test target set of paths of program to be measured.
2. the software test destination path selection method according to claim 1 based on K- mean cluster, which is characterized in that
In step 1), path code is carried out;Program to be measured is given, is converted the loop structure in program to be measured using Z covering method
To select structure, binary tree is converted by program to be measured, and all paths of ranging sequence are treated based on Huffman encoding and are encoded,
Generate path code set.
3. the software test destination path selection method according to claim 1 based on K- mean cluster, which is characterized in that
In step 1), clustering is carried out;It is randomly choosed from path code setkA path calculates path as cluster centre
The discrimination of residual paths and cluster centre in code set, selection form path code with the smallest cluster centre of its discrimination
Set, and generate its discrimination matrix;Finally, in conjunction with K- means clustering algorithm, in selective discrimination degree matrix with other datapath sections
Indexing and the smallest path is as new cluster centre, the step of repeatedly generating discrimination matrix and select new cluster centre,
Until cluster centre no longer changes;Finally, test target set of paths of the output cluster centre as program to be measured.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910380031.7A CN110084321B (en) | 2019-05-08 | 2019-05-08 | Software test target path selection method based on K-means clustering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910380031.7A CN110084321B (en) | 2019-05-08 | 2019-05-08 | Software test target path selection method based on K-means clustering |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110084321A true CN110084321A (en) | 2019-08-02 |
CN110084321B CN110084321B (en) | 2023-01-20 |
Family
ID=67419143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910380031.7A Expired - Fee Related CN110084321B (en) | 2019-05-08 | 2019-05-08 | Software test target path selection method based on K-means clustering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110084321B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111277464A (en) * | 2020-01-20 | 2020-06-12 | 平安科技(深圳)有限公司 | Internet of things equipment connection testing method and device and computer readable storage medium |
CN112329330A (en) * | 2020-09-27 | 2021-02-05 | 北京卫星制造厂有限公司 | Satellite antenna interface combination processing method based on clustering algorithm |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050081104A1 (en) * | 2003-09-25 | 2005-04-14 | Borislav Nikolik | Test diversity software testing method and apparatus |
CN102331966A (en) * | 2011-01-10 | 2012-01-25 | 中国矿业大学 | Software test data evolution generation system facing path |
CN102929996A (en) * | 2012-10-24 | 2013-02-13 | 华南理工大学 | XPath query optimization method and system |
-
2019
- 2019-05-08 CN CN201910380031.7A patent/CN110084321B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050081104A1 (en) * | 2003-09-25 | 2005-04-14 | Borislav Nikolik | Test diversity software testing method and apparatus |
CN102331966A (en) * | 2011-01-10 | 2012-01-25 | 中国矿业大学 | Software test data evolution generation system facing path |
CN102929996A (en) * | 2012-10-24 | 2013-02-13 | 华南理工大学 | XPath query optimization method and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111277464A (en) * | 2020-01-20 | 2020-06-12 | 平安科技(深圳)有限公司 | Internet of things equipment connection testing method and device and computer readable storage medium |
CN112329330A (en) * | 2020-09-27 | 2021-02-05 | 北京卫星制造厂有限公司 | Satellite antenna interface combination processing method based on clustering algorithm |
CN112329330B (en) * | 2020-09-27 | 2024-06-11 | 北京卫星制造厂有限公司 | Satellite antenna interface combination processing method based on clustering algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN110084321B (en) | 2023-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chen et al. | Execution-guided neural program synthesis | |
Torlai et al. | Neural decoder for topological codes | |
CN107229972A (en) | A kind of global optimization based on Lamarch inheritance of acquired characters principle, search and machine learning method | |
CN105808426B (en) | A kind of path coverage test data creation method for weak mutation testing | |
CN110084321A (en) | A kind of software test destination path selection method based on K- mean cluster | |
CN102411687B (en) | Deep learning detection method of unknown malicious codes | |
McCaffrey | An empirical study of pairwise test set generation using a genetic algorithm | |
CN106067066A (en) | Method for diagnosing fault of power transformer based on genetic algorithm optimization pack algorithm | |
CN103971162A (en) | Method for improving BP (back propagation) neutral network and based on genetic algorithm | |
WO2014173272A1 (en) | Layout method and layout system for monitoring units of digital man-machine interface | |
CN103903055B (en) | Network reconstruction method based on all spanning trees of non-directed graph | |
Wen et al. | Learning ensemble of decision trees through multifactorial genetic programming | |
CN105574589B (en) | Transformer oil chromatographic method for diagnosing faults based on niche genetic algorithm | |
CN110083531A (en) | It improves the shared multi-goal path coverage test method of individual information and realizes system | |
CN106991444A (en) | The Active Learning Method clustered based on peak density | |
CN108573274A (en) | A kind of selective clustering ensemble method based on data stability | |
Malik | A study of genetic algorithm and crossover techniques | |
Liang et al. | Cascade decoder: A universal decoding method for biomedical image segmentation | |
CN101853202B (en) | Test case autogeneration method based on genetic algorithm and weighted matching algorithm | |
CN106919504B (en) | Test data evolution generation method based on GA algorithm | |
Ghiduk et al. | Using genetic algorithms and dominance concepts for generating reduced test data | |
CN115000956B (en) | Power distribution network topology second-order identification method based on data model joint driving | |
Sun et al. | Drivescenegen: Generating diverse and realistic driving scenarios from scratch | |
CN114221990A (en) | Combined service optimization method under cloud platform | |
CN113381869A (en) | Fault root cause analysis method and device, and computer readable storage medium |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20221228 Address after: 223800 South Huanghe Road, Suqian City, Jiangsu Province, 399 Applicant after: SUQIAN College Applicant after: NANJING University Address before: 157012 191 cultural street, Aimin District, Mudanjiang, Heilongjiang Applicant before: Mudanjiang Normal University Applicant before: NANJING University |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20230120 |