Skip to main content

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

Included in the following conference series:

  • 1106 Accesses

Abstract

Testing Java Native Interface (JNI) code is a complex undertaking with many pitfalls. This paper shows how to test Java code that calls C / C++ code. The design presented uses mock objects on both sides of the JNI layer to achieve a clean, reusable test design. It shows that the benefits of being able to test all JNI code will outweigh the extra effort in defining mock objects on both sides.

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. Gordon, R., McClellan, A.: Essential JNI: Java Native Interface. Prentice-Hall, Englewood Cliffs (1998)

    Google Scholar 

  2. Liang, S.: Java Native Interface: Programmer’s Guide and Specification. Addison-Wesley, Reading (1999)

    Google Scholar 

  3. Mackinnon, T., Freeman, S., Craig, P.: EndoTesting: Unit Testing with Mock Objects. In: eXtreme Programming and Flexible Processes in Software Engineering - XP2000 (May 2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wenner, R. (2003). JNI Testing. In: Maurer, F., Wells, D. (eds) Extreme Programming and Agile Methods - XP/Agile Universe 2003. XP/Agile Universe 2003. Lecture Notes in Computer Science, vol 2753. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45122-8_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-45122-8_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40662-4

  • Online ISBN: 978-3-540-45122-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics