O'Reilly logo

JSF 2.0 Cookbook by Anghel Leonard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing JSF applications with JSFUnit

In this recipe, we will discuss the JSFUnit, which is a JBoss framework for testing JSF applications. JSFUnit is based on the well known JUnit framework, but is more dedicated to JSF, because it runs in the container and it was created for understanding the main JSF concepts, such as JSF lifecycle, JSF components, Faces Context, EL expressions, and so on.

To describe it in detail, JSFUnit can be used for the following tests (as you can conclude from the following list, JSUnit can test JSF-specific tasks and more):

  • Managed beans
  • Navigation rules
  • Invalid input
  • View components
  • Application configuration
  • Anything else

Getting ready

We developed this recipe with NetBeans 6.8, JSF 2.0, and GlassFish v3. The JSF 2.0 classes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required