Skip to main content
Top
Published in: Neural Computing and Applications 7-8/2014

01-12-2014 | Original Article

An approach for test data generation using program slicing and particle swarm optimization

Authors: Shujuan Jiang, Dandan Yi, Xiaolin Ju, Lingsai Wang, Yingqi Liu

Published in: Neural Computing and Applications | Issue 7-8/2014

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Heuristic search-based test data generation has a potential higher efficiency in software testing with path covering. However, these approaches are suffered in covering the long and complex path. In this paper, we propose a method for generating test data based on program slicing and particle swarm optimization. With the interest points selected from a target path, we perform a program slicing to remove the statements which are irrelevant to the interest points. Our method simplifies the target path and the actual path to get a better fitness value. After program slices obtained, the population is evolved using particle swarm optimization to improve the efficiency of test data generation.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Literature
1.
go back to reference Xie XY, Xu BW, Nie CH (2009) Genetic test case generation for path-oriented testing. Softw J 20(12):3117–3136CrossRef Xie XY, Xu BW, Nie CH (2009) Genetic test case generation for path-oriented testing. Softw J 20(12):3117–3136CrossRef
2.
go back to reference Pargas RP, Harrold MJ, Peck RR (1999) Test-data generation using genetic algorithms. Softw Test Verif Reliab 9(4):263–282CrossRef Pargas RP, Harrold MJ, Peck RR (1999) Test-data generation using genetic algorithms. Softw Test Verif Reliab 9(4):263–282CrossRef
3.
go back to reference Ahmed MA, Hermadi I (2008) GA-based multiple paths test data generator. Comput Oper Res 35(10):3107–3124CrossRef Ahmed MA, Hermadi I (2008) GA-based multiple paths test data generator. Comput Oper Res 35(10):3107–3124CrossRef
4.
go back to reference Pargas R, Harrold M, Peck R (1999) Test-data generation using genetic algorithms. J Softw Test 9(4):263–282 Pargas R, Harrold M, Peck R (1999) Test-data generation using genetic algorithms. J Softw Test 9(4):263–282
5.
go back to reference Windisch A, Wappler S, Wegener J (2007) Apply particle swarm optimization to software testing. In: Proceedings of the 9th annual conference on genetic and evolution computation. ACM, New York, pp 1121–1128 Windisch A, Wappler S, Wegener J (2007) Apply particle swarm optimization to software testing. In: Proceedings of the 9th annual conference on genetic and evolution computation. ACM, New York, pp 1121–1128
6.
go back to reference Chhabra JK, Kumar S, Dahiya SS (2010) Automated test data generation using swarm intelligence approaches. Inst Eng Electron Telecommun Eng J 90:3–12 Chhabra JK, Kumar S, Dahiya SS (2010) Automated test data generation using swarm intelligence approaches. Inst Eng Electron Telecommun Eng J 90:3–12
7.
go back to reference Chen X, Gu Q, Wang ZY, Chen DX (2011) Framework of particle swarm optimization based pairwise testing. J Softw 22(12):2879–2893CrossRef Chen X, Gu Q, Wang ZY, Chen DX (2011) Framework of particle swarm optimization based pairwise testing. J Softw 22(12):2879–2893CrossRef
8.
go back to reference Kennedy J, Eberhart R (1995) Particle swarm optimization. In: Proceedings of the 1st conference on neural networks, pp 1942–1948 Kennedy J, Eberhart R (1995) Particle swarm optimization. In: Proceedings of the 1st conference on neural networks, pp 1942–1948
9.
go back to reference Bouktif S, Sahraoui H, Antoniol G (2006) Simulated annealing for improving software quality prediction. In: Proceedings of the 8th annual conference on genetic and evolutionary computation. ACM, New York, pp 1893–1900 Bouktif S, Sahraoui H, Antoniol G (2006) Simulated annealing for improving software quality prediction. In: Proceedings of the 8th annual conference on genetic and evolutionary computation. ACM, New York, pp 1893–1900
10.
go back to reference Arcuri A, White DR, Clark J, Yao X (2008) Multi-objective improvement of software using co-evolution and smart seeding. In: Proceedings of the 7th international conference on simulated evolution and learning. Springer, Berlin, pp 61–70 Arcuri A, White DR, Clark J, Yao X (2008) Multi-objective improvement of software using co-evolution and smart seeding. In: Proceedings of the 7th international conference on simulated evolution and learning. Springer, Berlin, pp 61–70
11.
go back to reference Ayari K, Bouktif S, Antoniol G (2007) Automatic mutation test input data generation via ant colony. In: Proceedings of the 9th annual conference on genetic and evolutionary computation. ACM, New York, pp 1074–1081 Ayari K, Bouktif S, Antoniol G (2007) Automatic mutation test input data generation via ant colony. In: Proceedings of the 9th annual conference on genetic and evolutionary computation. ACM, New York, pp 1074–1081
12.
go back to reference Singh Y, Kaur A, Suri B (2010) Test case prioritization using ant colony optimization. Assoc Comput Mach ACM SIGSOFT Softw Eng Note 35:1–7 Singh Y, Kaur A, Suri B (2010) Test case prioritization using ant colony optimization. Assoc Comput Mach ACM SIGSOFT Softw Eng Note 35:1–7
14.
go back to reference Weiser M (1981) Program slicing. In: Proceedings of the 5th international conference on software engineering. IEEE, pp 439–449 Weiser M (1981) Program slicing. In: Proceedings of the 5th international conference on software engineering. IEEE, pp 439–449
15.
go back to reference Yi DD, Jiang SJ, Zhang YM (2012) Fitness function design approach for test data generation of multiple path coverage. Comput Eng Appl 48(22):79–83 Yi DD, Jiang SJ, Zhang YM (2012) Fitness function design approach for test data generation of multiple path coverage. Comput Eng Appl 48(22):79–83
16.
go back to reference Tiwari S, Mishra KK, Misra AK (2013) Test case generation for modified code using a variant of particle swarm optimization (PSO) algorithm. In: Proceedings of the tenth international conference on information technology: new generations (ITNG), IEEE, pp 363–368 Tiwari S, Mishra KK, Misra AK (2013) Test case generation for modified code using a variant of particle swarm optimization (PSO) algorithm. In: Proceedings of the tenth international conference on information technology: new generations (ITNG), IEEE, pp 363–368
17.
go back to reference Nie P (2012) A PSO test case generation algorithm with enhanced exploration ability. J Comput Inf Syst 8(14):5785–5793 Nie P (2012) A PSO test case generation algorithm with enhanced exploration ability. J Comput Inf Syst 8(14):5785–5793
18.
go back to reference Wang S, Wu H (2013) A novel algorithm for multi-path test data generation. In: Proceedings of the 4th international conference on digital manufacturing and automation (ICDMA), IEEE, pp 58–60 Wang S, Wu H (2013) A novel algorithm for multi-path test data generation. In: Proceedings of the 4th international conference on digital manufacturing and automation (ICDMA), IEEE, pp 58–60
19.
go back to reference Shi JJ, Jiang SJ, Han H, Wang LS (2013) Adaptive particle swarm optimization algorithm and its application in test data generation. Chin J Electron 41(8):1555–1559 Shi JJ, Jiang SJ, Han H, Wang LS (2013) Adaptive particle swarm optimization algorithm and its application in test data generation. Chin J Electron 41(8):1555–1559
20.
go back to reference Khan SA, Nadeem A (2014) Automated test data generation for coupling based integration testing of object oriented programs using particle swarm optimization (PSO). Genetic and evolutionary computing. Springer International Publishing, New York, pp 115–124 Khan SA, Nadeem A (2014) Automated test data generation for coupling based integration testing of object oriented programs using particle swarm optimization (PSO). Genetic and evolutionary computing. Springer International Publishing, New York, pp 115–124
21.
go back to reference Souza LSD, Prudêncio RBC, Barros FA et al (2013) Search based constrained test case selection using execution effort. Expert Syst Appl 40(12):4887–4896CrossRef Souza LSD, Prudêncio RBC, Barros FA et al (2013) Search based constrained test case selection using execution effort. Expert Syst Appl 40(12):4887–4896CrossRef
22.
go back to reference Jiang SJ, Li W, Li HY, Zhang YM, Zhang HC, Liu YQ (2012) Fault localization for null pointer exception based on stack trace and program slicing. In: Proceedings of the 12th international conference on quality software. IEEE, pp 9–12 Jiang SJ, Li W, Li HY, Zhang YM, Zhang HC, Liu YQ (2012) Fault localization for null pointer exception based on stack trace and program slicing. In: Proceedings of the 12th international conference on quality software. IEEE, pp 9–12
23.
go back to reference Liu YQ, Li W, Jiang SJ, Zhang YM, Ju XL (2013) An approach for fault localization based on program slicing and Bayesian. In: Proceedings of the 13th international conference on quality software. IEEE, pp 326–332 Liu YQ, Li W, Jiang SJ, Zhang YM, Ju XL (2013) An approach for fault localization based on program slicing and Bayesian. In: Proceedings of the 13th international conference on quality software. IEEE, pp 326–332
24.
go back to reference McMinn P, Harman M, Lakhotia K, Hassoun Y, Wegener J (2012) Input domain reduction through irrelevant variable removal and its effect on local, global, and hybrid search-based structural test data generation. IEEE Trans Softw Eng 38(2):453–477CrossRef McMinn P, Harman M, Lakhotia K, Hassoun Y, Wegener J (2012) Input domain reduction through irrelevant variable removal and its effect on local, global, and hybrid search-based structural test data generation. IEEE Trans Softw Eng 38(2):453–477CrossRef
Metadata
Title
An approach for test data generation using program slicing and particle swarm optimization
Authors
Shujuan Jiang
Dandan Yi
Xiaolin Ju
Lingsai Wang
Yingqi Liu
Publication date
01-12-2014
Publisher
Springer London
Published in
Neural Computing and Applications / Issue 7-8/2014
Print ISSN: 0941-0643
Electronic ISSN: 1433-3058
DOI
https://doi.org/10.1007/s00521-014-1692-z

Other articles of this Issue 7-8/2014

Neural Computing and Applications 7-8/2014 Go to the issue

Premium Partner