research article improved ant algorithms for software

10
Research Article Improved Ant Algorithms for Software Testing Cases Generation Shunkun Yang, Tianlong Man, and Jiaqi Xu School of Reliability and Systems Engineering, Beihang University, Beijing 100191, China Correspondence should be addressed to Shunkun Yang; [email protected] Received 3 April 2014; Accepted 14 April 2014; Published 5 May 2014 Academic Editor: Guiwu Wei Copyright © 2014 Shunkun Yang et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Existing ant colony optimization (ACO) for soſtware testing cases generation is a very popular domain in soſtware testing engineering. However, the traditional ACO has flaws, as early search pheromone is relatively scarce, search efficiency is low, search model is too simple, positive feedback mechanism is easy to porduce the phenomenon of stagnation and precocity. is paper introduces improved ACO for soſtware testing cases generation: improved local pheromone update strategy for ant colony optimization, improved pheromone volatilization coefficient for ant colony optimization (IPVACO), and improved the global path pheromone update strategy for ant colony optimization (IGPACO). At last, we put forward a comprehensive improved ant colony optimization (ACIACO), which is based on all the above three methods. e proposed technique will be compared with random algorithm (RND) and genetic algorithm (GA) in terms of both efficiency and coverage. e results indicate that the improved method can effectively improve the search efficiency, restrain precocity, promote case coverage, and reduce the number of iterations. 1. Introduction Soſtware testing is the implementation of the system and components and the behavior of observing and recording results under given conditions [1]. Test cases (TC) set plays an important role in the process of soſtware testing and determines the quality of soſtware directly. TC in soſtware testing is a data set, such as input data, execution paths, execution conditions, and testing requirements [2]. For a long time, the TC generation mainly relied on manpower, which means that soſtware testers need to have rich experience in soſtware testing. At the same time, it also leads to the fact that the actual engineering of TC generation work oſten has great blindness and some problems emerge, such as the huge TC number, high manpower cost, hardly ascend test case coverage, and so forth. erefore, how to automatically gen- erate TC scientifically and efficiently becomes the research focus of soſtware testing engineer. Over the years, many researchers in automatic TC generation field have carried out extensive and in-depth research and have got a lot of research results. In 1992, ant colony optimization is proposed by Dorigo et al. [3] in his Ph.D. degree thesis. e inspiration comes from the process of ant colony searching for food. Ant colony optimization is a kind of simulated evolution- ary algorithm; preliminary studies show that the algorithm has a good optimization performance. And it has many advantages, such as easy combination with other algorithms and strong robustness and adaptive self-organizing ability. In 2003, McMinn and Holcombe [4] introduced heuristic ant colony optimization into the soſtware test case generation technology for the first time. As the ant colony algorithm is being used widely gradually in the test case generation technology, many tools for soſtware testing based on ACO have been developed. Among them, PPTACO for optimal path generation [5], STTACO for test sequence generation [6], EPPTACO for path generation [7], and PCTDACO for test data generation [8] are the representative tools. Recently, Sharma et al. [9] developed another tool, ESCov, which is based on ACO generation state transition test sequence and achieves maximum coverage and minimum redundancy. Aſter that, Suri and Singhal [10] proposed ACO TCSP tool which is based on ACO algorithm to select TC and greatly reduces the number of cases to 62.5%. Not long aſter, Suri and Singhal [11] considered execution time constraints and accuracy, in the eight selected programs, and most of the TC numbers decreased by more than 80%. And some scholars apply ACO to many aspects of test data generation technol- ogy. Singh et al. [12] applied ACO on test case prioritization. Before long, Bauersfeld et al. [13] applied ACO to input queue Hindawi Publishing Corporation e Scientific World Journal Volume 2014, Article ID 392309, 9 pages http://dx.doi.org/10.1155/2014/392309

Upload: others

Post on 01-May-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article Improved Ant Algorithms for Software

Research ArticleImproved Ant Algorithms for Software Testing Cases Generation

Shunkun Yang Tianlong Man and Jiaqi Xu

School of Reliability and Systems Engineering Beihang University Beijing 100191 China

Correspondence should be addressed to Shunkun Yang yangshunkun163com

Received 3 April 2014 Accepted 14 April 2014 Published 5 May 2014

Academic Editor Guiwu Wei

Copyright copy 2014 Shunkun Yang et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Existing ant colony optimization (ACO) for software testing cases generation is a very popular domain in software testingengineering However the traditional ACO has flaws as early search pheromone is relatively scarce search efficiency is lowsearch model is too simple positive feedback mechanism is easy to porduce the phenomenon of stagnation and precocity Thispaper introduces improved ACO for software testing cases generation improved local pheromone update strategy for ant colonyoptimization improved pheromone volatilization coefficient for ant colony optimization (IPVACO) and improved the global pathpheromone update strategy for ant colony optimization (IGPACO) At last we put forward a comprehensive improved ant colonyoptimization (ACIACO) which is based on all the above three methods The proposed technique will be compared with randomalgorithm (RND) and genetic algorithm (GA) in terms of both efficiency and coverage The results indicate that the improvedmethod can effectively improve the search efficiency restrain precocity promote case coverage and reduce the number of iterations

1 Introduction

Software testing is the implementation of the system andcomponents and the behavior of observing and recordingresults under given conditions [1] Test cases (TC) set playsan important role in the process of software testing anddetermines the quality of software directly TC in softwaretesting is a data set such as input data execution pathsexecution conditions and testing requirements [2] For a longtime the TC generation mainly relied on manpower whichmeans that software testers need to have rich experience insoftware testing At the same time it also leads to the factthat the actual engineering of TC generation work often hasgreat blindness and some problems emerge such as the hugeTC number high manpower cost hardly ascend test casecoverage and so forth Therefore how to automatically gen-erate TC scientifically and efficiently becomes the researchfocus of software testing engineer Over the years manyresearchers in automatic TC generation field have carriedout extensive and in-depth research and have got a lot ofresearch results In 1992 ant colony optimization is proposedby Dorigo et al [3] in his PhD degree thesis The inspirationcomes from the process of ant colony searching for foodAnt colony optimization is a kind of simulated evolution-ary algorithm preliminary studies show that the algorithm

has a good optimization performance And it has manyadvantages such as easy combination with other algorithmsand strong robustness and adaptive self-organizing ability In2003 McMinn and Holcombe [4] introduced heuristic antcolony optimization into the software test case generationtechnology for the first time As the ant colony algorithmis being used widely gradually in the test case generationtechnology many tools for software testing based on ACOhave been developed Among them PPTACO for optimalpath generation [5] STTACO for test sequence generation[6] EPPTACO for path generation [7] and PCTDACO fortest data generation [8] are the representative tools RecentlySharma et al [9] developed another tool ESCov whichis based on ACO generation state transition test sequenceand achieves maximum coverage andminimum redundancyAfter that Suri and Singhal [10] proposed ACO TCSP toolwhich is based on ACO algorithm to select TC and greatlyreduces the number of cases to 625 Not long after Suriand Singhal [11] considered execution time constraints andaccuracy in the eight selected programs and most of the TCnumbers decreased by more than 80 And some scholarsapply ACO to many aspects of test data generation technol-ogy Singh et al [12] applied ACO on test case prioritizationBefore long Bauersfeld et al [13] applied ACO to input queue

Hindawi Publishing Corporatione Scientific World JournalVolume 2014 Article ID 392309 9 pageshttpdxdoiorg1011552014392309

2 The Scientific World Journal

