Divide-by-Zero Exception Raising via Branch Coverage | SpringerLink
Skip to main content

Divide-by-Zero Exception Raising via Branch Coverage

  • Conference paper
Search Based Software Engineering (SSBSE 2011)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6956))

Included in the following conference series:

Abstract

In this paper, we discuss how a search-based branch coverage approach can be used to design an effective test data generation approach, specifically targeting divide-by-zero exceptions. We first propose a novel testability transformation combining approach level and branch distance. We then use different search strategies, i.e. hill climbing, simulated annealing, and genetic algorithm, to evaluate the performance of the novel testability transformation on a small synthetic example as well as on methods known to throw divide-by-zero exceptions, extracted from real world systems, namely Eclipse and Android. Finally, we also describe how the test data generation for divide-by-zero exceptions can be formulated as a constraint programming problem and compare the resolution of this problem with a genetic algorithm in terms of execution time. We thus report evidence that genetic algorithm using our novel testability transformation out-performs hill climbing and simulated annealing and a previous approach (in terms of numbers of fitness evaluation) but is out-performed by constraint programming (in terms of execution time).

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • Compact, lightweight 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Baresel, A.: Automatisierung von strukturtests mit evolutionren algorithmen. Diploma Thesis, Humboldt University, Berlin, Germany (2000)

    Google Scholar 

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

    Google Scholar 

  3. Chatterjee, R., Ryder, B.G.: Data-flow-based testing of object-oriented libraries. Tech. Rep. DCS-TR-382, Department of Computer Science, Rutgers University (1999)

    Google Scholar 

  4. Cohen, J.: Statistical power analysis for the behavioral sciences, 2nd edn. Lawrence Earlbaum Associates, Hillsdale (1988)

    MATH  Google Scholar 

  5. Romano, D., Massimiliano Di Penta, G.A.: An approach for search based testing of null pointer exceptions. In: Proceedings of the Fourth International Conference on Software Testing, Verification and Validation, pp. 160–169 (March 2011)

    Google Scholar 

  6. Harman, M., Baresel, A., Binkley, D., Hierons, R.M., Hu, L., Korel, B., McMinn, P., Roper, M.: Testability transformation – program transformation to improve testability. In: Hierons, R.M., Bowen, J.P., Harman, M. (eds.) FORTEST. LNCS, vol. 4949, pp. 320–344. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  7. Jo, J.W., Chang, B.M., Yi, K., Choe, K.M.: An uncaught exception analysis for java. Journal of System Software 72, 59–69 (2004), http://portal.acm.org/citation.cfm?id=1005486.1005491

    Article  Google Scholar 

  8. Joachim Wegener, A.B., Sthamer, H.: Evolutionary test environment for automatic structural testing. Information and Software Technology 43(14), 841–854 (2001)

    Article  Google Scholar 

  9. Jones, B., Sthamer, H., Eyres, D.: Automatic structural testing using genetic algorithms. Software Engineering Journal 11(5), 299–306 (1996)

    Article  Google Scholar 

  10. Korel, B.: Dynamic method of software test data generation. Softw. Test, Verif. Reliab. 2(4), 203–213 (1992)

    Article  Google Scholar 

  11. McMinn, P.: Search-based software test data generation: a survey. Software Testing Verification and Reliability 14(2), 105–156 (2004)

    Article  Google Scholar 

  12. Miller, W., Spooner, D.L.: Automatic generation of floating-point test data. IEEE Transactions on Software Engineering 2(3), 223–226 (1976)

    Article  MathSciNet  Google Scholar 

  13. Mresa, E.S., Bottaci, L.: Efficiency of mutation operators and selective mutation strategies: An empirical study. Software Testing Verification and Reliability 9(4), 205–232 (1999)

    Article  Google Scholar 

  14. Pressman, R.S.: Software Engineering: A Practitioner’s Approach, 3rd edn. McGraw-Hill, New York (1992)

    MATH  Google Scholar 

  15. Ryder, B.G., Smith, D.E., Kremer, U., Gordon, M.D., Shah, N.: A static study of java exceptions using JESP. In: Watt, D.A. (ed.) CC 2000. LNCS, vol. 1781, pp. 67–81. Springer, Heidelberg (2000), http://portal.acm.org/citation.cfm?id=647476.727763

    Chapter  Google Scholar 

  16. Sakti, A., Guéhéneuc, Y.G., Pesant, G.: Cp-sst: approche basée sur la programmation par contraintes pour le test structurel du logiciel. Septitièmes Journées Francophones de Programmation par Contraintes (JFPC), 289–298 (June 2011)

    Google Scholar 

  17. Saurabh Sinha, R.O., Harrold, M.J.: Automated support for development, maintenance, and testing in the presence of implicit control flow. In: ICSE 2004, pp. 336–345. IEEE Computer Society Press, Washington, DC, USA (2004)

    Google Scholar 

  18. Tracey, N., Clark, J.A., Mander, K., McDermid, J.A.: Automated test-data generation for exception conditions. Software Practice and Experience 30(1), 61–79 (2000)

    Article  Google Scholar 

  19. Tracey, N., Clark, J.A., Mander, K.: Automated program flaw finding using simulated annealing. In: ISSTA, pp. 73–81 (1998)

    Google Scholar 

  20. Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Information & Software Technology 43(14), 841–854 (2001)

    Article  Google Scholar 

  21. Wright, M.: Automating parameter choice for simulated annealing. Tech. Rep. 32, Lancaster University Management School, UK (2010)

    Google Scholar 

  22. Xanthakis, S., Ellis, C., Skourlas, C., Gall, A.L., Katsikas, S., Karapoulios, K.: Application des algorithmes genetiques au test des logiciels. In: 5th Int. Conference on Software Engineering and its Applications, pp. 625–636 (1992)

    Google Scholar 

  23. Zhang, B.T., Kim, J.J.: Comparison of selection methods for evolutionary optimization. Evolutionary Optimization 2(1), 55–70 (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bhattacharya, N., Sakti, A., Antoniol, G., Guéhéneuc, YG., Pesant, G. (2011). Divide-by-Zero Exception Raising via Branch Coverage. In: Cohen, M.B., Ó Cinnéide, M. (eds) Search Based Software Engineering. SSBSE 2011. Lecture Notes in Computer Science, vol 6956. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-23716-4_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-23716-4_19

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-23715-7

  • Online ISBN: 978-3-642-23716-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics