Skip to main content

Test Case Generation Based on Search-Based Testing

  • Conference paper
  • First Online:
Intelligent and Cloud Computing

Part of the book series: Smart Innovation, Systems and Technologies ((SIST,volume 194))

  • 931 Accesses

Abstract

Maximum coverage with minimum testing time is the main objective of a test case generation activity which leads to a multi-objective problem. Search-Based Testing (SBT) technique is a demanding research area for test case generation. Researchers have applied various metaheuristic (searching) algorithms to generate efficient and effective test cases in many research works. Out of these existing search-based algorithms, Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) are the most widely used algorithms in automatic test case generation. In this paper, a test case generation approach is proposed using Cuckoo Search (CS) algorithm. CS has a controlling feature, Lévy flights, which makes it more efficient in searching the best candidate solution. It helps to generate efficient test cases in terms of code coverage and execution time. In our proposed method, test cases are generated based on path coverage criteria. Fitness of a test case is evaluated using branch distance and approximation level combined functions. The result is compared with PSO and with its variant Adaptive PSO (APSO). The experimental result shows that both the algorithms give nearly equal to the same result. Though the results are nearly equal, the implementation of CS is simple as it requires only one parameter to be tuned.

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 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.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. Maragathavalli, P.: Search-based software test data generation using evolutionary computation. Int. J. Comput. Sci. Inf. Technol. 3(1), 213–223 (2011)

    Google Scholar 

  2. Sahoo, R.R., Ray, M.:Metaheuristic techniques for test case generation: a review. J. Inf. Technol. Res. 11(1), 158–171 (2018)

    Google Scholar 

  3. Harman, M., Jia, Y., Zhang, Y.:Achievements, open problems and challenges for search based software testing. In: Proceedings of IEEE 8th International Conference on Software Testing, Verification and Validation, pp 1–12 (2015)

    Google Scholar 

  4. Yang, X., Deb, S.: Cuckoo search via levy flights. In: Proceedings of the Nabic—World Congress on Nature & Biologically Inspired Computing, pp. 210–214 (2009)

    Google Scholar 

  5. Sharma, S., Rizvi, S.A.M., Sharma, V.: A framework for optimization of software test cases generation using cuckoo search algorithm. In: 9th International Conference on Cloud Computing, Data Science & Engineering (Confluence), pp. 282–286. IEEE (2019)

    Google Scholar 

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

    MathSciNet  Google Scholar 

  7. Kumar, K.S., Muthukumarvel, A.: Optimal test suite selection using improved cuckoo search algorithm based on extensive testing constraints. Int. J. Appl. Eng. Res. 12(9), 1920–1928 (2017)

    Google Scholar 

  8. Srivastava, P.R., Varshney, A., Nama, P., Yang, X.S.: Software test effort estimation: a model based on cuckoo search. Int. J. Bio-Inspired Comput. 4(5), 278–285 (2012)

    Article  Google Scholar 

  9. Panda, M., Dash, S.: Automatic test suite generation for object oriented programs using metaheuristic cuckoo search algorithm. Int. J. Control Theory Appl. 10(18) (2017)

    Google Scholar 

  10. Roshan, R., Porwal, R., Sharma, C.M.: Review of search based techniques in software testing. Int. J. Comput. Appl. 51(6), 42–45 (2012)

    Google Scholar 

  11. Baresel, A., Sthamer, H., Schmidt, M.: Fitness function design to improve evolutionary structural testing. In: Proceeding of the Genetic and Evolutionary Computation Conference, pp. 1329–1336 (2002)

    Google Scholar 

  12. Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16(8), 870–879 (1990)

    Article  Google Scholar 

  13. Chen, Y., Zhong, Y.., Shi, T., Liu, J.: Comparison of two fitness functions for GA-based path-oriented test data generation. In: Fifth International Conference on Natural Computation, IEEE Computer Society, pp. 177–181 (2009)

    Google Scholar 

  14. Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Inf. Softw. Technol. 43, 841–854 (2001)

    Article  Google Scholar 

  15. Srivastava, P.R., Singh, A.K., Kumhar, H., Jain, M.: Optimal test sequence generation in state based testing using cuckoo search. Int. J. Appl. Evol. Comput. (IJAEC) 3(3), 17–32 (2012)

    Article  Google Scholar 

  16. Sahoo, R.R., Ray, M.: PSO based test case generation for critical path using improved combined fitness function. J. King Saud Univ.-Comput. Inf. Sci. (2019). https://doi.org/10.1016/j.jksuci.2019.09.010

    Article  Google Scholar 

  17. Mall, R.: Fundamentals of software engineering. 5th edn. PHI Learning Pvt. Ltd (2018)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rashmi Rekha Sahoo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sahoo, R.R., Ray, M., Nayak, G. (2021). Test Case Generation Based on Search-Based Testing. In: Mishra, D., Buyya, R., Mohapatra, P., Patnaik, S. (eds) Intelligent and Cloud Computing. Smart Innovation, Systems and Technologies, vol 194. Springer, Singapore. https://doi.org/10.1007/978-981-15-5971-6_33

Download citation

Publish with us

Policies and ethics