1 Reply Latest reply on Dec 28, 2007 9:21 AM by ssilvert

    Reg:Examples

    pa1_9

      Hello Every one,,


      there are 3 test cases in basic hello jsf example


      wat does the 3 different examples mean to say.......



      thanks


        • 1. Re: Reg:Examples
          ssilvert

          Here is the story:

          As you probably know, there are actually four, but one is not used for testing.

          jboss-jsfunit-examples-hellojsf-webapp is the basic "Hello JSF" web application with no JSFUnit dependencies. The other three "JSFUnified" web apps depend on this web app. When working with Maven, it is recommended that you set up your tests this way so that all testing is done in a submodule that depends on the main web app. This recommendation may change once we have a Maven plugin for JSFUnit.

          jboss-jsfunit-examples-hellojsf-jsfunit is where most of the tests for JSFUnit core live. When I want to change JSFUnit core, the first thing I do is write a test in this submodule. So I use JSFUnit to drive Test-Driven Development of JSFUnit!

          jboss-jsfunit-examples-hellojsf-pathmapped simply tests JSFUnit in an environment where the FacesServlet is path-mapped instead of extension-mapped. In the early days, I was concerned that JSFUnit wouldn't work properly in a path-mapped environment. The only way to test it was to make a new web app with a path-mapped configuration in web.xml. This was never actually a problem, but I left the test in there. It doesn't contain as many tests as the extension-mapped app, but I do add tests to it sometimes when I want a sanity check against a path-mapped web app.

          jboss-jsfunit-examples-hellojsf-ant tests the "JSFUnitWAR" ant task. We are going to change the name of that ant task to "JSFUnify". This submodule tests that the ant task can be used to build a war and automatically test it using ant and JSFUnit. If you look at the pom.xml you will see an embedded ant script that does that.

          Stan