Skip to main content

Test-Case Generation for Model-Based Testing of Object-Oriented Programs

  • Chapter
  • First Online:
Automated Software Testing (ICDCIT 2019)

Part of the book series: Services and Business Process Reengineering ((SBPR))

Abstract

In recent years, a total paradigm shift has taken place towards the use of object-oriented approach in software development. Starting from banking, stock market, telecommunication, Internet applications, mobile apps and graphics to artificial intelligence, everywhere we found widespread use of object-oriented programming approach. The problem is, simpler the development of applications using object-oriented concepts, the more difficult is to test those applications due to the presence of specific features of object-oriented programming concepts like encapsulation, polymorphism, inheritance, dynamic binding, etc. Research community has already been suggested that the model-based testing approach is the most convenient and acceptable approach to test the object-oriented programs. Till date, many work has been proposed to use UML models for deriving test cases, where the testers can test the specifications and functionalities of objects and their dynamic features without accessing the program source codes. Here, we have covered the various model-based and search-based testing approaches and methodologies used by researchers in last twenty-five years to generate test cases and test data for functional as well as system-level testing of object-oriented programs. We have also provided a concrete frameworks to perform search-based testing of object-oriented programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 149.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 199.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 199.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Abdurazik A, Offutt J (1999) Generating test cases from UML specifications. Master’s thesis, George Mason University

    Google Scholar 

  2. Ali YMB, Benmaiza F (2012) Generating test case for object-oriented software using genetic algorithm and mutation testing method. Int J Appl Metaheuristic Comput (IJAMC) 3(1):15–23

    Article  Google Scholar 

  3. Ananya K, Swapan B (2004) Static analysis of object oriented systems using extended control flow graph. In: Analog and digital techniques in electrical engineering conference

    Google Scholar 

  4. Arcuri A, Yao X (2007) On test data generation of object-oriented software. In: Testing: academic and industrial conference practice and research techniques—MUTATION (TAICPART-MUTATION 2007). IEEE, pp 72–76

    Google Scholar 

  5. Arcuri A, Yao X (2008) Search based software testing of object-oriented containers. Inf Sci 178(15):3075–3095

    Article  Google Scholar 

  6. Bacanin N (2011) An object-oriented software implementation of a novel cuckoo search algorithm. In: Proceedings of the 5th European computing conference (ECC’11), pp 245–250

    Google Scholar 

  7. Bashir I, Paul RA (1999) Object-oriented integration testing. Ann Softw Eng 8(1–4):187–202

    Article  Google Scholar 

  8. Bauer T, Eichler H, Wendland MF, Wieczorek S (2010) In: Proceedings of 3rd workshop on model-based testing in practice (MoTiP’10)

    Google Scholar 

  9. Bhattacharya S, Kanjilal A (2006) Code based analysis for object-oriented systems. J Comput Sci Technol 21(6):965–972

    Article  Google Scholar 

  10. Biswal BN (2010) Test case generation and optimization of object-oriented software using UML behavioral models. Ph.D. thesis

    Google Scholar 

  11. Boussaa M, Barais O, Sunye G, Baudry B (2015) A novelty search-based test data generator for object-oriented programs. In: Proceedings of the companion publication of the 2015 annual conference on genetic and evolutionary computation. ACM, pp 1359–1360

    Google Scholar 

  12. Boussaïd I, Siarry P, Ahmed-Nacer M (2017) A survey on search-based model-driven engineering. Autom Softw Eng 24(2):233–294

    Article  Google Scholar 

  13. Bringmann E, Krämer A (2008) Model-based testing of automotive systems. In: 2008 1st international conference on software testing, verification, and validation. IEEE, pp 485–493

    Google Scholar 

  14. Canuto AMP, Neto AF, Silva HM, Xavier-Júnior JC, Barreto CA (2018) Population-based bio-inspired algorithms for cluster ensembles optimization. Nat Comput 1–18

    Google Scholar 

  15. Cheon Y, Kim M (2006) A specification-based fitness function for evolutionary testing of object-oriented programs. In: Proceedings of the 8th annual conference on genetic and evolutionary computation. ACM, pp 1953–1954

    Google Scholar 

  16. Dalal SR, Jain A, Karunanithi N, Leaton J, Lott CM, Patton GC, Horowitz BM (1999) Model-based testing in practice. In: Proceedings of the 1999 international conference on software engineering (IEEE Cat. No. 99CB37002). IEEE, pp 285–294

    Google Scholar 

  17. Dash S, Thulasiram R, Thulasiraman P (2017) An enhanced chaos-based firefly model for Parkinson’s disease diagnosis and classification. In: 2017 international conference on information technology (ICIT). IEEE, pp 159–164

    Google Scholar 

  18. Dhal KG, Quraishi MI, Das S (2015) Development of firefly algorithm via chaotic sequence and population diversity to enhance the image contrast. Nat Comput 15:307–318

    Article  MathSciNet  Google Scholar 

  19. Felix K (2014) Automated generation of unit tests from UML activity diagrams using the AMPL interface for constraint solvers. Master’s thesis, Hamburg University of Technology

    Google Scholar 

  20. Ferrández JM, Varela R (2017) Bio-inspired population-based meta-heuristics for problem solving. Nat Comput 16(2):187–188. https://doi.org/10.1007/s11047-017-9624-3

  21. Fister I, Fister I Jr, Yang XS, Brest J (2013) A comprehensive review of firefly algorithms. Swarm Evol Comput 13:34–46

    Article  Google Scholar 

  22. Fister I, Yang XS, Brest J, Fister I Jr (2013) Modified firefly algorithm using quaternion representation. Expert Syst Appl 40(18):7220–7230

    Article  Google Scholar 

  23. Gambhir S (2012) Testing strategies for object-oriented systems. Int J Comput Sci Inf Technol Secur 2(2)

    Google Scholar 

  24. Gandomi AH, Yang XS, Talatahari S, Alavi AH (2013) Firefly algorithm with chaos. Commun Nonlinear Sci Numer Simul 18(1):89–98

    Article  MathSciNet  Google Scholar 

  25. Gupta NK, Rohil MK (2008) Using genetic algorithm for unit testing of object oriented software. In: 2008 first international conference on emerging trends in engineering and technology. IEEE, pp 308–313

    Google Scholar 

  26. Gupta NK, Rohil MK (2013) Improving GA based automated test data generation technique for object oriented software. In: 2013 3rd IEEE international advance computing conference (IACC). IEEE, pp 249–253

    Google Scholar 

  27. Harman M, Jones BF (2001) The seminal workshop: reformulating software engineering as a metaheuristic search problem. ACM SIGSOFT Softw Eng Notes 26(6):62–66

    Article  Google Scholar 

  28. Hasling B, Goetz H, Beetz K (2008) Model based testing of system requirements using UML use case models. In: Proceedings of the international conference on software testing, verification, and validation. IEEE

    Google Scholar 

  29. Ibe M (2013) Decomposition of test cases in model-based testing. In: DocSymp@ MoDELS. Citeseer, pp 40–47

    Google Scholar 

  30. Inkumsah K, Xie T (2008) Improving structural testing of object-oriented programs via integrating evolutionary testing and symbolic execution. In: Proceedings of the 2008 23rd IEEE/ACM international conference on automated software engineering. IEEE Computer Society, pp 297–306

    Google Scholar 

  31. Islam S (2013) Code based analysis of object-oriented systems using extended control flow graph. Ph.D. thesis

    Google Scholar 

  32. Jena AK (2014) Minimization and prioritization of test cases using behavioral UML 2.x models. Ph.D. thesis

    Google Scholar 

  33. Kanjilal A, Bhattacharya S (2004) Static analysis of object oriented systems using extended control flow graph. In: 2004 IEEE region 10 conference TENCON 2004. IEEE, pp 310–313

    Google Scholar 

  34. Karaboga D, Akay B (2009) A comparative study of artificial bee colony algorithm. Appl Math Comput 214(1):108–132

    MathSciNet  MATH  Google Scholar 

  35. Kaur A, Dhiman G (2019) A review on search-based tools and techniques to identify bad code smells in object-oriented systems. In: Harmony search and nature inspired optimization algorithms. Springer, pp 909–921

    Google Scholar 

  36. Kaur K, Chopra V (2014) Review of automatic test case generation from UML diagram using evolutionary algorithm. Int J Invent Eng Sci 2:17–20

    Google Scholar 

  37. Kennedy J (2010) Particle swarm optimization. Encyclopedia of machine learning, pp 760–766

    Google Scholar 

  38. Khari M, Kumar P (2017) An effective meta-heuristic cuckoo search algorithm for test suite optimization. Informatica 41(3)

    Google Scholar 

  39. Khurana N, Chillar R (2015) Test case generation and optimization using UML models and genetic algorithm. Procedia Comput Sci 57:996–1004

    Google Scholar 

  40. Li J, Bao W, Zhao Y, Ma Z, Dong H (2009) Evolutionary generation of unique input/output sequences for class behavioral testing. Comput Math Appl 57(11–12):1800–1807

    Article  Google Scholar 

  41. Mavrovouniotis M, Li C, Yang S (2017) A survey of swarm intelligence for dynamic optimization: algorithms and applications. Swarm Evol Comput 33:1–17

    Article  Google Scholar 

  42. Meyer B, Ciupa I, Leitner A, Liu LL (2007) Automatic testing of object-oriented software. In: International conference on current trends in theory and practice of computer science. Springer, pp 114–129

    Google Scholar 

  43. Minj J, Belchanden L (2013) Path oriented test case generation for UML state diagram using genetic algorithm. Int J Comput Appl 82(7)

    Google Scholar 

  44. Mirjalili S, Hashim HS (2012) Training feedforward neural networks using hybrid particle swarm optimization and gravitational search algorithm. Appl Math Comput 41:11125–11137

    Google Scholar 

  45. Oliveira C, Aleti A, Grunske L, Smith-Miles K (2018) Mapping the effectiveness of automated test suite generation techniques. IEEE Trans Reliab 67(3):771–785

    Article  Google Scholar 

  46. Ong HC, Tilahun SL, Lee WS, Ngnotchouye JMT (2017) Comparative study of prey predator algorithm and firefly algorithm. Intell Autom Soft Comput 1–8

    Google Scholar 

  47. Pal SK, Rai C, Singh AP (2012) Comparative study of firefly algorithm and particle swarm optimization for noisy non-linear optimization problems. Int J intell Syst Appl 4(10):50

    Google Scholar 

  48. Panda M, Dash S (2018) A framework for testing object oriented programs using hybrid nature inspired algorithms. In: International conference on advanced informatics for computing research. Springer, pp 531–539

    Google Scholar 

  49. Panda M, Sarangi PP (2013) Performance analysis of test data generation for path coverage based testing using three meta-heuristic algorithms. Int J Comput Sci Inform 3(2):34–41

    Google Scholar 

  50. Panda M, Sarangi PP, Dash S (2015) Automatic test data generation using metaheuristic cuckoo search algorithm. Int J Knowl Discov Bioinform (IJKDB) 5(2):16–29

    Article  Google Scholar 

  51. Panthi V, Mohapatra D (2015) Generating prioritized test sequences using firefly optimization technique. In: Computational intelligence in data mining, vol 2. Springer, pp 627–635

    Google Scholar 

  52. Patel PE, Patil NN (2013) Testcases formation using UML activity diagram. In: 2013 international conference on communication systems and network technologies. IEEE, pp 884–889

    Google Scholar 

  53. Raju PR, Cheekaty S, Kalidasu H et al (2011) Object oriented software testing. Int J Comput Sci Inf Technol

    Google Scholar 

  54. Rashedi E, Nezamabadi-Pour H, Saryazdi S (2009) GSA: a gravitational search algorithm. Inf Sci 179(13):2232–2248

    Article  Google Scholar 

  55. Ribeiro JCB, Zenha-Rela MA, de Vega FF (2009) Test case evaluation and input domain reduction strategies for the evolutionary testing of object-oriented software. Inf Softw Technol 51(11):1534–1548

    Article  Google Scholar 

  56. Riebisch M, Philippow I, Götze M (2002) UML-based statistical test case generation. In: Net. ObjectDays: international conference on object-oriented and internet-based technologies, concepts, and applications for a networked world. Springer, pp 394–411

    Google Scholar 

  57. Rumpe B (2002) Model-based testing of object-oriented systems. In: International symposium on formal methods for components and objects. Springer, pp 380–402

    Google Scholar 

  58. Saeed A, Ab Hamid SH, Mustafa MB (2016) The experimental applications of search-based techniques for model-based testing: taxonomy and systematic literature review. Appl Soft Comput 49:1094–1117

    Article  Google Scholar 

  59. Sahin O, Akay B (2016) Comparisons of metaheuristic algorithms and fitness functions on software test data generation. Appl Soft Comput 49:1202–1214

    Article  Google Scholar 

  60. Samuel P, Mall R, Bothra AK (2008) Automatic test case generation using unified modeling language (UML) state diagrams. IET Softw 2(2):79–93

    Article  Google Scholar 

  61. Sarangi PP, Sahu A, Panda M (2014) Training a feed-forward neural network using artificial bee colony with back-propagation algorithm. In: Intelligent computing, networking, and informatics. Springer, pp 511–519

    Google Scholar 

  62. Shamshiri S, Rojas JM, Gazzola L, Fraser G, McMinn P, Mariani L, Arcuri A (2018) Random or evolutionary search for object-oriented test suite generation. Softw Test Verif Reliab 28(4)

    Google Scholar 

  63. Shanthi A, Kumar DGM (2011) Automated test cases generation for object oriented software. Indian J Comput Sci Eng 2(4):543–546

    Google Scholar 

  64. Sharma C, Sabharwal S, Sibal R (2014) A survey on software testing techniques using genetic algorithm. arXiv preprint arXiv:1411.1154

  65. Shirole M, Kumar R (2013) UML behavioral model based test case generation: a survey. ACM SIGSOFT Softw Eng Notes 38(4):1–13

    Article  Google Scholar 

  66. Silva LS, van Someren M (2010) Evolutionary testing of object-oriented software. In: Proceedings of the 2010 ACM symposium on applied computing. ACM, pp 1126–1130

    Google Scholar 

  67. Soto R, Crawford B, Olivares R, Barraza J, Figueroa I, Johnson F, Paredes F, Olguín E (2016) Solving the non-unicost set covering problem by using cuckoo search and black hole optimization. Nat Comput 16:213–229

    Article  MathSciNet  Google Scholar 

  68. Srivastava S, Sahana SK (2019) A survey on traffic optimization problem using biologically inspired techniques. Nat Comput 1–15

    Google Scholar 

  69. Srivatsava PR, Mallikarjun B, Yang XS (2013) Optimal test sequence generation using firefly algorithm. Swarm Evol Comput 8:44–53

    Article  Google Scholar 

  70. Storn R, Price K (1997) Differential evolution—a simple and efficient heuristic for global optimization over continuous spaces. J Global Optim 11(4):341–359

    Article  MathSciNet  Google Scholar 

  71. Sumalatha VM et al (2013) Object oriented test case generation technique using genetic algorithms. Int J Comput Appl 61(20)

    Google Scholar 

  72. Supavita S (2009) Object-oriented software and UML-based testing: a survey report. CiteSeerX-Scientific Literature Digital Library and Search Engine, United States

    Google Scholar 

  73. Suresh Y, Rath SK (2014) Evolutionary algorithms for object-oriented test data generation. ACM SIGSOFT Softw Eng Notes 39(4):1–6

    Google Scholar 

  74. Swain Santosh K, Mall R (2009) Test case generation using UML sequence and activity diagrams. Int J Comput Sci Commun Technol

    Google Scholar 

  75. Swain Santosh K, Mohapatra Durga P (2010) Test case generation from behavioral UML models. Int J Comput Appl

    Google Scholar 

  76. Tao Y, Zhang L, Qinyu W, Chen R, Zhang Y (2017) A multi-population evolution stratagy and its application in low area/power FSM synthesis. Nat Comput. https://doi.org/10.1007/s11047-017-9659-5

    Article  Google Scholar 

  77. Tonella P (2004) Evolutionary testing of classes. In: ACM SIGSOFT software engineering notes, vol 29. ACM, pp 119–128

    Google Scholar 

  78. Touseef M, Butt NA, Hussain A, Nadeem A (2015) Testing from UML design using activity diagram: a comparison of techniques. Int J Comput Appl 975:8887

    Google Scholar 

  79. Tse T, Xu Z (1996) Test case generation for class-level object-oriented testing. In: Quality process convergence: proceedings of 9th international software quality week (QW’96). Citeseer

    Google Scholar 

  80. Utting M, Pretschner A, Legeard B (2012) A taxonomy of model-based testing approaches. Softw Test Verif Reliab 22(5):297–312

    Article  Google Scholar 

  81. Uzun B, Tekinerdogan B (2018) Model-driven architecture based testing: a systematic literature review. Inf Softw Technol 102:30–48

    Article  Google Scholar 

  82. Vantuch T, Zelinka I, Adamatzky A, Marwan N (2019) Perturbations and phase transitions in swarm optimization algorithms. Nat Comput 1–13

    Google Scholar 

  83. Wang CF, Liu K (2017) An improved particle swarm optimization algorithm based on comparative judgment. Nat Comput 17. https://doi.org/10.1007/s11047-017-9630-5

  84. Wappler S (2008) Automatic generation of object-oriented unit tests using genetic programming

    Google Scholar 

  85. Wappler S, Lammermann F (2005) Using evolutionary algorithms for the unit testing of object-oriented software. In: Proceedings of the 7th annual conference on genetic and evolutionary computation. ACM, pp 1053–1060

    Google Scholar 

  86. Wappler S, Wegener J (2006) Evolutionary unit testing of object-oriented software using strongly-typed genetic programming. In: Proceedings of the 8th annual conference on genetic and evolutionary computation, GECCO ’06. ACM, pp 1925–1932. https://doi.org/10.1145/1143997.1144317

  87. Weißleder S (2010) Test models and coverage criteria for automatic model-based test generation with UML state machines. Ph.D. thesis, Humboldt University of Berlin

    Google Scholar 

  88. Xie T, Marinov D, Schulte W, Notkin D (2005) Symstra: a framework for generating object-oriented unit tests using symbolic execution. In: International conference on tools and algorithms for the construction and analysis of systems. Springer, pp 365–381

    Google Scholar 

  89. Yang XS (2010) Firefly algorithm, levy flights and global optimization. In: Research and development in intelligent systems XXVI. Springer, pp 209–218

    Google Scholar 

  90. Yang XS (2011) Metaheuristic optimization. Scholarpedia 6(8):11472

    Article  Google Scholar 

  91. Yang XS, Deb S (2009) Cuckoo search via lévy flights. In: 2009 world congress on nature & biologically inspired computing (NaBIC). IEEE, pp 210–214

    Google Scholar 

  92. Yang XS, Deb S, Fong S, He X, Zhao YX (2016) From swarm intelligence to metaheuristics: nature-inspired optimization algorithms. Computer 49(9):52–59

    Article  Google Scholar 

  93. Zhang L, Liu L, Yang XS, Dai Y (2016) A novel hybrid firefly algorithm for global optimization. PLoS ONE 11(9):e0163230

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Panda, M., Dash, S. (2020). Test-Case Generation for Model-Based Testing of Object-Oriented Programs. In: Jena, A., Das, H., Mohapatra, D. (eds) Automated Software Testing. ICDCIT 2019. Services and Business Process Reengineering. Springer, Singapore. https://doi.org/10.1007/978-981-15-2455-4_3

Download citation

Publish with us

Policies and ethics