| Wiki Home: JSFUnitWithAnt [EN] |
| [Permalink] | [RSS Feed] | [RDF Feed] | [Atom Feed] | [Print] |
<target name="create.jsfunit.exploded.dir" depends="compile.test">
<path id="jsfunit.classpath">
<fileset dir="${lib.dir}/jsf-unit">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.dir}/junit">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.dir}/aspectj">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef
name="jsfunitwar"
classname="org.jboss.jsfunit.ant.JSFUnitWarTask"
classpathref="jsfunit.classpath"/>
<jsfunitwar srcfile="${exploded.dir}"
destfile="${exploded-jsfunit.dir}"
autoaddjars="true">
<!-- This is where you have compiled your jsfunit tests -->
<classes dir="${classes.test}"
includes="**/jsfunit/**/*.class">
</classes>
<TestRunner/>
</jsfunitwar>
</target>
<target name="run.full.suite">
<mkdir dir="${junit.xml.dir}" />
<junit
showoutput="yes"
fork="yes"
printsummary="yes"
haltonfailure="yes"
haltonerror="yes">
<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement location="${classes.test}" />
<pathelement location="${classes.prod}" />
</classpath>
<jvmarg value="-Dcactus.contextURL=http://${tomcat.hostname}:${tomcat.port}/${tomcat.gekko.webapp}" />
<formatter type="xml" usefile="yes" />
<test name="gekko.web.jsfunit.GekkoWebJSFFullSuite"
todir="${junit.xml.dir}"
outfile="${junit.report.file}" />
</junit>
<junitreport
todir="${junit.xml.dir}"
tofile="${junit.report.file}">
<fileset dir="${junit.xml.dir}">
<include name="*.xml" />
</fileset>
<report
todir="${junit.xml.dir}"
styledir="${lib.dir}/jsf-unit"
format="noframes" />
</junitreport>
</target>

Also, in the JSFUnit example code, there is a Maven pom that "JSFUnifies" a WAR and runs JSFUnit tests against that WAR. You can browse that example and its POM here:
http://fisheye.jboss.org/browse/JSFUnit/trunk/jboss-jsfunit-examples/jboss-jsfunit-examples-hellojsf/jboss-jsfunit-examples-hellojsf-ant
Note that right now the Ant task is called "<jsfunitwar>", but we will be changing the name to "<jsfunify>".
Referenced by:|
|
||||
|
|
||||