CN104820636B - A kind of parallel test case sequence generating method based on ant group algorithm - Google Patents

A kind of parallel test case sequence generating method based on ant group algorithm Download PDF

Info

Publication number
CN104820636B
CN104820636B CN201510163174.4A CN201510163174A CN104820636B CN 104820636 B CN104820636 B CN 104820636B CN 201510163174 A CN201510163174 A CN 201510163174A CN 104820636 B CN104820636 B CN 104820636B
Authority
CN
China
Prior art keywords
test case
ant
mrow
defect
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510163174.4A
Other languages
Chinese (zh)
Other versions
CN104820636A (en
Inventor
高栋栋
郑小萌
冀会芳
虞砺崐
黄晨
胡智琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING SUNWISE INFORMATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING SUNWISE INFORMATION TECHNOLOGY 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 BEIJING SUNWISE INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING SUNWISE INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510163174.4A priority Critical patent/CN104820636B/en
Publication of CN104820636A publication Critical patent/CN104820636A/en
Application granted granted Critical
Publication of CN104820636B publication Critical patent/CN104820636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Or Analysing Biological Materials (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

A kind of parallel test case sequence generating method based on ant group algorithm, the factor of influence priorities of test cases is determined first, then the priority of test case is analyzed using ant colony optimization algorithm, then the algorithm of design is subjected to multi-core parallel concurrent processing, finally priorities of test cases analysis result is evaluated, optimal test case sequence is obtained.The seriousness for the defect that defects count, the execution time of test case and the test case that test case is can be found that by the inventive method are found is used as pheromone updating rule and the parameter of test case node selection rule, compared with prior art, important defect can be detected faster in regression test process, and realize simple, it is easy to operation, the priority ranking of large scale test use-case suitable for regression test, improves the validity and rapidity of regression test process.

Description

A kind of parallel test case sequence generating method based on ant group algorithm
Technical field
The present invention relates to algorithm optimization design and software test field, particularly a kind of parallel survey based on ant group algorithm Example sequence generating method on probation.
Background technology
After software modification or upgrading, in order to ensure the software software defect new not introducing after improving must be returned Return test, traditional regression test is the key activities process in software development and maintenance.Regression test process is typically one Integration testing process, is related to the execution of substantial amounts of test case, therefore, and the process takes very much, and priorities of test cases Analysis method is to carry a kind of efficient effective ways in software regression testing.
At present, intelligent optimization algorithm analysis priorities of test cases achieves good effect, and such as genetic algorithm, ant colony are calculated There is both sides not during priorities of test cases analysis in the application of method, particle cluster algorithm etc., these existing algorithms Foot:On the one hand it is the advantage for not having to handle using multi-core parallel concurrent during analysis, and intelligent optimization algorithm is in itself with stronger Concurrency, it is possible to use multi-core parallel concurrent calculates and improves efficiency;On the other hand it is that to usually assume that test case is detected soft Part defect has identity property, influence of the different software defect to software quality is not accounted in algorithm design different.
The content of the invention
Present invention solves the technical problem that being:Overcome the deficiencies in the prior art there is provided one kind by the way that ant group optimization is calculated Method and multi-core parallel concurrent are calculated and are combined, and improve the parallel based on ant colony of priorities of test cases sequence validity and rapidity The test case sequence generating method of algorithm.
The present invention technical solution be:A kind of parallel test case sequence generating method based on ant group algorithm, Comprise the following steps:
(1) test case is selected from initial test case list to be selected using n ant based on ant group algorithm respectively, Then test case list select of ant is updated respectively, and that continues to select next test case and update ant treats selection survey Example list on probation, repeats said process up to the test case sequence length of n ant selection is n, obtains the 1st iteration n The test case sequence of ant, wherein n ant selects test case or updates its test case list to be selected parallel;Institute Stating initial test case list select includes test case Ti, i=1,2, and 3,, n;The test case row for updating ant Table method is that the test case for selecting the ant is rejected from initial test case list to be selected;
(2) its seriousness numerical value is obtained after being divided to the seriousness of defect, and is designated as S (l), test is then calculated and uses The defect counts that can be found that of example Ti, test case Ti execution time obtain test case Ti defect detection efficiency Rfi, and Calculate significance level ISs of the test case Ti in all test casesi, wherein
L=1,2,3,, q, q is the number of defect, and max (Sf) is the maximum of defect seriousness numerical value in test case, R is the defects count that test case Ti can be detected;
(3) pheromones on the path constituted to test case Ti with test case Td are updated,
τid(t+1)=(1- ρ) τid(t)+Δτid
Wherein, d=1,2,3,, n, t is iterations and initial value is 1, τid(1) it is that the dissipation that 0.5, ρ is pheromones is fast Rate, τid(t+1) be in (t+1) secondary iterative process from the path test case node Ti to test case node Td Pheromone update amount, τid(t) it is the pheromones on the path between Ti to Td in the t times iterative process, (1- ρ) τid(t) it is The pheromones remained on path in the t times iterative process between Ti to Td, Δ τidFor between Ti to Td in the t times iterative process Path on total pheromones increment,For the letter that ant k leaves on the path between Ti to Td in the t times iterative process Breath element, Q is constant, represents the pheromones total amount that possesses of ant, and h (k) is that ant k is closed in t iteration in the t times iterative process In the function of defect detection efficiency, MkThe test case number selected when being ant k detections all defect in the t times iterative process,For the test case Ti selected of ant k in the t times iterative process defect detection efficiency Rfi
(4) test case is selected from initial test case list to be selected respectively using n ant respectively, updated respectively The test case list to be selected of ant, then selects the maximum survey of transition probability from its test case list to be selected respectively Example on probation and the test case list to be selected for updating ant, repeat said process until the test case sequence of n ant selection Row length is n, obtains the test case sequence of n ant of the t+1 times iteration;The transition probability is current test case feelings The probability of another test case is jumped under condition, wherein, the transition probability that test case Ti jumps to test case Td is
Wherein, ηid(t)=ISd(t), α, β are regulation parameter, and s is positive integer,It is that ant k is selecting test case Test case list to be selected after Ti, n ant selects test case or updates its test case list to be selected parallel;
(5) t=t+1, and repeat step (3) is to step (4) until the test case for the n ant that a times iteration is obtained Sequence is identical with the test case sequence for the n ant that the a-1 times iteration is obtained, and wherein a is not less than 2;
(6) APFD of the test case sequence for the n ant that the 1 to a times iteration is obtained is calculated using APFD modules Value, and select the maximum test case sequence of APFD values to be exported as the test case sequence of optimization.
In described step (1) selected from initial test case list to be selected in test case, step (1) after It is continuous continuous select next test case or step (4) selected from initially test case list select the method for test case for Machine is selected.
Obtained after being divided in described step (2) to the seriousness of defect the method for its seriousness numerical value include it is as follows Step:
(1) defect is divided into by defect rank to be seen according to the seriousness of defect in software, it is light defects grade, general Defect rank, major defect grade, major defect grade;
(2) quantification is carried out to the severity level of each defect and obtains the corresponding seriousness numerical value S of each defect (l), wherein, the seriousness numerical value of defect rank to be seen is 2, and the seriousness numerical value of light defects grade is 4, general defect etc. The seriousness numerical value of level is 6, and the seriousness numerical value of major defect grade is 8, and the seriousness numerical value of major defect grade is 10.
The advantage of the present invention compared with prior art is:
(1) defects count, the execution time of test case and the test that test case is can be found that by the inventive method are used The seriousness for the defect that example is found selects the parameter of rule as pheromone updating rule and test case node, with prior art Compare, important defect can be detected faster in regression test process;
(2) the inventive method compared with prior art, ant group algorithm and intelligent optimization algorithm parallel characteristics is added and generated Among process, the cycle tests ultimately generated not only has preferable priority, and formation speed is fast;
(3) the inventive method compared with prior art, overcomes prior art and ignores different software defect to software quality The different deficiency of influence, is realized simply in addition, is easy to operation, it is adaptable to the priority of the large scale test use-case in regression test Sequence, improves the validity and rapidity of regression test process.
Brief description of the drawings
Fig. 1 is the inventive method principle flow chart;
Fig. 2 is the ant group algorithm modeling schematic diagram of priorities of test cases analysis in the inventive method;
Fig. 3 is the APFD under the execution sequence of different test cases;
Fig. 4 is the seriousness that different test cases perform the detection defect under sequence;
Fig. 5 is the time under different test cases execution sequences.
Embodiment
The present invention proposes a kind of parallel life of the test case sequence based on ant group algorithm during software regression testing Into method, calculated and be combined by ant colony optimization algorithm and multi-core parallel concurrent, improve the validity of priorities of test cases sequence And rapidity, include the factor of (1) determination influence priorities of test cases;(2) ant colony optimization algorithm analysis test case is excellent First level;(3) the multi-core parallel concurrent processing of ant colony optimization algorithm;(4) evaluation of priorities of test cases analysis result.With reference to reality The present invention will be further described for example:
Step one:It is determined that the factor of influence priorities of test cases
(1) the defect detection efficiency of test case is calculated
The selection and sequence of test case are influenceed by many factors in test process, for regression test, it is considered to Major influence factors have three:Defects count, the execution time of test case and test case that test case is can be found that It was found that defect seriousness, the inventive method considers three factors, wherein, the number of defects that test case is can be found that Amount reflects the covering power that the test case is detected to software defect, and a test case may be found that one in the process of implementation Individual or multiple software defects, the software defect of discovery is more, illustrates that the test case is stronger to the covering power of software defect, excellent First level is higher;The execution time of test case reflects the testing efficiency of the test case, in regression test, due to testing The time-constrain of journey, test use cases generally can not be performed all, and the execution time of test case is shorter, and priority is higher;Survey The seriousness for the defect that example on probation is found reflects the significance level that the test case detects defect, and software is to different degrees of The acceptable degree of software defect is different, for the serious software defect of the discovery in test process early, test case hair The seriousness of existing defect is higher, and priority is higher.
Two factors of defects count and the execution time of test case that test case is can be found that can be integrated, shape Into the defect detection efficiency of test case, defect detection efficiency is that test case unit performs the defects count found in the time, The rapidity that test case detects defect is reflected, test case Ti defect detection efficiency circular is as follows:
(2) seriousness that test case detects defect is calculated
By the seriousness of defect in influence of the seriousness of analyzing defect to priorities of test cases for convenience, the present invention Quantification processing is carried out, different grades of defect assigns different numerical value, and (wherein, defect rank is drawn the criteria for classifying and can selected 《QUALITY STANDARDS DEFECT MEASUREMENT MANUAL,United Kingdom Software Metrics Association October 2000》Middle method), it is as shown in the table:
The quantification of the defect seriousness of table 1
Defect severity level Seriousness numerical value
Defect (Level_1) to be seen 2
Light defects (Level_2) 4
General defect (Level_3) 6
Major defect (Level_4) 8
Major defect (Level_5) 10
Then the defect of test case Ti detections may include the defect of different menace levels, total defect seriousness numerical value For:
Wherein, S (l) represents defect l seriousness numerical value, and r is the defects count that test case Ti can be detected.In detection In terms of defect seriousness, significance levels of the test case Ti in all test cases may be calculated:
Wherein, max (Sf) is the maximum of total defect seriousness numerical value in all test cases.
Step 2:Ant colony optimization algorithm analyzes the priority of test case
(1) the ant group algorithm modeling of priorities of test cases analysis
The inventive method solves the problems, such as priorities of test cases using ant group algorithm, it is necessary first to build the ant colony of the problem Model.Each ant builds a node on a paths, this paths by search rule and represents one in Ants model Test case, therefore, a sequence of the fullpath correspondence test case of ant, n ant just construct test and used There is an optimal sequence in the n bar sequences of example, this n bar sequence, the weight to optimal sequence (optimal path) is strengthened, Aforesaid operations are repeated, after successive ignition, you can find the test case sequence of global optimum.
It is illustrated in figure 2 ant group algorithm model schematic in the inventive method.In regression test, it is assumed that initial test Comprising n test case in set of uses case T, the initiation sequence of test case is { T1, T2 ..., Ti ..., Tn } in T, these tests Use-case can detect m software defect altogether, in Ants model, and the number of ant is n.Ti represents test use cases T In i-th of test case, Lj represents that ant have selected the test case list that selection is treated after (j-1) test case (by residue (n-j+1) individual test case node composition).In initial time, n ant is randomly placed in test case list L1, Then each ant randomly chooses next test case node in next test case list L2 for treating selection, with such Push away, until the test case that each ant selects covers m software defect.After the completion of an iteration, an ant builds One test case sequence, then repeats said process according to pheromone updating rule and test case node selection rule, Wherein, the initiation sequence of test case is obtained for n times for the random selection of n ants in T, and first in test case sequence test is used Example is random selection.
Ant is independent toward each other in test case sequence process is built, and this is the basis for carrying out multi-core parallel concurrent processing. In addition, ant is often selected after a test case node, the test case list Lj that treat selection is updated operation, and Each ant possesses independent test case list to be selected.
(2) pheromone updating rule
After the completion of an iteration, the pheromones on every paths are updated by following rules,
τid(t+1)=(1- ρ) τid(t)+Δτid
Wherein, τid(1) it is dissipation rate that 0.5, ρ is pheromones, span is [0,1], can take 0.6, τid(t+ 1) be in (t+1) secondary iterative process from the pheromones on the path test case node Ti to test case node Td more New amount, τid(t) it is the pheromones on the path between Ti to Td in last iterative process, i.e. (1- ρ) τid(t) it is residual Pheromones, Δ τitFor pheromones increment total on the path between Ti to Td,For paths of the ant k between Ti to Td On the pheromones that leave, Q is a constant, represents the pheromones total amount that an ant possesses, it is ant k that can take 100, h (k) Function in t iteration on defect detection efficiency, MkIt is to be selected in the t times iteration when ant k detects all defect Test case nodes.Because defect detection efficiency is the ratio between defects count and execution time of detection, therefore, function h (k) In consider the first two factor of influence priorities of test cases, function h (k) value is bigger, illustrate the test use that ant k is built Example sequence is better.
(3) test case node selection rule
Test case node selection rule determines the probability for selecting next test case, without loss of generality, it is assumed that ant Ant k have selected test case node Ti in the test case list Lj for treating selection j-th, then next, i.e., (j+1) is individual Treat that the probability of selection test case node Td in the test case list L (j+1) of selection is provided by following rules:
ηid(t)=ISd(t)
Wherein, ηid(t) it is heuristic function, indicates from test case node Ti to the next test case node Td of selection Desired value, ηid(t) value is bigger, illustrates more to expect selection test in next test case list L (j+1) for treating selection Use-case Td,For ant k (j+1) individual test case list for treating selection, test case node selection rule Pheromones τ on the path that test node is formedid(t) with heuristic function ηid(t) together decide on, α, β is regulation parameter, α= 1, β=2, τ can be adjustedidAnd η (t)id(t) it is rightInfluence degree.ηid(t) value is found by next test case Td Software defect seriousness degree and determine, therefore, ηid(t) the 3rd factor of influence priorities of test cases is considered.
Step 3:The multi-core parallel concurrent processing of ant colony optimization algorithm
The Ants model that step 2 is set up is found in optimal test case sequence process, and each ant independently builds oneself Test case sequence, only after the test case sequence that all ants all construct oneself, just share build result and , that is, there is the communication between ant in fresh information element.Therefore the process that each ant can be built into test case sequence is assigned to Then independent thread, isolated operation is shared operation result, and the advantage calculated by using computer multi-core parallel concurrent is come Improve efficiency.During each ant builds test case sequence, elapsed time at most be loop iteration and circulation assignment, The inventive method carries out parallelization processing cycle using Intel threading building modules TBB (Thread Building Block) and changed Generation and circulation assignment, the part of processing includes:
(1) the TBB stencil designs of initialization
When problem is initialized, n ant is randomly placed in initial test case list L1, using in TBB Parallel_for parallel templates write the template class for initializing each ant, in the template class comprising a constructed fuction and Operator interfaces, initialize ant data structure, by dual after optimization in operator interfaces in constructed fuction The initialization of ant is realized in circulation, and the test case sequence that ant structure is initialized in outer circulation is zero, and the software detected lacks Sunken number is zero, and ant is randomly choosed a test case in L1, and interior circulation sets next survey for treating selection of ant Example list on probation.
(2) each ant builds the TBB stencil designs of test case sequence process
The mould that each ant builds test case sequence process is write using parallel_reduce parallel templates in TBB Comprising two constructed fuctions, operator interfaces and join interfaces in plate class, the template class, a constructed fuction is joined using object Number initialization ant data structure, another constructed fuction builds subtask, supports the union operation in join interfaces, Operator interfaces support the parallel processing of task in loop body, realize that ant selects next test case section in loop body Point, treat selection test case list renewal and the test case sequence and the software defect number of detection that have built more Newly, wherein ant selects the operation of next test case node to be to select rule to be obtained to calculate according to test case node, Join interfaces merge the result that each ant in multiple threads builds test case sequence, are easy to each ant to solve As a result shared.
(3) the TBB stencil designs of the pheromones on test case node path are updated
The mould for updating the pheromones on test case node path is write using the parallel_for parallel templates in TBB A constructed fuction and operator interfaces are included in plate class, the template class, constructed fuction is that an empty real shows, and operator connects Mouth calculates the pheromones remained on any two test case node path.The calculating of pheromones on test case node path Need to follow pheromone updating rule, include the pheromones and pheromones increment two parts of last iteration residual, pheromones increase The calculating of amount part needs continually to carry out information sharing between each ant, and parallel processing is not efficient, at the part-serial Reason, and the calculating of the pheromones remained is relatively independent, is adapted to parallelization, therefore, operator interfaces only calculate two tests The pheromones remained on case node path.
Step 4:The evaluation of priorities of test cases analysis result
(1) metric analysis of software defect detector efficiency.
In order to evaluate the effect that the inventive method is analyzed priorities of test cases, here with inspection software defect efficiency come Weigh.APFD (Average of the percentage of faults detected) is used as module.(with reference to text Offer:Rothermel G,Untch R H,Chu C,et al.Test case prioritization:An empirical study[C]//Software Maintenance,1999.(ICSM’99)Proceedings.IEEE International Conference on.IEEE,1999:179-188.)
If T is the set for including n test case, m is the software defect quantity that test use cases T is detected, the one of T Individual Test Case Prioritization is T ', TFiTo detect position of defect i first test case in Test Case Prioritization T ', Then it is calculated as follows for Test Case Prioritization T ' APFD:
APFD span is bigger for 0% to 100%, APFD value, illustrates the method detection of correspondence Test Case Prioritization Speed to software defect is faster, i.e., the test case for the n all ants that iteration is obtained is calculated using APFD modules The APFD values of sequence, and select the maximum test case sequence of APFD values to be exported as the test case sequence of optimization.
Experimental verification is carried out to technical method proposed by the present invention below, the test case of regression test, which is concentrated, includes 8 Individual test case, the initial of this 8 test cases is ordered as { T1, T2, T3, T4, T5, T6, T7, T8 }, and these test cases are total 10 software defects { F1, F2, F3, F4, F5, F6, F7, F8, F9, F10 } are covered altogether, and the seriousness numerical value of 10 defects is respectively { 4,2,2,8,10,8,10,4,6,6 }, the defects count that each test case is can be found that performs the time and detects the tight of defect Principal characteristic can be calculated by historical data and obtained, and these parameters are set forth in detail in table 2, and these parameters are that multi-core parallel concurrent ant colony is calculated The input parameter of method.We compare the performance that four kinds of test cases perform the detection defect of sequence, and these four test cases are held Row sequence is respectively:
Initial sequence { T1 → T2 → T3 → T4 → T5 → T6 → T7 → T8 };
Theoretical optimal sequencing is { T3 → T1 → T5 → T4 → T6 → T7 → T8 → T2 };
ACO of the present invention sorts { T1 → T3 → T5 → T7 → T6 → T2 → T4 → T8 };
Randomly ordered { T7 → T5 → T4 → T6 → T1 → T3 → T8 → T2 }.
In order to compare the performance that different test cases perform the detection defect of sequence comprehensively, as shown in Fig. 3, Fig. 4, Fig. 5 originally Invention is from APFD, the percentage that detects number of defects, the seriousness for detecting defect and execution time are compared in terms of these, such as Shown in table 3, as can be seen from the table, quite, APFD is 82.5% to the performance of ACO sequences and theoretical optimal sequencing, as long as holding Preceding 3 test cases of row just can all detect 10 software defects, and the time that performs is 16 chronomeres;Initially sort Secondly, APFD is 76.25% to performance, and the whole defects of detection need to perform preceding 5 test cases, and the time that performs is 24 time lists Position;Randomly ordered performance is worst, and APFD is 66.25%, and the whole defects of detection need to perform preceding 6 test cases, during execution Between for 29 chronomeres.It can be seen that, the test case execution sequence under theoretical optimal sequencing and ACO sequence is most useful for software defect Detection, the theoretical optimal sequencing is difficult to obtain in actual applications, therefore can obtain optimal with theory with the present invention The suitable test case execution sequence of the performance that sorts.
The test case of table 2, detection defect and the relation for performing the time
The different test cases of table 3 perform the performance of the detection defect of sequence
, should according to aforementioned four step, you can realize the parallel test case sequence generating method based on ant group algorithm The defect that defects count, the execution time of test case and the test case that method has considered test case discovery are found is tight The priority that three aspects of principal characteristic are performed to test case is analyzed, and optimal test case can be gone out with rapid solving and performs row Sequence so that regression test detects the defect of software within the shortest time, improves the validity of regression test process and quick Property, provide a kind of efficient practical approach for the regression test of software
The content not being described in detail in description of the invention belongs to the known technology of those skilled in the art.

Claims (3)

1. a kind of parallel test case sequence generating method based on ant group algorithm, it is characterised in that comprise the following steps:
(1) test case is selected from initial test case list to be selected using n ant based on ant group algorithm respectively, then Test case list select of ant is updated respectively, and that continues to select next test case and update ant treats selection test use Example list, repeats said process up to the test case sequence length of n ant selection is n, obtains n ant of the 1st iteration The test case sequence of ant, wherein n ant selects test case or updates its test case list to be selected parallel;It is described first Test case list to be selected of beginning includes test case Ti, i=1,2, and 3,, n;The test case list side for updating ant Method is that the test case for selecting the ant is rejected from initial test case list to be selected;
(2) its seriousness numerical value is obtained after being divided to the seriousness of defect, and is designated as S (l), test case Ti is then calculated It can be found that defect counts, the test case Ti execution time obtain test case Ti defect detection efficiency Rfi, and calculate Significance level ISs of the test case Ti in all test casesi, wherein
<mrow> <msub> <mi>IS</mi> <mi>i</mi> </msub> <mo>=</mo> <mfrac> <mrow> <msub> <mi>Sf</mi> <mi>i</mi> </msub> </mrow> <mrow> <mi>m</mi> <mi>a</mi> <mi>x</mi> <mrow> <mo>(</mo> <mi>S</mi> <mi>f</mi> <mo>)</mo> </mrow> </mrow> </mfrac> </mrow>
<mrow> <msub> <mi>Sf</mi> <mi>i</mi> </msub> <mo>=</mo> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <msup> <mi>l</mi> <mo>,</mo> </msup> <mo>=</mo> <mn>1</mn> </mrow> <mi>r</mi> </msubsup> <mi>S</mi> <mrow> <mo>(</mo> <mi>l</mi> <mo>)</mo> </mrow> </mrow>
L=1,2,3,, q, q is the number of defect, and max (Sf) is the maximum of defect seriousness numerical value in test case, and r is The defects count that test case Ti can be detected;
(3) pheromones on the path constituted to test case Ti with test case Td are updated,
τid(t+1)=(1- ρ) τid(t)+Δτid
<mrow> <msub> <mi>&amp;Delta;&amp;tau;</mi> <mrow> <mi>i</mi> <mi>d</mi> </mrow> </msub> <mo>=</mo> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <mi>k</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>n</mi> </msubsup> <msubsup> <mi>&amp;Delta;&amp;tau;</mi> <mrow> <mi>i</mi> <mi>d</mi> </mrow> <mi>k</mi> </msubsup> </mrow>
<mrow> <mi>h</mi> <mrow> <mo>(</mo> <mi>k</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mrow> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <msub> <mi>M</mi> <mi>k</mi> </msub> </msubsup> <msubsup> <mi>Rf</mi> <mi>i</mi> <mi>k</mi> </msubsup> <mrow> <mo>(</mo> <mi>t</mi> <mo>)</mo> </mrow> </mrow> <msub> <mi>M</mi> <mi>k</mi> </msub> </mfrac> </mrow>
Wherein, d=1,2,3,, n, t is iterations and initial value is 1, τid(1) it is dissipation rate that 0.5, ρ is pheromones, τid (t+1) it is from the information on the path test case node Ti to test case node Td in (t+1) secondary iterative process Plain renewal amount, τid(t) it is the pheromones on the path between Ti to Td in the t times iterative process, (1- ρ) τid(t) it is t The pheromones remained on path in secondary iterative process between Ti to Td, Δ τidFor between Ti to Td in the t times iterative process Total pheromones increment on path,For the information that ant k leaves on the path between Ti to Td in the t times iterative process Element, Q is constant, represents the pheromones total amount that possesses of ant, h (k) be in the t times iterative process ant k in t iteration on The function of defect detection efficiency, MkThe test case number selected when being ant k detections all defect in the t times iterative process,For the test case Ti selected of ant k in the t times iterative process defect detection efficiency Rfi
(4) test case is selected from initial test case list to be selected respectively using n ant respectively, ant is updated respectively Test case list to be selected, then select the maximum test of transition probability to use from its test case list to be selected respectively Example and the test case list to be selected for updating ant, repeat said process until the test case sequence of n ant selection is long Degree is n, obtains the test case sequence of n ant of the t+1 times iteration;The transition probability is in the case of current test case The probability of another test case is jumped to, wherein, the transition probability that test case Ti jumps to test case Td is
Wherein, ηid(t)=ISd(t), α, β are regulation parameter, and s is positive integer,Be ant k selection test case Ti after Test case list to be selected, n ant select test case or update its test case list to be selected parallel;
(5) t=t+1, and repeat step (3) is to step (4) until the test case sequence for the n ant that a times iteration is obtained Identical with the test case sequence for the n ant that the a-1 times iteration is obtained, wherein a is not less than 2;
(6) the APFD values of the test case sequence for the n ant that the 1 to a times iteration is obtained are calculated using APFD modules, and The maximum test case sequence of APFD values is selected to be exported as the test case sequence of optimization.
2. a kind of parallel test case sequence generating method based on ant group algorithm according to claim 1, its feature It is:The continuation selected from initial test case list to be selected in test case, step (1) in described step (1) It is continuous to select next test case or step (4) and select the method for test case to be random from initially test case list to be selected Selection.
3. a kind of parallel test case sequence generating method based on ant group algorithm according to claim 1 or 2, it is special Levy and be:Obtained after being divided in described step (2) to the seriousness of defect the method for its seriousness numerical value include it is as follows Step:
(1) defect is divided into by defect rank to be seen, light defects grade, general defect according to the seriousness of defect in software Grade, major defect grade, major defect grade;
(2) quantification is carried out to the severity level of each defect and obtains the corresponding seriousness numerical value S (l) of each defect, its In, the seriousness numerical value of defect rank to be seen is 2, and the seriousness numerical value of light defects grade is 4, general defect rank it is tight Principal characteristic numerical value is 6, and the seriousness numerical value of major defect grade is 8, and the seriousness numerical value of major defect grade is 10.
CN201510163174.4A 2015-04-09 2015-04-09 A kind of parallel test case sequence generating method based on ant group algorithm Active CN104820636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510163174.4A CN104820636B (en) 2015-04-09 2015-04-09 A kind of parallel test case sequence generating method based on ant group algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510163174.4A CN104820636B (en) 2015-04-09 2015-04-09 A kind of parallel test case sequence generating method based on ant group algorithm

Publications (2)

Publication Number Publication Date
CN104820636A CN104820636A (en) 2015-08-05
CN104820636B true CN104820636B (en) 2017-11-07

Family

ID=53730937

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510163174.4A Active CN104820636B (en) 2015-04-09 2015-04-09 A kind of parallel test case sequence generating method based on ant group algorithm

Country Status (1)

Country Link
CN (1) CN104820636B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512046B (en) * 2016-02-01 2018-02-13 北京理工大学 Android automated testing methods based on particle swarm optimization algorithm
CN105786708B (en) * 2016-03-21 2018-06-01 苏州大学 A kind of Loop partition test method and system
CN106776311A (en) * 2016-12-09 2017-05-31 华北计算技术研究所 A kind of software interface test data auto generation method
CN108268373A (en) * 2017-09-21 2018-07-10 平安科技(深圳)有限公司 Automatic test cases management method, device, equipment and storage medium
CN108845947B (en) * 2018-07-06 2019-10-01 中国人民解放军陆军工程大学 Workflow system test case optimization method based on ant colony algorithm
CN110941545A (en) * 2018-09-25 2020-03-31 中国石油化工股份有限公司 Method and device for processing regression test case based on defects and computing equipment
CN111444078B (en) * 2019-01-16 2023-02-07 河南工业大学 Ant colony algorithm-based software defect positioning method and device
CN110109822B (en) * 2019-03-30 2022-03-29 华南理工大学 Regression testing method for carrying out test case priority ranking based on ant colony algorithm
CN110377496B (en) * 2019-04-28 2023-06-06 北京轩宇信息技术有限公司 Test case priority determining method based on intelligent water drops in software regression testing process
CN111176994B (en) * 2019-12-24 2023-03-31 北京轩宇信息技术有限公司 Unit test case generation method and device for embedded software IO port
CN111290929B (en) * 2020-02-10 2023-06-27 珠海图思科软件有限公司 Test method, computer device and computer readable storage medium for equivalent SQL statement performance
CN111666209B (en) * 2020-05-20 2023-03-31 牡丹江师范学院 Multi-objective optimization-based test case priority ordering method
CN113419947B (en) * 2021-06-02 2024-04-16 山东科技大学 Regression test case priority ordering method based on improved ant colony algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464965A (en) * 2009-01-16 2009-06-24 北京航空航天大学 Multi-nuclear parallel ant group design method based on TBB
CN101639788A (en) * 2009-09-10 2010-02-03 北京航空航天大学 Multi-core parallel method for continuous system simulation based on TBB threading building blocks
TW201512838A (en) * 2013-09-27 2015-04-01 Chunghwa Telecom Co Ltd Test case prioritizing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527813B2 (en) * 2011-12-19 2013-09-03 Siemens Aktiengesellschaft Dynamic reprioritization of test cases during test execution

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464965A (en) * 2009-01-16 2009-06-24 北京航空航天大学 Multi-nuclear parallel ant group design method based on TBB
CN101639788A (en) * 2009-09-10 2010-02-03 北京航空航天大学 Multi-core parallel method for continuous system simulation based on TBB threading building blocks
TW201512838A (en) * 2013-09-27 2015-04-01 Chunghwa Telecom Co Ltd Test case prioritizing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Test Case Prioritization for Regression Testing based on Severity of Fault;kavitha R,Sureshkumar N;《International Journal on Computer Science and Engineering》;20100531;第2卷(第5期);全文 *
基于蚁群算法的测试用例选择机制研究;陈璐璐;《中国优秀硕士学位论文全文数据库信息科技辑》;20131201;全文 *

Also Published As

Publication number Publication date
CN104820636A (en) 2015-08-05

Similar Documents

Publication Publication Date Title
CN104820636B (en) A kind of parallel test case sequence generating method based on ant group algorithm
Neumann et al. Bioinspired computation in combinatorial optimization: Algorithms and their computational complexity
CN103810104B (en) A kind of software test case optimization method and system
CN108509335A (en) Software Test Data Generation Method based on genetic algorithm optimization
Guo et al. A hybrid multi-objective PSO algorithm with local search strategy for VLSI partitioning
Sauerwald et al. Tight bounds for randomized load balancing on arbitrary network topologies
CN107908536B (en) Performance evaluation method and system for GPU application in CPU-GPU heterogeneous environment
CN112540849B (en) Parameter configuration optimization method and system for distributed computing operation
Basseur et al. Climbing combinatorial fitness landscapes
CN106503333B (en) A kind of network on three-dimensional chip test-schedule method
CN106355208A (en) Data prediction analysis method based on COX model and random survival forest
Baykasoğlu et al. Discovering task assignment rules for assembly line balancing via genetic programming
Liu et al. Many-objective best-order-sort genetic algorithm for mixed-model multi-robotic disassembly line balancing
Su et al. A distributed coevolutionary algorithm for multiobjective hybrid flowshop scheduling problems
Hernández-Ramírez et al. A Hybrid Simulated Annealing for Job Shop Scheduling Problem.
CN110377496A (en) A kind of priorities of test cases during software regression testing based on intelligent water drop determines method
US20160179890A1 (en) Methods and a system for hybrid large join query optimization
Kletzander et al. Metaheuristic algorithms for the bus driver scheduling problem with complex break constraints
Sadaghiani et al. A Pareto archive floating search procedure for solving multi-objective flexible job shop scheduling problem
Pal et al. Comparative performance of modified simulated annealing with simple simulated annealing for graph coloring problem
Šikulová et al. Coevolution in cartesian genetic programming
Li et al. A discrete artificial bee colony algorithm and its application in flexible flow shop scheduling with assembly and machine deterioration effect
Sun et al. A Pareto-based hybrid genetic simulated annealing algorithm for multi-objective hybrid production line balancing problem considering disassembly and assembly
CN110069347B (en) Thread dividing method based on process importance
Chang et al. Parameter optimization of Spark in heterogeneous environment based on hyperband

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Gao Dongdong

Inventor after: Jiang Yunsong

Inventor after: Zheng Xiaomeng

Inventor after: Ji Huifang

Inventor after: Yu Likun

Inventor after: Huang Chen

Inventor after: Hu Zhiqi

Inventor before: Gao Dongdong

Inventor before: Zheng Xiaomeng

Inventor before: Ji Huifang

Inventor before: Yu Likun

Inventor before: Huang Chen

Inventor before: Hu Zhiqi