5 Replies Latest reply on May 27, 2009 3:45 PM by utish raj

    Setting up a JSFUnit project

    utish raj Newbie

      Created a JSF project in Eclipse. Added all the jars as described here.

      http://www.jboss.org/jsfunit/gettingstarted.html

      Also included the entries in web.xml and the included the cactus-report.xsl in the root of WAR.

      Wrote an ant script which generates a WAR with JSFUnit dependencies as described here.

      http://www.jboss.org/community/wiki/JSFUnitWithAnt

      Here is my snippet from build.xml

      
      <delete file="${exploded-jsfunit.dir}/${project.distname}.war"/>
      
       <target name="create.jsfunit.exploded.dir" depends="deploy">
       <path id="jsfunit.classpath">
       <fileset dir="${webinf.dir}/lib">
       <include name="*.jar"></include>
       </fileset>
       </path>
      
       <taskdef
       name="jsfunitwar"
       classname="org.jboss.jsfunit.ant.JSFUnitWarTask"
       classpathref="jsfunit.classpath"></taskdef>
      
       <jsfunitwar srcfile="${deploy.dir}/${project.distname}.war"
       destfile="${exploded-jsfunit.dir}/${project.distname}.war"
       autoaddjars="true">
      
       <!-- This is where you have compiled your jsfunit tests -->
       <classes dir="${classes.test}"
       includes="**/*.class">
       </classes>
      
       <TestRunner></TestRunner>
       </jsfunitwar>
       </target>
      
      


      I'm actually able to deploy the generated WAR with JSFUnit dependencies and actually run a JUnit tester as described here:

      http://www.jboss.org/community/wiki/UsingJSFUnitwithEclipse

      My problem is I'm unable to see the test reports in the browser when I poin to the URL as follows:

      http://localhost:8080/myjsfapp/ServletTestRunner?suite=com.foo.JSFUnitTest&xsl=cactus-report.xsl

      I cannot see the report in the browser as described here (but the test runs):

      http://www.jboss.org/jsfunit/gettingstarted.html

      Any idea what I could be missing in this setup?

      Thanks in advance.