© Alexandru Jecan  2017

Alexandru Jecan, Java 9 Modularity Revealed, https://doi.org/10.1007/978-1-4842-2713-8_11

11. Testing Modular Applications

Alexandru Jecan

(1)Munich, Germany

By now, you should have a deep overview of Project Jigsaw and should be able to start using use it in your projects. But there’s one important topic we haven’t mentioned yet: unit testing. This chapter focuses on unit testing modular applications in Java 9 and the different approaches to it that you can take. In this chapter, we’ll show you some best practices for performing unit testing in Java 9 in the context of a modular application.

Suppose we have a module with classes that need to be tested. If we put the unit test classes in another module, then we need to make ...

Get Java 9 Modularity Revealed: Project Jigsaw and Scalable Java Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.