of graphical user interface (GUI) generated automaticallyand applied dynamic feedback between the system undertest (SUT) and the search process Recently Srivastva et al[14] put forward a kind of nonrepeated state transformationmethod based on ACO algorithm this method reducesthe redundant state conversion and effectively covers thestatus of the transformation uncovered And Singh et al[15] compared a white box testing technology based onACO algorithmwith the existing black-box testing techniqueand came to the conclusion that path coverage based onACO algorithm is higher Now ant colony optimization hasa wide application in test case generation technology Butbecause of the insufficiency of the algorithm theory itselfit produces many problems as early search pheromone isrelatively scarce search efficiency is low search model istoo simple positive feedback mechanism is easy to producestagnation and precocity phenomenon In order to overcomethe shortage of the ant colony optimization in this paperwe put forward ILPACO IPVACO IGPACO and ACIACOand build ant colony research path model to improve thesearch efficiency restrain precocity promote case coverageand reduce the number of iterations

2 The Description of the Improved AntColony Optimization

Ant colony optimization has a good optimization effect onpath optimization especially traveling salesman problem(TSP) [16ndash18] In this paper we construct ant colony pathmodel to realize the software test case generation Usingthe path model presented in this paper because of a lackof closed loop feedback the simple ACO (SACO) will tendto move randomly We improve ant colony optimization torealize generation of higher coverage TC and prove thatthe improved algorithm is effective for test case generationIn Section 2 we will describe the four improved ACOalgorithms ILPACO IPVACO IGPACO and ACIACO

21 Improve Local Pheromone Update Strategy for Ant ColonyOptimization (ILPACO) SACO is an approach which uses asmall constant to update local pheromone Let 119896 be an integer1 le 119896 le 2119873 minus 1 We denote by V119896 path node of ant colonyand by 120591(V119896 V119896+1) pheromones from node V119896 to node V119896+1 Wedefine local volatilization coefficient 120572 and define the smallconstant to update local pheromone 1205910 Based on these theupdate process of 120591(V119896 V119896+1) is defined as follows

120591 (V119896 V119896+1) larr997888 (1 minus 120572) 120591 (V119896 V119896+1) + 1205721205910 (1)

In Section 21 we present an improved local pheromoneupdate strategy for ant colony optimization (ILPACO) Usingthe method of program instrumentation we get the coverageto update local pheromone instead of the small constant 1205910[19] Because the value of the coverage will be smaller thanone it is necessary for us to select a proportionality coefficient1198961015840 to multiply by the coverage to fit with a wider range of

applications So local pheromone update variable 1205911015840 is defined

Table 1 The value of 120582 corresponding to different119873

119873 = 1 120582 = 1003

119873 = 16 120582 = 1045

119873 = 32 120582 = 1054

119873 = 80 120582 = 1065

as 1205911015840 = 1198961015840 sdot coverage Based on these the update process of120591(V119896 V119896+1) is defined as follows

120591 (V119896 V119896+1) larr997888 (1 minus 120572) 120591 (V119896 V119896+1) + 1205721205911015840 (2)

The coverage presented can be any kind of coverage Inthis paper we select three commonly used kinds of coveragestatement coverage (SC) branch coverage (BC) andmodifiedconditiondecision coverage (MCDC) [20]

22 Improved Pheromone Volatilization Coefficient for AntColony Optimization (IPVACO) In this section we describeIPVACO algorithm For smaller volatilization coefficient 120572the pheromone volatilization is slower the optimal path willbe restrained In contrast for the larger volatile coefficientbut not too large pheromone evaporates quickly and theeffect of the optimal path is strengthened Larger 120572makes theprevious experience to be ignored easily and tend to searchmore by recent experience In the SACO algorithm 120572 is fixedIn this paper we put forward the adaptive 120572 beginning witha small value tendency to search and the late tendency todevelop with larger values At the same time this improvedmethod still uses coverage to update local pheromone

Let 120572(0) be initial volatile coefficient and let 120582 be aconstant value We denote by 119905 iteration and 120572(119905) volatilecoefficient of the number 119905 iteration Consider the following

120572 (119905 + 1) = 120582120572 (119905) (3)

We need to determine right range of 120582 Based on theformula (3) it is easy to deduce formula 120572(119905) = 120582119905minus1120572(1) andtotal volatile pheromone of one route is 120572(1) sdot (1minus120582119905)(1minus120582)The value of desired pheromone of one route is 119905 sdot119890 sdot1198734 and 119890is the value of desired pheromone in one generation Becausemost of antsrsquo coverage ranges from 025 to 035 we can selecta value range from 025 to 035 And119873 is the number of antsthat update pheromone In this paper we select 1 16 32 and80 as119873The initial pheromone value of each route is taken as01 Let 120572(1) = 005 In Figure 1 line 1 shows the total desiredamount of pheromone in one route when 119890 is equal to 025line 2 shows the total desired amount of pheromone in oneroutewhen 119890 is equal to 035 and line 3 the exponential curvedepicts the amount of pheromone volatilizationwith differentvalue of 120582 Because the pheromone volatilization should beless than the total amount of the path pheromone accordingto Figure 1 we get Table 1

Because we select the value of 120582 in a range we are not surewhether the value satisfies the condition that the pheromonevolatilization should be less than the total amount of the pathpheromone So it is necessary for us to verify if the value isappropriate we draw Figure 2 to verify the value It is thesame that line 1 shows the total desired amount of pheromone

The Scientific World Journal 3

1 1005 101 10155

6

7

8

9

10

11

12

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 1

104 1045 105 105560

80

100

120

140

160

180

200

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 16

105 1055 106 1065100

150

200

250

300

350

400

450

Pher

omon

e

Line 1

Line 2Line 3

120582

N = 32

106 1065 107 1075200

300

400

500

600

700

800

900

1000

Pher

omon

eLine 2

Line 3Line 1

120582

N = 80

Figure 1 Pheromone volatilization and accumulated certain 120582

in one route when 119890 is equal to 025 line 2 shows the totaldesired amount of pheromone in one route when 119890 is equal to035 and line 3 the exponential curve depicts the amount ofpheromone volatilizationwith increasing generation number

In Figure 2 we see that line 1 is higher than line 3 whichmeans that amount of the path pheromone is always morethan the pheromone volatilization So we verify that thevalues in Table 1 are appropriate

23 Improve the Global Path Pheromone Update Strategy forAnt Colony Optimization (IGPACO) SACO algorithm usesall the ants to update pheromone In Section 23 we describeIGPACO algorithm which is based on ILPACO algorithmWe use the coverage to update local pheromone at thesame time and only the best ant can update the amount ofpheromone in each iteration rather than all the ants [21]Performance of ant colony optimization as a swarm intelli-gence algorithm depends on the individual ants and overallsynergy effect [22] According to pheromone concentrationdistribution ants choose routes That makes the convergencespeed slow Besides there are certain possibilities that antcolony fall into local optimal solution prematurely We putforward the approach that the optimal ant update pheromonecan reduce the branch paths effectively whose coverage islow make ants avoid unnecessary paths and improve the

convergence speed Figure 3 shows the process of selectingthe best ant from119873 ants Consider the following

120591 (V119896 V119896+1) larr997888

(1 minus 120572) 120591 (V119896 V119896+1) + 12057212059110158401015840

if AntI is Best Ant (1 le 119868 le 119873)(1 minus 120572) 120591 (V119896 V119896+1) else

(4)

24 Comprehensive Improved Ant Colony Optimization (ACI-ACO) Comprehensive approach combines together meth-ods represented above comprehensively to improve simpleant colony algorithm The methods represented concludeILPACO IPVACO and IGPACO ILPACO as it shows in(2) can strengthen the ant colony path with high coverageAnd the higher coverage the path has the greater the pathrsquospheromone is which makes routes have a good gradationwith each other [23] IPVACO as it shows in (3) improvesvolatile coefficient increases gradually with the increase ofnumber Beginning with a small value tend to search and thelate tend to develop with larger values IGPACO selects thebest ant update path pheromone in each iteration to searchfor a more optimal path and improve the convergence speedFigure 4 shows the flowchart of ACIACO and the green partsare the parts improved by the optimization algorithms

4 The Scientific World Journal

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

8

9

t

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1003

t

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1045

t

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

200

250

300

Pher

omon

e

Line 3

Line 1

Line 2

120582 = 1054

t

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1065

Figure 2 Pheromone lines with different 120582

BestAnt

Ant1 Ant2 Ant3 AntN

Figure 3 Best ant selection

3 The Construction of the TC-Oriented AntColony Path Model

In this work we establish an effective ant colony optimizationpath We utilize this path model to achieve effective iterationAnd we explain the transformation relationship between antcolony paths and test casesThe establishment of transforma-tion relationship makes effective use of ant colony algorithmfor iterative optimization of software test cases

31 The Transformation Relationship between Ant ColonyPaths and Test Cases As shown in Figure 5 we define antpath directed graph by 119866 = (119881 119864) [24] We describe nodeset with 119881 = V1 V2 V3 V2119873 and directed edge set with119864 = 1198901 1198902 1198903 1198904119873 We build the path model with

1198901 = (V1 V2) 1198902 = (V1 V119873+2) 1198903 = (V119873+1 V2) and 1198904 =(V119873+1 V119873+2) 1198904119873 = (V2119873 V119873+1) Ant colony optimizationpath is an119873 layer structure each layer has two nodes a totalof 2119873 nodes There are four paths between every adjacenttwo layers a total of 4119873 paths Set value in 1 sim 119873 nodesto 0 and value in 119873 + 1 sim 2119873 nodes to 1 Antsrsquo everymovement can only choose one node in each layer Accordingto the pheromone ants follow the arrow direction to moveto the next layer and complete the movement of the 119873 layerstructure Then ants move back to the first layer of the pathand begin movement of the next generation until the end ofthe iterations According to the route of the last generation ofants which equals to the number the 119873 bit binary numberThrough the antispoofing we get the test case

As shown in Figure 6 we give a simple example to explainthe relationship between the path and test caseThe undertestprogram is the triangle determination program the dataof test case are three lines of triangle 119886 119887 and 119888 We cutthe 119873 bit binary number into three 1198733 parts the firstpart corresponding with 119886 the second part correspondingwith 119887 and the third part corresponding with 119888 Generallywe can change the value of 119873 and the value of nodes tosatisfy different-type and different-interval test casesThe lastgeneration of ants is the eventually generated test cases and

The Scientific World Journal 5

The number i TC

Coverage update partial

pheromone

Yes

Yes

Best ant to update

pheromone

No

No

Ants move according to pheromone

The ants are assigned to starting point randomly

Each path pheromoneinitialization iteration

number N set to 0

Get the coverage (SC BC MCDC) of TC

Convert the TC to a binary number

determine paths ant colony passed

N lt 100

Ants move from the firstlayer to the last

And generate a TC Let i = 0

i le number of TC

Output the test cases

Enter the next iteration

Set volatile coefficient to1003 lowast generation

i++

N++

Figure 4 The flowchart of ACIACO

the ant number is equal to the number of test cases at lastgeneration

32 Ants Movement Rules In Section 32 we explain the antmovement rules Firstly we take a small constant to initializeant colony path pheromone According to (1) ants in thecurrent node V1015840

119895= V119896(1 le 119896 le 2119873) can only move to one

of two nodes in the next layer V1015840119895+1

We define 120591(V119896 V119896+1)pheromone of the directed line 119890(V119896 V119896+1) 119902 is a randomnumber from the range [0 1]

If 1 le 119896 le 119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(5)

If 1 + 119873 le 119896 le 2119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(6)

If 119896 = 119873 or 119896 = 2119873

V1015840119895+1=

V1 119902 le120591 (V119896 V1)

(120591 (V119896 V1) + 120591 (V119896 V119873+1))V1+119873 else

(7)

4 Experimental Analysis

In this section we present the result of the four proposedapproaches C++ language is used for experiment program-ming Classic triangle classification (CTCP) and the collisionavoidance system (TCAS) are selected as two undertestprograms Because CTCP and TCAS have characteristics ofmany branches and determines they are suited as undertestprograms for software test case generation In Section 41we introduce the experiment process of CTCP And inSection 42 we introduce the experiment process of TCASIn two experiments we compare data by seven approachesincluding RND GA SACO ILPACO IPVACO IGPACOand ACIACO We use the statement coverage branch cov-erage and modified conditiondecision coverage (MCDC)

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 2: Research Article Improved Ant Algorithms for Software

2 The Scientific World Journal

of graphical user interface (GUI) generated automaticallyand applied dynamic feedback between the system undertest (SUT) and the search process Recently Srivastva et al[14] put forward a kind of nonrepeated state transformationmethod based on ACO algorithm this method reducesthe redundant state conversion and effectively covers thestatus of the transformation uncovered And Singh et al[15] compared a white box testing technology based onACO algorithmwith the existing black-box testing techniqueand came to the conclusion that path coverage based onACO algorithm is higher Now ant colony optimization hasa wide application in test case generation technology Butbecause of the insufficiency of the algorithm theory itselfit produces many problems as early search pheromone isrelatively scarce search efficiency is low search model istoo simple positive feedback mechanism is easy to producestagnation and precocity phenomenon In order to overcomethe shortage of the ant colony optimization in this paperwe put forward ILPACO IPVACO IGPACO and ACIACOand build ant colony research path model to improve thesearch efficiency restrain precocity promote case coverageand reduce the number of iterations

2 The Description of the Improved AntColony Optimization

Ant colony optimization has a good optimization effect onpath optimization especially traveling salesman problem(TSP) [16ndash18] In this paper we construct ant colony pathmodel to realize the software test case generation Usingthe path model presented in this paper because of a lackof closed loop feedback the simple ACO (SACO) will tendto move randomly We improve ant colony optimization torealize generation of higher coverage TC and prove thatthe improved algorithm is effective for test case generationIn Section 2 we will describe the four improved ACOalgorithms ILPACO IPVACO IGPACO and ACIACO

21 Improve Local Pheromone Update Strategy for Ant ColonyOptimization (ILPACO) SACO is an approach which uses asmall constant to update local pheromone Let 119896 be an integer1 le 119896 le 2119873 minus 1 We denote by V119896 path node of ant colonyand by 120591(V119896 V119896+1) pheromones from node V119896 to node V119896+1 Wedefine local volatilization coefficient 120572 and define the smallconstant to update local pheromone 1205910 Based on these theupdate process of 120591(V119896 V119896+1) is defined as follows

120591 (V119896 V119896+1) larr997888 (1 minus 120572) 120591 (V119896 V119896+1) + 1205721205910 (1)

In Section 21 we present an improved local pheromoneupdate strategy for ant colony optimization (ILPACO) Usingthe method of program instrumentation we get the coverageto update local pheromone instead of the small constant 1205910[19] Because the value of the coverage will be smaller thanone it is necessary for us to select a proportionality coefficient1198961015840 to multiply by the coverage to fit with a wider range of

applications So local pheromone update variable 1205911015840 is defined

Table 1 The value of 120582 corresponding to different119873

119873 = 1 120582 = 1003

119873 = 16 120582 = 1045

119873 = 32 120582 = 1054

119873 = 80 120582 = 1065

as 1205911015840 = 1198961015840 sdot coverage Based on these the update process of120591(V119896 V119896+1) is defined as follows

120591 (V119896 V119896+1) larr997888 (1 minus 120572) 120591 (V119896 V119896+1) + 1205721205911015840 (2)

The coverage presented can be any kind of coverage Inthis paper we select three commonly used kinds of coveragestatement coverage (SC) branch coverage (BC) andmodifiedconditiondecision coverage (MCDC) [20]

22 Improved Pheromone Volatilization Coefficient for AntColony Optimization (IPVACO) In this section we describeIPVACO algorithm For smaller volatilization coefficient 120572the pheromone volatilization is slower the optimal path willbe restrained In contrast for the larger volatile coefficientbut not too large pheromone evaporates quickly and theeffect of the optimal path is strengthened Larger 120572makes theprevious experience to be ignored easily and tend to searchmore by recent experience In the SACO algorithm 120572 is fixedIn this paper we put forward the adaptive 120572 beginning witha small value tendency to search and the late tendency todevelop with larger values At the same time this improvedmethod still uses coverage to update local pheromone

Let 120572(0) be initial volatile coefficient and let 120582 be aconstant value We denote by 119905 iteration and 120572(119905) volatilecoefficient of the number 119905 iteration Consider the following

120572 (119905 + 1) = 120582120572 (119905) (3)

We need to determine right range of 120582 Based on theformula (3) it is easy to deduce formula 120572(119905) = 120582119905minus1120572(1) andtotal volatile pheromone of one route is 120572(1) sdot (1minus120582119905)(1minus120582)The value of desired pheromone of one route is 119905 sdot119890 sdot1198734 and 119890is the value of desired pheromone in one generation Becausemost of antsrsquo coverage ranges from 025 to 035 we can selecta value range from 025 to 035 And119873 is the number of antsthat update pheromone In this paper we select 1 16 32 and80 as119873The initial pheromone value of each route is taken as01 Let 120572(1) = 005 In Figure 1 line 1 shows the total desiredamount of pheromone in one route when 119890 is equal to 025line 2 shows the total desired amount of pheromone in oneroutewhen 119890 is equal to 035 and line 3 the exponential curvedepicts the amount of pheromone volatilizationwith differentvalue of 120582 Because the pheromone volatilization should beless than the total amount of the path pheromone accordingto Figure 1 we get Table 1

Because we select the value of 120582 in a range we are not surewhether the value satisfies the condition that the pheromonevolatilization should be less than the total amount of the pathpheromone So it is necessary for us to verify if the value isappropriate we draw Figure 2 to verify the value It is thesame that line 1 shows the total desired amount of pheromone

The Scientific World Journal 3

1 1005 101 10155

6

7

8

9

10

11

12

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 1

104 1045 105 105560

80

100

120

140

160

180

200

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 16

105 1055 106 1065100

150

200

250

300

350

400

450

Pher

omon

e

Line 1

Line 2Line 3

120582

N = 32

106 1065 107 1075200

300

400

500

600

700

800

900

1000

Pher

omon

eLine 2

Line 3Line 1

120582

N = 80

Figure 1 Pheromone volatilization and accumulated certain 120582

in one route when 119890 is equal to 025 line 2 shows the totaldesired amount of pheromone in one route when 119890 is equal to035 and line 3 the exponential curve depicts the amount ofpheromone volatilizationwith increasing generation number

In Figure 2 we see that line 1 is higher than line 3 whichmeans that amount of the path pheromone is always morethan the pheromone volatilization So we verify that thevalues in Table 1 are appropriate

23 Improve the Global Path Pheromone Update Strategy forAnt Colony Optimization (IGPACO) SACO algorithm usesall the ants to update pheromone In Section 23 we describeIGPACO algorithm which is based on ILPACO algorithmWe use the coverage to update local pheromone at thesame time and only the best ant can update the amount ofpheromone in each iteration rather than all the ants [21]Performance of ant colony optimization as a swarm intelli-gence algorithm depends on the individual ants and overallsynergy effect [22] According to pheromone concentrationdistribution ants choose routes That makes the convergencespeed slow Besides there are certain possibilities that antcolony fall into local optimal solution prematurely We putforward the approach that the optimal ant update pheromonecan reduce the branch paths effectively whose coverage islow make ants avoid unnecessary paths and improve the

convergence speed Figure 3 shows the process of selectingthe best ant from119873 ants Consider the following

120591 (V119896 V119896+1) larr997888

(1 minus 120572) 120591 (V119896 V119896+1) + 12057212059110158401015840

if AntI is Best Ant (1 le 119868 le 119873)(1 minus 120572) 120591 (V119896 V119896+1) else

(4)

24 Comprehensive Improved Ant Colony Optimization (ACI-ACO) Comprehensive approach combines together meth-ods represented above comprehensively to improve simpleant colony algorithm The methods represented concludeILPACO IPVACO and IGPACO ILPACO as it shows in(2) can strengthen the ant colony path with high coverageAnd the higher coverage the path has the greater the pathrsquospheromone is which makes routes have a good gradationwith each other [23] IPVACO as it shows in (3) improvesvolatile coefficient increases gradually with the increase ofnumber Beginning with a small value tend to search and thelate tend to develop with larger values IGPACO selects thebest ant update path pheromone in each iteration to searchfor a more optimal path and improve the convergence speedFigure 4 shows the flowchart of ACIACO and the green partsare the parts improved by the optimization algorithms

4 The Scientific World Journal

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

8

9

t

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1003

t

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1045

t

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

200

250

300

Pher

omon

e

Line 3

Line 1

Line 2

120582 = 1054

t

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1065

Figure 2 Pheromone lines with different 120582

BestAnt

Ant1 Ant2 Ant3 AntN

Figure 3 Best ant selection

3 The Construction of the TC-Oriented AntColony Path Model

In this work we establish an effective ant colony optimizationpath We utilize this path model to achieve effective iterationAnd we explain the transformation relationship between antcolony paths and test casesThe establishment of transforma-tion relationship makes effective use of ant colony algorithmfor iterative optimization of software test cases

31 The Transformation Relationship between Ant ColonyPaths and Test Cases As shown in Figure 5 we define antpath directed graph by 119866 = (119881 119864) [24] We describe nodeset with 119881 = V1 V2 V3 V2119873 and directed edge set with119864 = 1198901 1198902 1198903 1198904119873 We build the path model with

1198901 = (V1 V2) 1198902 = (V1 V119873+2) 1198903 = (V119873+1 V2) and 1198904 =(V119873+1 V119873+2) 1198904119873 = (V2119873 V119873+1) Ant colony optimizationpath is an119873 layer structure each layer has two nodes a totalof 2119873 nodes There are four paths between every adjacenttwo layers a total of 4119873 paths Set value in 1 sim 119873 nodesto 0 and value in 119873 + 1 sim 2119873 nodes to 1 Antsrsquo everymovement can only choose one node in each layer Accordingto the pheromone ants follow the arrow direction to moveto the next layer and complete the movement of the 119873 layerstructure Then ants move back to the first layer of the pathand begin movement of the next generation until the end ofthe iterations According to the route of the last generation ofants which equals to the number the 119873 bit binary numberThrough the antispoofing we get the test case

As shown in Figure 6 we give a simple example to explainthe relationship between the path and test caseThe undertestprogram is the triangle determination program the dataof test case are three lines of triangle 119886 119887 and 119888 We cutthe 119873 bit binary number into three 1198733 parts the firstpart corresponding with 119886 the second part correspondingwith 119887 and the third part corresponding with 119888 Generallywe can change the value of 119873 and the value of nodes tosatisfy different-type and different-interval test casesThe lastgeneration of ants is the eventually generated test cases and

The Scientific World Journal 5

The number i TC

Coverage update partial

pheromone

Yes

Yes

Best ant to update

pheromone

No

No

Ants move according to pheromone

The ants are assigned to starting point randomly

Each path pheromoneinitialization iteration

number N set to 0

Get the coverage (SC BC MCDC) of TC

Convert the TC to a binary number

determine paths ant colony passed

N lt 100

Ants move from the firstlayer to the last

And generate a TC Let i = 0

i le number of TC

Output the test cases

Enter the next iteration

Set volatile coefficient to1003 lowast generation

i++

N++

Figure 4 The flowchart of ACIACO

the ant number is equal to the number of test cases at lastgeneration

32 Ants Movement Rules In Section 32 we explain the antmovement rules Firstly we take a small constant to initializeant colony path pheromone According to (1) ants in thecurrent node V1015840

119895= V119896(1 le 119896 le 2119873) can only move to one

of two nodes in the next layer V1015840119895+1

We define 120591(V119896 V119896+1)pheromone of the directed line 119890(V119896 V119896+1) 119902 is a randomnumber from the range [0 1]

If 1 le 119896 le 119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(5)

If 1 + 119873 le 119896 le 2119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(6)

If 119896 = 119873 or 119896 = 2119873

V1015840119895+1=

V1 119902 le120591 (V119896 V1)

(120591 (V119896 V1) + 120591 (V119896 V119873+1))V1+119873 else

(7)

4 Experimental Analysis

In this section we present the result of the four proposedapproaches C++ language is used for experiment program-ming Classic triangle classification (CTCP) and the collisionavoidance system (TCAS) are selected as two undertestprograms Because CTCP and TCAS have characteristics ofmany branches and determines they are suited as undertestprograms for software test case generation In Section 41we introduce the experiment process of CTCP And inSection 42 we introduce the experiment process of TCASIn two experiments we compare data by seven approachesincluding RND GA SACO ILPACO IPVACO IGPACOand ACIACO We use the statement coverage branch cov-erage and modified conditiondecision coverage (MCDC)

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 3: Research Article Improved Ant Algorithms for Software

The Scientific World Journal 3

1 1005 101 10155

6

7

8

9

10

11

12

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 1

104 1045 105 105560

80

100

120

140

160

180

200

Pher

omon

e

Line 1

Line 2

Line 3

120582

N = 16

105 1055 106 1065100

150

200

250

300

350

400

450

Pher

omon

e

Line 1

Line 2Line 3

120582

N = 32

106 1065 107 1075200

300

400

500

600

700

800

900

1000

Pher

omon

eLine 2

Line 3Line 1

120582

N = 80

Figure 1 Pheromone volatilization and accumulated certain 120582

in one route when 119890 is equal to 025 line 2 shows the totaldesired amount of pheromone in one route when 119890 is equal to035 and line 3 the exponential curve depicts the amount ofpheromone volatilizationwith increasing generation number

In Figure 2 we see that line 1 is higher than line 3 whichmeans that amount of the path pheromone is always morethan the pheromone volatilization So we verify that thevalues in Table 1 are appropriate

23 Improve the Global Path Pheromone Update Strategy forAnt Colony Optimization (IGPACO) SACO algorithm usesall the ants to update pheromone In Section 23 we describeIGPACO algorithm which is based on ILPACO algorithmWe use the coverage to update local pheromone at thesame time and only the best ant can update the amount ofpheromone in each iteration rather than all the ants [21]Performance of ant colony optimization as a swarm intelli-gence algorithm depends on the individual ants and overallsynergy effect [22] According to pheromone concentrationdistribution ants choose routes That makes the convergencespeed slow Besides there are certain possibilities that antcolony fall into local optimal solution prematurely We putforward the approach that the optimal ant update pheromonecan reduce the branch paths effectively whose coverage islow make ants avoid unnecessary paths and improve the

convergence speed Figure 3 shows the process of selectingthe best ant from119873 ants Consider the following

120591 (V119896 V119896+1) larr997888

(1 minus 120572) 120591 (V119896 V119896+1) + 12057212059110158401015840

if AntI is Best Ant (1 le 119868 le 119873)(1 minus 120572) 120591 (V119896 V119896+1) else

(4)

24 Comprehensive Improved Ant Colony Optimization (ACI-ACO) Comprehensive approach combines together meth-ods represented above comprehensively to improve simpleant colony algorithm The methods represented concludeILPACO IPVACO and IGPACO ILPACO as it shows in(2) can strengthen the ant colony path with high coverageAnd the higher coverage the path has the greater the pathrsquospheromone is which makes routes have a good gradationwith each other [23] IPVACO as it shows in (3) improvesvolatile coefficient increases gradually with the increase ofnumber Beginning with a small value tend to search and thelate tend to develop with larger values IGPACO selects thebest ant update path pheromone in each iteration to searchfor a more optimal path and improve the convergence speedFigure 4 shows the flowchart of ACIACO and the green partsare the parts improved by the optimization algorithms

4 The Scientific World Journal

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

8

9

t

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1003

t

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1045

t

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

200

250

300

Pher

omon

e

Line 3

Line 1

Line 2

120582 = 1054

t

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1065

Figure 2 Pheromone lines with different 120582

BestAnt

Ant1 Ant2 Ant3 AntN

Figure 3 Best ant selection

3 The Construction of the TC-Oriented AntColony Path Model

In this work we establish an effective ant colony optimizationpath We utilize this path model to achieve effective iterationAnd we explain the transformation relationship between antcolony paths and test casesThe establishment of transforma-tion relationship makes effective use of ant colony algorithmfor iterative optimization of software test cases

31 The Transformation Relationship between Ant ColonyPaths and Test Cases As shown in Figure 5 we define antpath directed graph by 119866 = (119881 119864) [24] We describe nodeset with 119881 = V1 V2 V3 V2119873 and directed edge set with119864 = 1198901 1198902 1198903 1198904119873 We build the path model with

1198901 = (V1 V2) 1198902 = (V1 V119873+2) 1198903 = (V119873+1 V2) and 1198904 =(V119873+1 V119873+2) 1198904119873 = (V2119873 V119873+1) Ant colony optimizationpath is an119873 layer structure each layer has two nodes a totalof 2119873 nodes There are four paths between every adjacenttwo layers a total of 4119873 paths Set value in 1 sim 119873 nodesto 0 and value in 119873 + 1 sim 2119873 nodes to 1 Antsrsquo everymovement can only choose one node in each layer Accordingto the pheromone ants follow the arrow direction to moveto the next layer and complete the movement of the 119873 layerstructure Then ants move back to the first layer of the pathand begin movement of the next generation until the end ofthe iterations According to the route of the last generation ofants which equals to the number the 119873 bit binary numberThrough the antispoofing we get the test case

As shown in Figure 6 we give a simple example to explainthe relationship between the path and test caseThe undertestprogram is the triangle determination program the dataof test case are three lines of triangle 119886 119887 and 119888 We cutthe 119873 bit binary number into three 1198733 parts the firstpart corresponding with 119886 the second part correspondingwith 119887 and the third part corresponding with 119888 Generallywe can change the value of 119873 and the value of nodes tosatisfy different-type and different-interval test casesThe lastgeneration of ants is the eventually generated test cases and

The Scientific World Journal 5

The number i TC

Coverage update partial

pheromone

Yes

Yes

Best ant to update

pheromone

No

No

Ants move according to pheromone

The ants are assigned to starting point randomly

Each path pheromoneinitialization iteration

number N set to 0

Get the coverage (SC BC MCDC) of TC

Convert the TC to a binary number

determine paths ant colony passed

N lt 100

Ants move from the firstlayer to the last

And generate a TC Let i = 0

i le number of TC

Output the test cases

Enter the next iteration

Set volatile coefficient to1003 lowast generation

i++

N++

Figure 4 The flowchart of ACIACO

the ant number is equal to the number of test cases at lastgeneration

32 Ants Movement Rules In Section 32 we explain the antmovement rules Firstly we take a small constant to initializeant colony path pheromone According to (1) ants in thecurrent node V1015840

119895= V119896(1 le 119896 le 2119873) can only move to one

of two nodes in the next layer V1015840119895+1

We define 120591(V119896 V119896+1)pheromone of the directed line 119890(V119896 V119896+1) 119902 is a randomnumber from the range [0 1]

If 1 le 119896 le 119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(5)

If 1 + 119873 le 119896 le 2119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(6)

If 119896 = 119873 or 119896 = 2119873

V1015840119895+1=

V1 119902 le120591 (V119896 V1)

(120591 (V119896 V1) + 120591 (V119896 V119873+1))V1+119873 else

(7)

4 Experimental Analysis

In this section we present the result of the four proposedapproaches C++ language is used for experiment program-ming Classic triangle classification (CTCP) and the collisionavoidance system (TCAS) are selected as two undertestprograms Because CTCP and TCAS have characteristics ofmany branches and determines they are suited as undertestprograms for software test case generation In Section 41we introduce the experiment process of CTCP And inSection 42 we introduce the experiment process of TCASIn two experiments we compare data by seven approachesincluding RND GA SACO ILPACO IPVACO IGPACOand ACIACO We use the statement coverage branch cov-erage and modified conditiondecision coverage (MCDC)

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 4: Research Article Improved Ant Algorithms for Software

4 The Scientific World Journal

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

8

9

t

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1003

t

0 10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1045

t

0 10 20 30 40 50 60 70 80 90 1000

50

100

150

200

250

300

Pher

omon

e

Line 3

Line 1

Line 2

120582 = 1054

t

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

Pher

omon

e

Line 2

Line 1

Line 3

120582 = 1065

Figure 2 Pheromone lines with different 120582

BestAnt

Ant1 Ant2 Ant3 AntN

Figure 3 Best ant selection

3 The Construction of the TC-Oriented AntColony Path Model

In this work we establish an effective ant colony optimizationpath We utilize this path model to achieve effective iterationAnd we explain the transformation relationship between antcolony paths and test casesThe establishment of transforma-tion relationship makes effective use of ant colony algorithmfor iterative optimization of software test cases

31 The Transformation Relationship between Ant ColonyPaths and Test Cases As shown in Figure 5 we define antpath directed graph by 119866 = (119881 119864) [24] We describe nodeset with 119881 = V1 V2 V3 V2119873 and directed edge set with119864 = 1198901 1198902 1198903 1198904119873 We build the path model with

1198901 = (V1 V2) 1198902 = (V1 V119873+2) 1198903 = (V119873+1 V2) and 1198904 =(V119873+1 V119873+2) 1198904119873 = (V2119873 V119873+1) Ant colony optimizationpath is an119873 layer structure each layer has two nodes a totalof 2119873 nodes There are four paths between every adjacenttwo layers a total of 4119873 paths Set value in 1 sim 119873 nodesto 0 and value in 119873 + 1 sim 2119873 nodes to 1 Antsrsquo everymovement can only choose one node in each layer Accordingto the pheromone ants follow the arrow direction to moveto the next layer and complete the movement of the 119873 layerstructure Then ants move back to the first layer of the pathand begin movement of the next generation until the end ofthe iterations According to the route of the last generation ofants which equals to the number the 119873 bit binary numberThrough the antispoofing we get the test case

As shown in Figure 6 we give a simple example to explainthe relationship between the path and test caseThe undertestprogram is the triangle determination program the dataof test case are three lines of triangle 119886 119887 and 119888 We cutthe 119873 bit binary number into three 1198733 parts the firstpart corresponding with 119886 the second part correspondingwith 119887 and the third part corresponding with 119888 Generallywe can change the value of 119873 and the value of nodes tosatisfy different-type and different-interval test casesThe lastgeneration of ants is the eventually generated test cases and

The Scientific World Journal 5

The number i TC

Coverage update partial

pheromone

Yes

Yes

Best ant to update

pheromone

No

No

Ants move according to pheromone

The ants are assigned to starting point randomly

Each path pheromoneinitialization iteration

number N set to 0

Get the coverage (SC BC MCDC) of TC

Convert the TC to a binary number

determine paths ant colony passed

N lt 100

Ants move from the firstlayer to the last

And generate a TC Let i = 0

i le number of TC

Output the test cases

Enter the next iteration

Set volatile coefficient to1003 lowast generation

i++

N++

Figure 4 The flowchart of ACIACO

the ant number is equal to the number of test cases at lastgeneration

32 Ants Movement Rules In Section 32 we explain the antmovement rules Firstly we take a small constant to initializeant colony path pheromone According to (1) ants in thecurrent node V1015840

119895= V119896(1 le 119896 le 2119873) can only move to one

of two nodes in the next layer V1015840119895+1

We define 120591(V119896 V119896+1)pheromone of the directed line 119890(V119896 V119896+1) 119902 is a randomnumber from the range [0 1]

If 1 le 119896 le 119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(5)

If 1 + 119873 le 119896 le 2119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(6)

If 119896 = 119873 or 119896 = 2119873

V1015840119895+1=

V1 119902 le120591 (V119896 V1)

(120591 (V119896 V1) + 120591 (V119896 V119873+1))V1+119873 else

(7)

4 Experimental Analysis

In this section we present the result of the four proposedapproaches C++ language is used for experiment program-ming Classic triangle classification (CTCP) and the collisionavoidance system (TCAS) are selected as two undertestprograms Because CTCP and TCAS have characteristics ofmany branches and determines they are suited as undertestprograms for software test case generation In Section 41we introduce the experiment process of CTCP And inSection 42 we introduce the experiment process of TCASIn two experiments we compare data by seven approachesincluding RND GA SACO ILPACO IPVACO IGPACOand ACIACO We use the statement coverage branch cov-erage and modified conditiondecision coverage (MCDC)

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 5: Research Article Improved Ant Algorithms for Software

The Scientific World Journal 5

The number i TC

Coverage update partial

pheromone

Yes

Yes

Best ant to update

pheromone

No

No

Ants move according to pheromone

The ants are assigned to starting point randomly

Each path pheromoneinitialization iteration

number N set to 0

Get the coverage (SC BC MCDC) of TC

Convert the TC to a binary number

determine paths ant colony passed

N lt 100

Ants move from the firstlayer to the last

And generate a TC Let i = 0

i le number of TC

Output the test cases

Enter the next iteration

Set volatile coefficient to1003 lowast generation

i++

N++

Figure 4 The flowchart of ACIACO

the ant number is equal to the number of test cases at lastgeneration

32 Ants Movement Rules In Section 32 we explain the antmovement rules Firstly we take a small constant to initializeant colony path pheromone According to (1) ants in thecurrent node V1015840

119895= V119896(1 le 119896 le 2119873) can only move to one

of two nodes in the next layer V1015840119895+1

We define 120591(V119896 V119896+1)pheromone of the directed line 119890(V119896 V119896+1) 119902 is a randomnumber from the range [0 1]

If 1 le 119896 le 119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(5)

If 1 + 119873 le 119896 le 2119873 minus 1

V1015840119895+1=

V119896+1 119902 le120591 (V119896 V119896+1)

(120591 (V119896 V119896+1) + 120591 (V119896 V119896+1+119873))V119896+1+119873 else

(6)

If 119896 = 119873 or 119896 = 2119873

V1015840119895+1=

V1 119902 le120591 (V119896 V1)

(120591 (V119896 V1) + 120591 (V119896 V119873+1))V1+119873 else

(7)

4 Experimental Analysis

In this section we present the result of the four proposedapproaches C++ language is used for experiment program-ming Classic triangle classification (CTCP) and the collisionavoidance system (TCAS) are selected as two undertestprograms Because CTCP and TCAS have characteristics ofmany branches and determines they are suited as undertestprograms for software test case generation In Section 41we introduce the experiment process of CTCP And inSection 42 we introduce the experiment process of TCASIn two experiments we compare data by seven approachesincluding RND GA SACO ILPACO IPVACO IGPACOand ACIACO We use the statement coverage branch cov-erage and modified conditiondecision coverage (MCDC)

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 6: Research Article Improved Ant Algorithms for Software

6 The Scientific World Journal

Table 2 Coverage of CTCP by seven approaches

Statement coverage Branch coverage MCDCRND 6225 4737 1190GA 9245 7784 2276SACO 6178 4958 1403ILPACO 6798 5484 2290IPVACO 8828 7569 2288IGPACO 9034 7549 2345ACIACO 10000 8883 4634

V1

V2

VN

VN+1

VN+2

V2N

Figure 5 Ant colony path model

three kinds of coverage as quality standard of test cases Inorder to avoid the contingency we select average coverageand averageminimumgeneration of all test inputs in 100 runsas the experimental data [25] In Section 43 we conclude andanalyze the efficiency of all improved approaches

41 Classic Triangle Classification Experiment The lines ofclassic triangle classification program are 119 Cyclomaticcomplexity is 19 In GA we determine the GA parameters(maximum number of generations (MaxGens) populationsize (PopSize) crossover probability (XP)mutation probabil-ity (MP) and select probability (SP)) We set the parametersof GA as MaxGens = 100 PopSize = 50 XP = 01 MP =01 and SP = 05 Let volatile coefficient 120572 = 005 and letproportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 2 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACOThe number of ants is set to the value 16 RNDandGA both generate 16 test cases Because of SACOrsquos lack of

0 1

0 1

0 1

0 1

1

1

0

0

0

0

0

1

1

1

0

1

0

0

1

1

0

1

0

a

b

c

a = 010 = 2

b = 011 = 3

c = 010 = 2

Figure 6The transformation relationship between ant colony pathsand test cases

coverage feedback it is similar to RND And we find that GAis similar to IGPACO The statement coverage of ACIACOachieves 100

Table 3 shows changes of coverage by choosing differentnumbers of ants on ACIACO We select the number of ants8 16 24 32 40 48 56 64 and 72 respectively We also usestatement coverage branch coverage and MCDC as qualitystandard of test case As shown in Table 3 the number of antsis 16 and the statement coverage achieves 100 When thenumber of ants is increased to 32 statement coverage andbranch coverage reach 100 Because MCDC interactionintensity is high when the number of ants arrived at 56 thecoverage only stops at about 89 Unless a large number ofants increase it is difficult to improveMCDC coverage Howto improve the MCDC high interaction intensity coveragewe need new improved ant colony algorithm to achieve it

Table 4 shows when branch coverage achieves 100the average minimum generation on seven approaches Asshown in Table 3 the number of ants is 32 and ACIACOachieves 100 So we select the ant number 32 We can seethat RND and SACO do not achieve 100 even more than10000 generationsGAand IGPACOare similar IGPACOcanreduce number of iterations very well the average minimumgeneration is reduced from 16134 to 4789 The minimumaverage iteration number of ACIACO is 2412 ACIACOreduces the iteration number greatly

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 7: Research Article Improved Ant Algorithms for Software

The Scientific World Journal 7

Table 3 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 9223 8023 339816 ants 9965 8834 441224 ants 10000 9372 567832 ants 10000 10000 568340 ants 10000 10000 673748 ants 10000 10000 783656 ants 10000 10000 893464 ants 10000 10000 894572 ants 10000 10000 8947

Table 4 The average minimum generation

The minimum generationRND gt10000GA 5423SACO gt10000ILPACO 16134IPVACO 13526IGPACO 4789ACIACO 2412

42The Collision Avoidance System The lines of the collisionavoidance system are 213 and cyclomatic complexity is 19In GA we set the parameters of GA as MaxGens = 100PopSize = 50 XP = 01 MP = 01 and SP = 05 Programgenerates twelve aircraft flight parameters The number ofant colony network nodes is set to 118 the number of theroute model on one side is 59 and thereinto the parameterCur Vertical Sep is 1stsim11th node High Confidence is boortype so it is 12th node Two of Three Reports Validis boor type it is 13th node Own Tracked Alt is14thsim24th node Own Tracked Alt Rate is 25thsim30thnode Other Tracked Alt is 31stsim35th Alt Layer Valueis 36thsim37th node Up Separation is 38thsim45th nodeDown Separation is 46thsim53rd node Other RAC is54thsim55th node Other Capability is 56thsim57th nodeClimb Inhibit is 58th Let volatile coefficient 120572 = 005proportionality coefficient 119896 = 10 In volatile coefficientschedule let 120582 = 1003 for IGPACO and ACIACO thecorresponding value in Table 1 for others and 120572(1) = 005The total number of iterations is 100

Table 5 shows three kinds of coverage of the sevenapproaches RND GA SACO ILPACO IPVACO IGPACOand ACIACO The number of ants is set to 16 At the sametime RND and GA both generate 16 test cases In thesame way RND is similar to SACO In ACIACO statementcoverage achieves 9290 branch coverage achieves 7511and MCDC achieves 3364 Through analyzing data inTable 5 GA is similar to IPVACO and IGPACO And threekinds of coverage of ACIACO are highest

Table 6 shows changes of coverage by choosing differentnumbers of ants on ACIAC We select the number of ants8 16 24 32 40 48 56 64 72 80 and 88 respectively We

also use statement coverage branch coverage and MCDCas quality standard of test case When the number of ants is64 the statement coverage achieves 100When the numberof ants increases to 16 the statement coverage and branchcoverage achieve 100 We find that when the numbers ofants are 32 40 and 48 the three kinds of coverage increaseslowly even decrease That is a normal phenomenon Someparts hardly be covered need test cases those appear withlow probability to cover There is a situation that 40 antshave a higher coverage than 48 ants do The reason is that48 ants do not conclude those test cases hardly be coveredbut 40 ants conclude part of them And when the numberof ants increases to 48 some test cases generated with lowpossibility have been generated continually and coverageincreases again All the same because MCDC interactionintensity is high when ants arrived at 80 the coverage onlystops at about 76

As is shown in Table 7 we select the number of ants as 80And in GA the number of test cases is 80 We conclude theaverage minimum generation number on seven approacheswhose branch coverage achieves 100 We get some similarconclusions RND and SACO do not achieve 100 evenmore than 10000 generations GA is similar to IGPACOIGPACO can reduce number of iterations very well theaverage number of iterations is reduced from 23834 to 9639IGPACO is better than IPVACO The average minimumiteration number of ACIACO is 2824 ACO greatly reducesnumber of iterations

43 Discussion and Analysis From the above experimentaldata we can conclude the performance of seven differentalgorithms RND and SACO are random processes and thecoverage is lowest GA is effective to promote coverage oftest cases and decreases number of iterations And the per-formance of GA is similar to that of IGPACO ILPACO usescoverage as ant colony pheromone feedback to strengthen theadvantage path and coverage of test cases is promoted Basedon ILPACO IPVACO uses adaptive volatile coefficient andmakes volatile speed slow first and then faster The coverageof test cases generated on IPVACO is better than ILPACOIGPACO uses best ant to update pheromone IGPACO hasa good astringency And the minimum number of iterationswhere branch coverage achieves 100 is much smaller thanIPVACO and IGPACO ACIACO which is based on all the

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 8: Research Article Improved Ant Algorithms for Software

8 The Scientific World Journal

Table 5 Coverage of TCAS by seven approaches

Statement coverage Branch coverage MCDCRND 6937 4829 1212GA 8782 7057 1547SACO 7117 4977 1181ILPACO 8589 6428 1764IPVACO 9254 7268 1747IGPACO 8928 6928 1768ACIACO 9290 7511 3364

Table 6 The coverage of different ant numbers on ACIACO

ACIACO Statement coverage Branch coverage MCDC8 ants 8237 6430 171716 ants 9229 7588 332224 ants 9278 7868 355332 ants 9438 8023 355540 ants 9584 8429 384548 ants 9511 8230 372556 ants 9789 8777 452564 ants 10000 9287 576772 ants 10000 9645 708980 ants 10000 10000 761288 ants 10000 10000 7613

Table 7 The minimum generation

The minimum generationRND gt10000GA 9866SACO gt10000ILPACO 23834IPVACO 17428IGPACO 9639ACIACO 2824

above three methods can effectively improve the searchefficiency restrain precocity achieve the highest coverageand minimize the number of iterations The proposed tech-nique will be compared with RND and GA in terms ofboth efficiency and coverage The results indicate that theimproved method can improve the search efficiency restrainprecocity promote case coverage and reduce the number ofiterations effectively

5 Conclusions

In this paper we have improved ACO establish ant colonysearch path and put forward improved approaches ILPACOIPVACO IGPACO and ACIACO The proposed techniqueis compared with RND and GA in terms of both efficiencyand coverageThrough the comparison and analysis of CTCPand TCAS the improved method can effectively improve

the search efficiency restrain precocity promote test casescoverage and reduce the number of iterations

The future work will consider following fields (1) Con-struct high efficiency ant colony search path Because antcolony path model is simple the algorithm astringency isreduced Establishing efficient ant colony search path can sig-nificantly improve test case coverage and reduce the numberof iterations greatly (2) Improve ant colony algorithm furthersophisticatedly For MCDC such correlation extremely highcoverage we need to think of amore sophisticated algorithmalgorithm should take into account correlation problem ofthe structures and variables in under test program (3) Basedon ACO put forward the comprehensive algorithm withother intelligent optimization algorithms Because of somedisadvantages in ant colony optimization we can use geneticalgorithm particle swarm optimization artificial bee colonyor another heuristic algorithm to combine with ant colonyoptimization effectively mutually complementing each otherThe comprehensive algorithm will improve the quality of thesoftware test case generated effectively

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research is partially supported by the AeronauticsScience Foundation of China (no 2011ZD51055) Science

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 9: Research Article Improved Ant Algorithms for Software

The Scientific World Journal 9

and Technology on Reliability and Environmental Engi-neering Laboratory (no 302367) the National Pre-ResearchFoundation of China (no 51319080201) and YETP1121 Andthe authors also would like to express their thanks to theanonymous reviewers whose comments would improve thispaper considerably

References

[1] Software amp Systems Engineering Committee ldquoIEEE standardfor software and system test documentationrdquo IEEE 829-2008IEEE Computer Society 2008

[2] F Jurado M A Redondo and M Ortega ldquoUsing fuzzy logicapplied to software metrics and test cases to assess program-ming assignments and give advicerdquo Journal of Network andComputer Applications vol 35 no 2 pp 695ndash712 2012

[3] MDorigo VManiezzo andA Colorni ldquoAnt system optimiza-tion by a colony of cooperating agentsrdquo IEEE Transactions onSystems Man and Cybernetics B Cybernetics vol 26 no 1 pp29ndash41 1996

[4] PMcMinn andMHolcombe ldquoThe state problem for evolution-ary testingrdquo inProceedings of the Genetic and Evolutionary Com-putation Conference (GECCO rsquo03) pp 2488ndash2498 SpringerChicago Ill USA July 2003

[5] P R Srivastava N Jose S Barade and D Ghosh ldquoOptimizedtest sequence generation from usage models using Ant colonyoptimizationrdquo International Journal of Software Engineering ampApplications vol 2 no 2 pp 14ndash28 2010

[6] P R Srivastava ldquoStructured testing using Ant colony opti-mizationrdquo in Proceedings of the 1st International Conference onIntelligent Interactive Technologies and Multimedia (IITM rsquo10)pp 203ndash207 ACM Press December 2010

[7] P R Srivastava V Ramachandran M Kumar G Talukder VTiwari and P Sharma ldquoGeneration of test data using metaheuristic approachrdquo in Proceedings of the 2008 IEEE Region 10Conference (TENCON rsquo08) November 2008

[8] M Chis ldquoA survey of the evolutionary computation techniquesfor software engineeringrdquo in Evolutionary Computation andOptimization Algorithms in Software Engineering Applicationsand Techniques M Chis Ed chapter 1 pp 1ndash12 2010

[9] B Sharma I Girdhar M Taneja P Basia S Vadla and P RSrivastava ldquoSoftware coverage a testing approach through antcolony optimizationrdquo in Proceedings of the 2nd InternationalConference on Swarm Evolutionary and Memetic Computing(SEMCCO rsquo11) pp 618ndash625 2011

[10] B Suri and S Singhal ldquoImplementing Ant colony optimizationfor test case selection and prioritizationrdquo International Journalon Computer Science and Engineering vol 3 no 5 pp 1924ndash1932 2011

[11] B Suri and S Singhal ldquoAnalyzing test case selection amp prioriti-zation using ACOrdquo ACM SIGSOFT Software Engineering Notesvol 36 no 6 pp 1ndash5 2011

[12] Y Singh A Kaur and B Suri ldquoTest case prioritization usingant colony optimizationrdquo ACM SIGSOFT Software EngineeringNotes vol 35 no 4 pp 1ndash7 2010

[13] S Bauersfeld S Wappler and J Wegener ldquoA metaheuristicapproach to test sequence generation for applications with aGUIrdquo in Proceedings of the 3rd International Symposium onSearch Based Software Engineering (SSBSE rsquo11) pp 173ndash187September 2011

[14] P R Srivastava S S Naruka A Alam N Agarwal and V MShah ldquoSoftware coverage analysis black box approach usingANT systemrdquo International Journal of Applied EvolutionaryComputation vol 3 no 3 pp 62ndash77 2012

[15] S Singh A Kaur K Sharma and S Srivastava ldquoSoftware testingstrategies and current issues in embedded software systemsrdquoInternational Journal of Scientific amp Engineering Research vol3 no 4 pp 1342ndash1357 2013

[16] A Ugur and D Aydin ldquoAn interactive simulation and analysissoftware for solving TSP using Ant Colony OptimizationalgorithmsrdquoAdvances in Engineering Software vol 40 no 5 pp341ndash349 2009

[17] X Li C Lao X Liu and Y Chen ldquoCoupling urban cellularautomata with ant colony optimization for zoning protectednatural areas under a changing landscaperdquo International Journalof Geographical Information Science vol 25 no 4 pp 575ndash5932011

[18] M Dorigo and L M Gambardella ldquoAnt colony system a coop-erative learning approach to the traveling salesman problemrdquoIEEETransactions on Evolutionary Computation vol 1 no 1 pp53ndash66 1997

[19] A Andziulis D Dzemydiene R Steponavicius and S JakovlevldquoComparison of two heuristic approaches for solving theproduction scheduling problemrdquo Information Technology andControl vol 40 no 2 pp 118ndash122 2011

[20] K Agarwal M Goyal and P R Srivastava ldquoCode coverageusing intelligent water drop (IWD)rdquo International Journal ofBio-Inspired Computation vol 4 no 6 pp 392ndash402 2012

[21] X Chen Q Gu X Zhang and D Chen ldquoBuilding prioritizedpairwise interaction test suites with ant colony optimizationrdquoin Proceedings of the 9th International Conference on QualitySoftware (QSIC rsquo09) pp 347ndash352 August 2009

[22] M Dorigo and M Birattari ldquoAnt colony optimizationrdquo inEncyclopedia of Machine Learning pp 36ndash39 Springer NewYork NY USA 2010

[23] P R Srivastava and K Baby ldquoAutomated software testing usingmetahurestic technique based on anAnt ColonyOptimizationrdquoin Proceedings of the 2010 International Symposium on ElectronicSystem Design (ISED rsquo10) pp 235ndash240 December 2010

[24] Z Zhang W Wang F Yue and H Cui ldquoMars Rover local-ization and path-planning based on LIDAR and ant colonyoptimizationrdquo International Journal of Innovative ComputingInformation and Control vol 7 no 9 pp 5571ndash5582 2011

[25] C Mao X Yu J Chen and J Chen ldquoGenerating test datafor structural testing based on Ant colony optimizationrdquo inProceedings of the 2012 12th International Conference on QualitySoftware (QSIC rsquo12) pp 98ndash101 2012

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Page 10: Research Article Improved Ant Algorithms for Software

Submit your manuscripts athttpwwwhindawicom

Computer Games Technology

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Distributed Sensor Networks

International Journal of

Advances in

FuzzySystems

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014

International Journal of

ReconfigurableComputing

Hindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Applied Computational Intelligence and Soft Computing

thinspAdvancesthinspinthinsp

Artificial Intelligence

HindawithinspPublishingthinspCorporationhttpwwwhindawicom Volumethinsp2014

Advances inSoftware EngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Journal of

Computer Networks and Communications

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation

httpwwwhindawicom Volume 2014

Advances in

Multimedia

International Journal of

Biomedical Imaging

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

ArtificialNeural Systems

Advances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Computational Intelligence and Neuroscience

Industrial EngineeringJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Human-ComputerInteraction

Advances in

Computer EngineeringAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014