Skip to main content

Source Code Features Based Branch Coverage Prediction Using Ensemble Technique

  • Conference paper
  • First Online:
Meta Heuristic Techniques in Software Engineering and Its Applications (METASOFT 2022)

Abstract

Branch coverage prediction plays a critical role in achieving high effective performance for modern applications. However, traditional test solutions are often inadequate to meet test objectives. If the testers know the branch coverage prediction achieved by any specific tool, they can test a subset of classes instead of the complete one. It is noticed that earlier test information of the tools can help make appropriate decisions about branch coverage tool selection. This paper examines the possibility of using source code metrics for branch coverage prediction. We considered different features extracted from 3105 java classes. We considered machine learning techniques like “random forest” (RF), “support vector regression” (SVR), and “linear regression” (LR). We also investigate performance using our ensemble model. The obtained results show that the ensemble model achieved an average of 0.12 and 0.19 “mean absolute error” (MAE) on testing with EVOSUITE and RANDOOP, respectively.

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 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.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

Notes

  1. 1.

    https://github.com/clarkware/jdepend.

  2. 2.

    https://www.bmc.com/blogs/mean-squared-error-r2-and-variance-in-regression-analysis/.

  3. 3.

    https://github.com/aametwally/Halstead-Complexity-Measures.

References

  1. Bertolino, A.: Software testing research: achievements, challenges, dreams. In: Future of Software Engineering (FOSE 2007), pp. 85–103. IEEE (2007)

    Google Scholar 

  2. Yoo, S., Harman, M.: Regression testing minimization, selection and prioritization: a survey. Softw. Test. Verif. Reliab. 22(2), 67–120 (2012)

    Article  Google Scholar 

  3. Barisal, S.K., Chauhan, S.P.S., Dutta, A., Godboley, S., Sahoo, B., Mohapatra, D.P.: BOOMPizer: minimization and prioritization of CONCOLIC based boosted MC/DC test cases. J. King Saud Univ. Comput. Inf. Sci. 2022

    Google Scholar 

  4. Fraser, G., Arcuri, A.: Evosuite: automatic test suite generation for object-oriented software. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, pp. 416–419 (2011)

    Google Scholar 

  5. Pacheco, C., Ernst, M.D.: Randoop: feedback-directed random testing for Java. In: Companion to the 22nd ACM SIGPLAN Conference on Object-Oriented Programming Systems and Applications Companion, pp. 815–816 (2007)

    Google Scholar 

  6. Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)

    Article  Google Scholar 

  7. Halstead, M.H.: Elements of Software Science (Operating and Programming Systems Series). Elsevier Science Inc., Amsterdam (1977)

    Google Scholar 

  8. Ferrer, J., Chicano, F., Alba, E.: Estimating software testing complexity. Inf. Softw. Technol. 55(12), 2125–2139 (2013)

    Article  Google Scholar 

  9. Phogat, M., Kumar, D., Murthal, D.: Testability of software system. IJCEM Int. J. Comput. Eng. Manag. 14(10) (2011)

    Google Scholar 

  10. Shaheen, M.R., Du Bousquet, L.: Is depth of inheritance tree a good cost prediction for branch coverage testing? In: First International Conference on Advances in System Testing and Validation Lifecycle, pp. 42–47 (2009)

    Google Scholar 

  11. Khanna, P.: Testability of object-oriented systems: an ahp-based approach for prioritization of metrics. In: International Conference on Contemporary Computing and Informatics (IC3I), pp. 273–281 (2014)

    Google Scholar 

  12. Du Bousquet, L.: A new approach for software testability. In: Bottaci, L., Fraser, G. (eds.) TAIC PART 2010. LNCS, vol. 6303, pp. 207–210. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15585-7_23

  13. McMinn, P., Binkley, D., Harman, M.: Empirical evaluation of a nesting testability transformation for evolutionary testing. ACM Trans. Softw. Eng. Methodol. (TOSEM) 18(3), 1–27 (2009)

    Article  Google Scholar 

  14. Scalabrino, S., Grano, G., Di Nucci, D., Oliveto, R., De Lucia, A.: Search-based testing of procedural programs: iterative single-target or multi-target approach?. In: Sarro, F., Deb, K. (eds.) SSBSE 2016. LNCS, vol. 9962, pp. 64–79. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47106-8_5

  15. Panichella, A., Kifetew, F.M., Tonella, P.: Reformulating branch coverage as a many-objective optimization problem. In: 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST), pp. 1–10. IEEE (2015)

    Google Scholar 

  16. Sammut, C., Webb, G.I.: Encyclopedia of Machine Learning. Springer, New York (2011). https://doi.org/10.1007/978-0-387-30164-8

  17. Shamshiri, S., Just, R., Rojas, J.M., Fraser, G., McMinn, P., Arcuri, A.: Do automatically generated unit tests find real faults? An empirical study of effectiveness and challenges (T). In: 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 201–211 (2015)

    Google Scholar 

  18. Grano, G., Titov, T.V., Panichella, S., Gall, H.C.: Branch coverage prediction in automated testing. J. Softw. Evolut. Process 31(9), 21–58 (2019)

    Google Scholar 

  19. Barisal, S.K., Dutta, A., Godboley, S., Sahoo, B., Mohapatra, D.P.: MC/DC guided test sequence prioritization using firefly algorithm. Evol. Intell. 14(1), 105–118 (2019)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pushkar Kishore .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Barisal, S.K., Kishore, P., Nayak, G. (2022). Source Code Features Based Branch Coverage Prediction Using Ensemble Technique. In: Mohanty, M.N., Das, S., Ray, M., Patra, B. (eds) Meta Heuristic Techniques in Software Engineering and Its Applications. METASOFT 2022. Artificial Intelligence-Enhanced Software and Systems Engineering, vol 1. Springer, Cham. https://doi.org/10.1007/978-3-031-11713-8_2

Download citation

Publish with us

Policies and ethics