CN104820636A - Ant colony algorithm based parallel test case sequence generation method - Google Patents

Ant colony algorithm based parallel test case sequence generation method Download PDF

Info

Publication number
CN104820636A
CN104820636A CN201510163174.4A CN201510163174A CN104820636A CN 104820636 A CN104820636 A CN 104820636A CN 201510163174 A CN201510163174 A CN 201510163174A CN 104820636 A CN104820636 A CN 104820636A
Authority
CN
China
Prior art keywords
test case
ant
defect
seriousness
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.)
Granted
Application number
CN201510163174.4A
Other languages
Chinese (zh)
Other versions
CN104820636B (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

The invention relates to an ant colony algorithm based parallel test case sequence generation method. The method comprises the steps of firstly, determining factors affecting test case priority; then analyzing the test case priority by an ant colony optimization algorithm; performing multi-core parallel processing on a designed algorithm; and finally, evaluating the analysis result of the test case priority, so as to obtain an optimal test case sequence. According to the method, defect quantity found by test cases, execution time of the test cases and the severity of the defects found by the test cases can be used as parameters of pheromone updating rules and test case node selection rules. Compared with the prior art, the method can detect serious defects more rapidly in a regression testing process, and the method is simple to realize, is convenient to operate, is applicable to priority ranking of large scale test cases in the regression testing, and improves the effectiveness and rapidity of the regression testing 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 test case sequence generating method based on ant group algorithm.
Background technology
When after software modification or upgrading, in order to ensure that the software after improving is not introduced new software defect and just must be carried out regression test, traditional regression test is the key activities process in software development and maintenance.Regression test process is an integration testing process normally, relates to the execution of a large amount of test cases, and therefore, this process is very consuming time, and priorities of test cases analytical approach is a kind of effective ways of raising the efficiency in software regression testing.
At present, intelligent optimization algorithm analytical test use-case priority achieves good effect, as the application of genetic algorithm, ant group algorithm, particle cluster algorithm etc., these existing algorithms deposit deficiency both ways in priorities of test cases analytic process: be the advantage not utilizing multi-core parallel concurrent process in analytic process on the one hand, and intelligent optimization algorithm itself has stronger concurrency, multi-core parallel concurrent can be utilized to calculate and to raise the efficiency; Be usually suppose that the software defect that test case detects has identity property on the other hand, in algorithm design, do not consider that different software defect is different on the impact of software quality.
Summary of the invention
The technical matters that the present invention solves is: overcome the deficiencies in the prior art, provide a kind of by ant colony optimization algorithm and multi-core parallel concurrent calculating are combined, improve the parallel test case sequence generating method based on ant group algorithm of priorities of test cases sequence validity and rapidity.
Technical solution of the present invention is: a kind of parallel test case sequence generating method based on ant group algorithm, comprises the steps:
(1) use n ant from initially waiting to select to select test case test case list respectively based on ant group algorithm, what then upgrade ant respectively treats the list of selection test case, continue to select next test case and upgrade ant wait select test case list, repeat said process until the test case sequence length of n ant selection is n, obtain the test case sequence of the 1st iteration n ant, wherein n ant walks abreast and selects test case or upgrade it to wait to select test case list; Described initially waiting selects test case list to comprise test case Ti, i=1,2,3,, n; The test case tabulating method of described renewal ant is that the test case selected by this ant is from initially treating to reject the list of selection test case;
(2) obtain its seriousness numerical value after the seriousness of defect being divided, and be designated as S (l), then calculate test case Ti can find defect counts, test case Ti execution time obtain the defect detection efficiency Rf of test case Ti i, and calculate the significance level IS of test case Ti in all test cases i, wherein
IS i = Sf i max ( Sf )
Sf i = Σ l = 1 r S ( l )
L=1,2,3,, q, q are the number of defect, and max (Sf) is the maximal value of defect seriousness numerical value in test case, and r is the defects count that test case Ti can detect;
(3) pheromones on the path formed test case Ti and test case Td upgrades,
τ id(t+1)=(1-ρ)·τ id(t)+Δτ id
Δτ id = Σ k = 1 n Δτ id k
Δτ id k = Q * h ( k ) 0 If ant k have selected other situations of path between test case node Ti to test case node Td
h ( k ) = Σ i = 1 M k Rf i k ( t ) M k
Wherein, d=1,2,3,, n, t are iterations and initial value is 1, τ id(1) dissipation rate of pheromones that to be 0.5, ρ be, τ id(t+1) be from the Pheromone update amount the path test case node Ti to test case node Td in (t+1) secondary iterative process, τ idt () is the pheromones on the path in the t time iterative process between Ti to Td, (1-ρ) τ idt () is pheromones residual on the path in the t time iterative process between Ti to Td, Δ τ idbe pheromones increment total on the path in the t time iterative process between Ti to Td, be the pheromones in the t time iterative process, the path of ant k between Ti to Td stayed, Q is constant, represents the pheromones total amount that has of ant, h (k) be in the t time iterative process ant k in t iteration about the function of defect detection efficiency, M kthe test case number selected when ant k detects all defect in the t time iterative process, Rf i kt () is the defect detection efficiency Rf of the test case Ti that in the t time iterative process, ant k selects i;
(4) n ant is used respectively respectively from initially waiting to select to select test case test case list, what upgrade ant respectively treats the list of selection test case, then respectively from its wait the test case selecting to select transition probability maximum test case list and upgrade ant wait select test case list, repeat said process until the test case sequence length of n ant selection is n, obtain the test case sequence of the t+1 time iteration n ant; Described transition probability is the probability jumping to another test case in current test case situation, and wherein, the transition probability that test case Ti jumps to test case Td is
Wherein, η id(t)=IS d(t), α, β are regulating parameter, and s is positive integer, for ant k treating after selecting test case Ti selects test case list, n ant walks abreast and selects test case or upgrade it to wait to select test case list;
(5) t=t+1, and repeat step (3) to step (4) until the test case sequence of n ant that obtains of the test case sequence of n ant that obtains of a time iteration and the a-1 time iteration is identical, wherein a is not less than 2;
(6) the APFD value of the test case sequence of n the ant using APFD module calculating the 1st to a time iteration to obtain, and the test case sequence selecting APFD value maximum exports as optimized test case sequence.
In described step (1) from initially waiting to select to select test case test case list, the continuation in step (1) is continuous selects next test case or step (4) from initially waiting to select to select the method for test case to be Stochastic choice test case list.
The method obtaining its seriousness numerical value after dividing the seriousness of defect in described step (2) comprises the steps:
(1) according to the seriousness of defect in software, defect is divided into defect rank to be seen, light defects grade, general defect rank, major defect grade, major defect grade;
(2) quantification carried out to the severity level of each defect and obtain seriousness numerical value S (l) corresponding to each defect, wherein, the seriousness numerical value of defect rank to be seen is 2, the seriousness numerical value of light defects grade is 4, the seriousness numerical value of general defect rank is 6, the seriousness numerical value of major defect grade is 8, and the seriousness numerical value of major defect grade is 10.
The present invention's advantage is compared with prior art:
(1) seriousness of the defect that test case can find by the inventive method defects count, execution time of test case and test case find is as the parameter of pheromone updating rule and test case sensor selection problem rule, compared with prior art, important defect can be detected faster in regression test process;
(2) the inventive method compared with prior art, adds in the middle of generative process by ant group algorithm and intelligent optimization algorithm parallel characteristics, and the final cycle tests generated not only has good priority, and formation speed is fast;
(3) the inventive method compared with prior art, overcome prior art ignorance different software defect and different deficiencies is affected on software quality, realize simple in addition, convenient operation, be applicable to the prioritization of the large scale test use-case in regression test, improve validity and the rapidity of regression test process.
Accompanying drawing explanation
Fig. 1 is the inventive method principle flow chart;
Fig. 2 is the ant group algorithm modeling schematic diagram that in the inventive method, priorities of test cases is analyzed;
Fig. 3 is the APFD under different test case performs sequence;
Fig. 4 is the seriousness detecting defect under different test case performs sequence;
Fig. 5 is the time under different test case performs sequence.
Embodiment
The present invention proposes a kind of parallel test case sequence generating method based on ant group algorithm in software regression testing process, calculated by ant colony optimization algorithm and multi-core parallel concurrent and combine, improve validity and the rapidity of priorities of test cases sequence, comprise the factor that (1) determines to affect priorities of test cases; (2) priority of ant colony optimization algorithm analytical test use-case; (3) the multi-core parallel concurrent process of ant colony optimization algorithm; (4) evaluation of priorities of test cases analysis result.Below in conjunction with example, the present invention will be further described:
Step one: determine the factor affecting priorities of test cases
(1) the defect detection efficiency of test case is calculated
In test process, the selection of test case and sequence are by the impact of many factors, for regression test, the major influence factors considered has three: the defects count that test case can find, the seriousness of the defect that the execution time of test case and test case find, the inventive method summation considers this three factors, wherein, the defects count that test case can find reflects the covering power that this test case detects software defect, a test case may find one or more software defect in the process of implementation, the software defect found is more, illustrate that the covering power of this test case to software defect is stronger, priority is higher, the execution time of test case reflects the testing efficiency of this test case, and in regression test, due to the time-constrain of test process, test use cases can not all perform usually, and the execution time of test case is shorter, and priority is higher, the seriousness of the defect that test case finds reflects the significance level that this test case detects defect, software is different to the acceptable degree of software defect in various degree, in order to the software defect that discovery early in test process is serious, the seriousness of the defect that test case finds is higher, and priority is higher.
Execution time two factors of the defects count that test case can find and test case can be carried out comprehensively, form the defect detection efficiency of test case, defect detection efficiency is the defects count found in the test case unit execution time, reflect the rapidity that test case detects defect, the defect detection efficiency circular of test case Ti is as follows:
(2) seriousness that test case detects defect is calculated
Conveniently the seriousness of analyzing defect is on the impact of priorities of test cases, in the present invention, the seriousness of defect is carried out quantification process, the defect of different brackets gives different numerical value (wherein, defect rank draws the criteria for classifying can select " QUALITY STANDARDS DEFECT MEASUREMENTMANUAL, United Kingdom Software Metrics Association October 2000 " middle method), as shown in the table:
The quantification of table 1 defect seriousness
Defect severity level Seriousness numerical value
Defect to be seen (Level_1) 2
Light defects (Level_2) 4
General defect (Level_3) 6
Major defect (Level_4) 8
Major defect (Level_5) 10
The defect that then test case Ti detects may comprise the defect of different menace level, and total defect seriousness numerical value is:
Sf i = Σ l = 1 r S ( l )
Wherein, S (l) represents the seriousness numerical value of defect l, and r is the defects count that test case Ti can detect.Detecting in defect seriousness, the significance level of test case Ti in all test cases may be calculated:
IS i = Sf i max ( Sf )
Wherein, max (Sf) is the maximal value of defect seriousness numerical value total in all test cases.
Step 2: the priority of ant colony optimization algorithm analytical test use-case
(1) the ant group algorithm modeling of priorities of test cases analysis
The inventive method utilizes ant group algorithm to solve priorities of test cases problem, first needs the Ants model building this problem.In Ants model, each ant builds a paths by search rule, a node on this paths represents a test case, therefore, a sequence of the corresponding test case of a fullpath of ant, n ant just constructs the n bar sequence of test case, the sequence that in this n bar sequence, existence one is optimum, the weight of optimal sequence (optimal path) is strengthened, repeat aforesaid operations, after successive ignition, the test case sequence of global optimum can be found.
Be illustrated in figure 2 ant group algorithm model schematic in the inventive method.In regression test, suppose to comprise n test case in initial test use cases T, in T, the initiation sequence of test case is { T1, T2, ..., Ti ..., Tn}, these test cases can detect m software defect altogether, and in Ants model, the number of ant is n.Ti represents i-th test case in test use cases T, test case list (being made up of remaining (n-j+1) individual test case node) to be selected after test case that Lj represents that ant have selected (j-1).At initial time, n ant is randomly placed in test case list L1, then the next test case node of each ant Stochastic choice in the test case list L2 that the next one is to be selected, by that analogy, until the test case that each ant is selected covers m software defect.After an iteration completes, an ant constructs a test case sequence, then said process is repeated according to pheromone updating rule and test case sensor selection problem rule, wherein, in T, the initiation sequence of test case is that n ant Stochastic choice obtains for n time, and first test case in test case sequence is Stochastic choice.
Ant is independent toward each other in structure test case sequence process, and this is the basis of carrying out multi-core parallel concurrent process.In addition, after ant often selects a test case node, the test case list Lj that treat selection carries out renewal rewards theory, and each ant has and independently waits to select test case list.
(2) pheromone updating rule
After an iteration completes, to upgrade by following rule the pheromones on every paths,
τ id(t+1)=(1-ρ)·τ id(t)+Δτ id
Δτ id = Σ k = 1 n Δτ id k
Δτ id k = Q * h ( k ) 0 If ant k have selected other situations of path between test case node Ti to test case node Td
h ( k ) = Σ i = 1 M k Rf i k ( t ) M k
Wherein, τ id(1) dissipation rate of pheromones that to be 0.5, ρ be, span is [0,1], can get 0.6, τ id(t+1) be from the Pheromone update amount the path test case node Ti to test case node Td in (t+1) secondary iterative process, τ idt () is the pheromones on the path in last iterative process between Ti to Td, i.e. (1-ρ) τ idt () is residual pheromones, Δ τ idfor pheromones increment total on the path between Ti to Td, for the pheromones that the path of ant k between Ti to Td stays, Q is a constant, represents the pheromones total amount that an ant has, and can get 100, h (k) is ant k function about defect detection efficiency in t iteration, M kit is the test case nodes selected when ant k detects all defect in the t time iteration.Due to the ratio that defect detection efficiency is defects count and the execution time detected, therefore, consider the first two factor affecting priorities of test cases in function h (k), the value of function h (k) is larger, illustrates that the test case sequence that ant k builds is better.
(3) test case sensor selection problem rule
Test case sensor selection problem rule determines the probability selecting next test case, without loss of generality, suppose that ant k have selected test case node Ti in a jth test case list Lj to be selected, then at the next one, the probability of test case node Td namely in (j+1) individual test case list L (j+1) to be selected, is selected to provide by following rule:
η id(t)=IS d(t)
Wherein, η idt () is heuristic function, indicate from test case node Ti to the expectation value selecting next test case node Td, η idt the value of () is larger, illustrate that more test case Td is selected in expectation in the test case list L (j+1) that the next one is to be selected, (j+1) for ant k individual test case list to be selected, test case sensor selection problem rule pheromones τ on the path formed by test node id(t) and heuristic function η idt () determines jointly, α, β are regulating parameter, α=1, and β=2 can regulate τ id(t) and η idt () is right influence degree.η idthe seriousness degree of t software defect that the value of () is found by next test case Td and determining, therefore, η idt () considers the 3rd factor affecting priorities of test cases.
Step 3: the multi-core parallel concurrent process of ant colony optimization algorithm
The Ants model that step 2 is set up is found in optimum test case sequence process, each ant independently builds oneself test case sequence, only all construct the test case sequence of oneself all ants after, just share the result built and lastest imformation element, namely there is the communication between ant.The process that therefore each ant can be built test case sequence is assigned to independently thread, isolated operation, and then shared by operation result, the advantage calculated by utilizing computing machine multi-core parallel concurrent is raised the efficiency.Each ant builds in the process of test case sequence, what elapsed time was maximum is loop iteration and circulation assignment, the inventive method utilizes Intel threading building module TBB (Thread Building Block) to carry out parallelization cycle for the treatment of iteration and circulation assignment, and the part of process comprises:
(1) initialized TBB stencil design
When problem initialization, n ant is placed at random in initial test case list L1, parallel_for parallel templates in TBB is utilized to write the template class of each ant of initialization, a constructed fuction and operator interface is comprised in this template class, initialization ant data structure in constructed fuction, realized the initialization of ant by the double circulation after optimization in operator interface, the test case sequence that in outer circulation, initialization ant builds is zero, the software defect number detected is zero, and make a test case in ant Stochastic choice L1, Inner eycle arranges the test case list to be selected of the next one of ant.
(2) each ant builds the TBB stencil design of test case sequence process
Parallel_reduce parallel templates in TBB is utilized to write the template class of each ant structure test case sequence process, two constructed fuctions are comprised in this template class, operator interface and join interface, a constructed fuction utilizes image parameter initialization ant data structure, another constructed fuction builds subtask, support the union operation in join interface, operator interface supports the parallel processing of task in loop body, realize ant in loop body and select next test case node, the renewal of test case list to be selected and the renewal of the test case sequence built and the software defect number detected, wherein ant selects the operation of next test case node to be calculate according to test case sensor selection problem rule, the result that each ant in multiple thread builds test case sequence merges by join interface, be convenient to sharing of each ant solving result.
(3) the TBB stencil design of the pheromones on refresh test case node path
The parallel_for parallel templates in TBB is utilized to write the template class of the pheromones on refresh test case node path, a constructed fuction and operator interface is comprised in this template class, constructed fuction is an empty realization, and operator interface calculates pheromones residual on any two test case node paths.The calculating of the pheromones on test case node path needs to follow pheromone updating rule, comprise the residual pheromones of last iteration and pheromones increment two parts, the calculating of pheromones incremental portion needs to carry out information sharing continually between each ant, parallel processing is not efficient, this part-serial process, and the calculating of residual pheromones is relatively independent, is adapted to parallelization, therefore, operator interface only calculates pheromones residual on two test case node paths.
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, weigh by inspection software defect efficiency here.APFD (Average of the percentage of faults detected) is as module.(list of references: 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 comprising n test case, m is the software defect quantity that test use cases T detects, a Test Case Prioritization of T is T ', TF ifor first position of test case in Test Case Prioritization T ' of defect i being detected, then the APFD for Test Case Prioritization T ' is calculated as follows:
APED = 1 - TF 1 + TF 2 + . . . + TF 1 + . . . + TF m nm + 1 2 n
The span of APFD is 0% to 100%, the value of APFD is larger, illustrate that corresponding Test Case Prioritization method detects that the speed of software defect is faster, namely use APED module to calculate the APED value of the test case sequence of all n the ant that iteration obtains, and the test case sequence selecting APED value maximum export as optimized test case sequence.
Experimental verification is carried out to the technical method that the present invention proposes below, regression tested test case is concentrated and is comprised 8 test cases, the initial sequence of these 8 test cases is { T1, T2, T3, T4, T5, T6, T7, T8}, these test cases cover 10 software defect { F1 altogether, F2, F3, F4, F5, F6, F7, F8, F9, F10}, 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 can find, execution time can be calculated by historical data with the seriousness detecting defect, set forth in detail these parameters in table 2, these parameters are input parameters of multi-core parallel concurrent ant group algorithm.We compare the performance detecting defect that four kinds of test cases perform sequence, and these four kinds of test cases perform sequence and are respectively:
Initial sequence { T1 → T2 → T3 → T4 → T5 → T6 → T7 → T8};
Theoretical optimal sequencing is { T3 → T1 → T5 → T4 → T6 → T7 → T8 → T2};
ACO sequence { T1 → T3 → T5 → T7 → T6 → T2 → T4 → T8} of the present invention;
Randomly ordered { T7 → T5 → T4 → T6 → T1 → T3 → T8 → T2}.
In order to more different test case performs the performance detecting defect of sequence comprehensively, as shown in Fig. 3, Fig. 4, Fig. 5, the present invention compares from APFD, the number percent detecting number of defects, the seriousness detecting defect and these aspects of execution time, as shown in table 3, as can be seen from the table, the performance of ACO sequence and theoretical optimal sequencing is suitable, APFD is 82.5%, and just 10 software defects all can be detected as long as perform front 3 test cases, the execution time is 16 chronomeres; Secondly, APFD is 76.25% to the performance of initial sequence, and detecting whole defect needs to perform front 5 test cases, and the execution time is 24 chronomeres; Randomly ordered performance is the poorest, and APFD is 66.25%, and detecting whole defect needs to perform front 6 test cases, and the execution time is 29 chronomeres.Visible, test case execution sequence under theoretical optimal sequencing and ACO sort is beneficial to the detection of software defect most, this theoretical optimal sequencing is difficult to obtain in actual applications, therefore can obtain the test case execution sequence suitable with theoretical optimal sequencing performance with the present invention.
Table 2 test case, detect the relation of defect and execution time
The different test case of table 3 performs the performance detecting defect of sequence
According to above-mentioned four steps, the test case sequence generating method based on ant group algorithm walked abreast can be realized, the method has considered defect seriousness three aspects that defects count that test case finds, execution time of test case and test case find and has analyzed the priority that test case performs, optimum test case can be gone out perform sequence by rapid solving, make regression test within the shortest time, detect the defect of software, improve validity and the rapidity of regression test process, the regression test for software provides a kind of practical approach efficiently
The content be not described in detail in instructions of the present invention belongs to the known technology of those skilled in the art.

Claims (3)

1. the parallel test case sequence generating method based on ant group algorithm, is characterized in that comprising the steps:
(1) use n ant from initially waiting to select to select test case test case list respectively based on ant group algorithm, what then upgrade ant respectively treats the list of selection test case, continue to select next test case and upgrade ant wait select test case list, repeat said process until the test case sequence length of n ant selection is n, obtain the test case sequence of the 1st iteration n ant, wherein n ant walks abreast and selects test case or upgrade it to wait to select test case list; Described initially waiting selects test case list to comprise test case Ti, i=1,2,3,, n; The test case tabulating method of described renewal ant is that the test case selected by this ant is from initially treating to reject the list of selection test case;
(2) obtain its seriousness numerical value after the seriousness of defect being divided, and be designated as S (l), then calculate test case Ti can find defect counts, test case Ti execution time obtain the defect detection efficiency Rf of test case Ti i, and calculate the significance level IS of test case Ti in all test cases i, wherein
IS i = Sf i max ( Sf )
Sf i = Σ l = 1 r S ( l )
L=1,2,3,, q, q are the number of defect, and max (Sf) is the maximal value of defect seriousness numerical value in test case, and r is the defects count that test case Ti can detect;
(3) pheromones on the path formed test case Ti and test case Td upgrades,
τ id(t+1)=(1-ρ)·τ id(t)+Δτ id
Δ τ id = Σ k = 1 n Δ τ id k
h ( k ) = Σ i = 1 M k Rf i k ( t ) M k
Wherein, d=1,2,3,, n, t are iterations and initial value is 1, τ id(1) dissipation rate of pheromones that to be 0.5, ρ be, τ id(t+1) be from the Pheromone update amount the path test case node Ti to test case node Td in (t+1) secondary iterative process, τ idt () is the pheromones on the path in the t time iterative process between Ti to Td, (1-ρ) τ idt () is pheromones residual on the path in the t time iterative process between Ti to Td, Δ τ idbe pheromones increment total on the path in the t time iterative process between Ti to Td, be the pheromones in the t time iterative process, the path of ant k between Ti to Td stayed, Q is constant, represents the pheromones total amount that has of ant, h (k) be in the t time iterative process ant k in t iteration about the function of defect detection efficiency, M kthe test case number selected when ant k detects all defect in the t time iterative process, be the defect detection efficiency Rf of the test case Ti that in the t time iterative process, ant k selects i;
(4) n ant is used respectively respectively from initially waiting to select to select test case test case list, what upgrade ant respectively treats the list of selection test case, then respectively from its wait the test case selecting to select transition probability maximum test case list and upgrade ant wait select test case list, repeat said process until the test case sequence length of n ant selection is n, obtain the test case sequence of the t+1 time iteration n ant; Described transition probability is the probability jumping to another test case in current test case situation, and wherein, the transition probability that test case Ti jumps to test case Td is
Wherein, η id(t)=IS d(t), α, β are regulating parameter, and s is positive integer, for ant k treating after selecting test case Ti selects test case list, n ant walks abreast and selects test case or upgrade it to wait to select test case list;
(5) t=t+1, and repeat step (3) to step (4) until the test case sequence of n ant that obtains of the test case sequence of n ant that obtains of a time iteration and the a-1 time iteration is identical, wherein a is not less than 2;
(6) the APFD value of the test case sequence of n the ant using APFD module calculating the 1st to a time iteration to obtain, and the test case sequence selecting APFD value maximum exports as optimized test case sequence.
2. a kind of parallel test case sequence generating method based on ant group algorithm according to claim 1, it is characterized in that: in described step (1) from initially waiting to select to select test case test case list, the continuation in step (1) is continuous selects next test case or step (4) from initially waiting to select to select the method for test case to be Stochastic choice test case list.
3. a kind of parallel test case sequence generating method based on ant group algorithm according to claim 1 and 2, is characterized in that: the method obtaining its seriousness numerical value after dividing the seriousness of defect in described step (2) comprises the steps:
(1) according to the seriousness of defect in software, defect is divided into defect rank to be seen, light defects grade, general defect rank, major defect grade, major defect grade;
(2) quantification carried out to the severity level of each defect and obtain seriousness numerical value S (l) corresponding to each defect, wherein, the seriousness numerical value of defect rank to be seen is 2, the seriousness numerical value of light defects grade is 4, the seriousness numerical value of general defect rank is 6, 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 true CN104820636A (en) 2015-08-05
CN104820636B 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)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512046A (en) * 2016-02-01 2016-04-20 北京理工大学 Particle swarm optimization (PSO) algorithm based Android automatic testing method
CN105786708A (en) * 2016-03-21 2016-07-20 苏州大学 Iterative division testing 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
CN108845947A (en) * 2018-07-06 2018-11-20 中国人民解放军陆军工程大学 A kind of Workflow system test case optimization method based on ant group algorithm
CN110109822A (en) * 2019-03-30 2019-08-09 华南理工大学 The regression testing method of priorities of test cases sequence is carried out based on ant group algorithm
CN110377496A (en) * 2019-04-28 2019-10-25 北京轩宇信息技术有限公司 A kind of priorities of test cases during software regression testing based on intelligent water drop determines method
CN110941545A (en) * 2018-09-25 2020-03-31 中国石油化工股份有限公司 Method and device for processing regression test case based on defects and computing equipment
CN111176994A (en) * 2019-12-24 2020-05-19 北京轩宇信息技术有限公司 Unit test case generation method and device for embedded software IO port
CN111290929A (en) * 2020-02-10 2020-06-16 珠海图思科软件有限公司 Equivalent SQL statement performance test method, computer device and computer readable storage medium
CN111444078A (en) * 2019-01-16 2020-07-24 河南工业大学 Ant colony algorithm-based software defect positioning method and device
CN111666209A (en) * 2020-05-20 2020-09-15 牡丹江师范学院 Multi-objective optimization-based test case priority ordering method
CN113419947A (en) * 2021-06-02 2021-09-21 山东科技大学 Regression test case priority ranking method based on improved ant colony algorithm

Citations (4)

* 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
US20130159774A1 (en) * 2011-12-19 2013-06-20 Siemens Corporation Dynamic reprioritization of test cases during test execution
TW201512838A (en) * 2013-09-27 2015-04-01 Chunghwa Telecom Co Ltd Test case prioritizing method

Patent Citations (4)

* 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
US20130159774A1 (en) * 2011-12-19 2013-06-20 Siemens Corporation Dynamic reprioritization of test cases during test execution
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
KAVITHA R,SURESHKUMAR N: "Test Case Prioritization for Regression Testing based on Severity of Fault", 《INTERNATIONAL JOURNAL ON COMPUTER SCIENCE AND ENGINEERING》 *
陈璐璐: "基于蚁群算法的测试用例选择机制研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105512046A (en) * 2016-02-01 2016-04-20 北京理工大学 Particle swarm optimization (PSO) algorithm based Android automatic testing method
CN105786708A (en) * 2016-03-21 2016-07-20 苏州大学 Iterative division testing method and system
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
WO2019056720A1 (en) * 2017-09-21 2019-03-28 平安科技(深圳)有限公司 Automated test case management method and apparatus, device, and storage medium
CN108845947B (en) * 2018-07-06 2019-10-01 中国人民解放军陆军工程大学 A kind of Workflow system test case optimization method based on ant group algorithm
CN108845947A (en) * 2018-07-06 2018-11-20 中国人民解放军陆军工程大学 A kind of Workflow system test case optimization method based on ant group algorithm
CN110941545A (en) * 2018-09-25 2020-03-31 中国石油化工股份有限公司 Method and device for processing regression test case based on defects and computing equipment
CN111444078A (en) * 2019-01-16 2020-07-24 河南工业大学 Ant colony algorithm-based software defect positioning method and device
CN111444078B (en) * 2019-01-16 2023-02-07 河南工业大学 Ant colony algorithm-based software defect positioning method and device
CN110109822A (en) * 2019-03-30 2019-08-09 华南理工大学 The regression testing method of priorities of test cases sequence is carried out based on ant group algorithm
CN110377496A (en) * 2019-04-28 2019-10-25 北京轩宇信息技术有限公司 A kind of priorities of test cases during software regression testing based on intelligent water drop determines method
CN110377496B (en) * 2019-04-28 2023-06-06 北京轩宇信息技术有限公司 Test case priority determining method based on intelligent water drops in software regression testing process
CN111176994A (en) * 2019-12-24 2020-05-19 北京轩宇信息技术有限公司 Unit test case generation method and device for embedded software IO port
CN111290929A (en) * 2020-02-10 2020-06-16 珠海图思科软件有限公司 Equivalent SQL statement performance test method, computer device and computer readable storage medium
CN111290929B (en) * 2020-02-10 2023-06-27 珠海图思科软件有限公司 Test method, computer device and computer readable storage medium for equivalent SQL statement performance
CN111666209A (en) * 2020-05-20 2020-09-15 牡丹江师范学院 Multi-objective optimization-based test case priority ordering method
CN113419947A (en) * 2021-06-02 2021-09-21 山东科技大学 Regression test case priority ranking method based on improved ant colony algorithm
CN113419947B (en) * 2021-06-02 2024-04-16 山东科技大学 Regression test case priority ordering method based on improved ant colony algorithm

Also Published As

Publication number Publication date
CN104820636B (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN104820636A (en) Ant colony algorithm based parallel test case sequence generation method
Liu et al. A task scheduling algorithm based on classification mining in fog computing environment
CN104200087B (en) For the parameter optimization of machine learning and the method and system of feature tuning
CN106339351B (en) A kind of SGD algorithm optimization system and method
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
Hendrix et al. A scalable algorithm for single-linkage hierarchical clustering on distributed-memory architectures
CN102855153A (en) Flow compilation optimization method oriented to chip multi-core processor
Linsbichler et al. Novel algorithms for abstract dialectical frameworks based on complexity analysis of subclasses and SAT solving
CN106685954B (en) A kind of plug-in unit scans, determines the method and device of rule-based scheduling sequence in plug-in unit
Yan et al. A quantitative approach to the process modeling and planning in concurrent engineering
Moradi et al. Fast parallel community detection algorithm based on modularity
Wang et al. Dynamic test case prioritization based on multi-objective
Kim et al. Performance evaluation and tuning for MapReduce computing in Hadoop distributed file system
Nahavandi et al. Solving the dynamic job shop scheduling problem using bottleneck and intelligent agents based on genetic algorithm
CN106649124B (en) A kind of parallel dynamic symbol execution method and system based on Actor model
Xiao et al. Stackelberg network interdiction game: nodal model and algorithm
Tian et al. Genetic algorithm parameters tuning for resource-constrained project scheduling problem
Chang et al. Parameter optimization of Spark in heterogeneous environment based on hyperband
Dang et al. Motivations for the development of a multi-objective algorithm configurator
CN104881359A (en) Method for automatically generating test data realizing path covering through linear fitting
Gu et al. On a multi-objective evolutionary algorithm for optimizing end-to-end performance of scientific workflows in distributed environments
Kangarloo et al. JIT scheduling problem on flexible flow shop with machine break down, machine eligibility and setup times
Arbib et al. Sorting common operations to minimize the number of tardy jobs
EP4354355A1 (en) Multi-objective auto tuning for layer fusion and tensor tiling on multi-level cache hierarchy

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

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

CB03 Change of inventor or designer information