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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gordon, R., McClellan, A.: Essential JNI: Java Native Interface. Prentice-Hall, Englewood Cliffs (1998)
Liang, S.: Java Native Interface: Programmer’s Guide and Specification. Addison-Wesley, Reading (1999)
Mackinnon, T., Freeman, S., Craig, P.: EndoTesting: Unit Testing with Mock Objects. In: eXtreme Programming and Flexible Processes in Software Engineering - XP2000 (May 2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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