Skip to main content

A Tool to Automatically Detect Defects in C++ Programs

  • Conference paper
Intelligent Information Technology (CIT 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3356))

Included in the following conference series:

  • 765 Accesses

Abstract

In this work a tool is developed to generate test cases automatically for C++ programs. This approach analyses the prototypes. When data type differs, the compiler raises a warning and implicitly converts and performs the operation. This may affect further computations in number crunching applications. So, the tool checks the data type of the actual parameters and formal parameters for a exact match. If a match doesn’t occur, the tool reports this situation. This implementation is mainly focused to detect defects in the program. A defect results due to omission or mismanipulation. This work checks the correctness of the program when operator [] is overloaded. In the context of inheritance when virtual function is used, it has been observed that expected results are not achieved under certain circumstances. A test case has been developed to handle this situation and prepared to ascertain the working of template functions in the context of character input, to tackle dangling reference problem and to ascertain the working of the program, in the context of exception handling.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • 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.

References

  1. Rothermel, G., Harrold, M.J., Dedhia, J.: Regression Test Selection for C++ Software. Journal of Software Testing and Reliability 10, 1–35 (2000)

    Article  Google Scholar 

  2. Beizer, B.: Software-testing techniques. Van Nostrand Reinhold, New York (1990)

    Google Scholar 

  3. Younessi, H.: Object -Oriented Defect Management of Software. Prentice Hall, USA (2002)

    Google Scholar 

  4. Edward, K.: Software Testing in the Real World. Addison-Wesley, Reading (1995)

    Google Scholar 

  5. Myers, G.J.: The Art of Software Testing. John Wiley & Sons, Chichester (1979)

    Google Scholar 

  6. Antoniol, G., Briand, L.C., Penta, M.D., Labiche, Y.: A case study using the round trip strategy for state based class testing. Technical Report, Research Centre on Software Technology, 1–10 (2002)

    Google Scholar 

  7. Delamaro, M.E., Maldonado, J.C., Mathur, A.P.: Interface Mutation: An Approach for Integration Testing. IEEE Transactions on Software Engineering 27, 228–248 (2001)

    Article  Google Scholar 

  8. Souter, A.L., Pollock, L.: A Strategy for Testing Object Oriented Software. In: ACM International Symposium on Software Testing and Analysis, Portland, pp. 49–59 (2000)

    Google Scholar 

  9. Kim, Y.G., Hong, H.S., Bae, D.H., Cha, S.D.: Test Case Generation from UML State Diagrams. IEE Proceedings on Software 4 (1999)

    Google Scholar 

  10. Doong, R.K., Frankl, P.G.: The ASTOOT approach to testing object oriented programs. ACM Transactions on Software Engineering and Methodology 3, 101–130 (1994)

    Article  Google Scholar 

  11. Harrold, M.J., Rothermel, G.: Performing data flow testing on classes. ACM Software Engineering Notes 19, 154–163 (1994)

    Article  Google Scholar 

  12. McGregor, J.D., Harrold, M.J., Fitzpatrick, K.J.: Incremental Testing of Object Oriented class structures. In: 14th IEEE International Conference on Software Engineering, pp. 68–80. IEEE Computer Society, Los Alamitos (1992)

    Google Scholar 

  13. Tse, T.H., Xu, Z.: Test Case Generation For Class Level Object-Oriented Testing. In: Quality Process Convergence: Proceedings of 9th International software Quality Week, California, pp. 1–12 (1996)

    Google Scholar 

  14. Korel, B.: Automated test data generation for Programs with Procedures. In: ACM International Symposium on Software Testing and Analysis, USA, pp. 209–215 (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sarala, S., Valli, S. (2004). A Tool to Automatically Detect Defects in C++ Programs. In: Das, G., Gulati, V.P. (eds) Intelligent Information Technology. CIT 2004. Lecture Notes in Computer Science, vol 3356. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30561-3_32

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30561-3_32

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-24126-3

  • Online ISBN: 978-3-540-30561-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics