22. Integration Testing

Unit tests are useful, but they have limitations. By definition, unit tests focus on POJOs and their methods. All the mock infrastructure was there to make it possible to test those POJOs in relative isolation. That means we do not get to test whether the POJO interacts correctly with the framework itself. For instance, how do you test whether an outjected component has the correct value in Seam runtime context? How do you know that the JSF interactions and EL expressions have the desired effects? Here is where we need integration testing to test live POJOs inside the Seam and JSF runtime. Unlike the white-box unit tests, the integration tests test the application from the user’s point of view.

Integration tests can also ...

Get JBoss® Seam: Simplicity and Power Beyond Java™ EE 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.