beehive/netui/test/ant/junitCore.xml

149 lines
6.7 KiB
XML

<?xml version="1.0"?>
<project name="Beehive/NetUI/JUnitTests" basedir=".">
<import file="netui-test-imports.xml"/>
<path id="test.classpath">
<path refid="junit-tests.dependency.path"/>
<path refid="webapp.dependency.path"/>
<path refid="junit.dependency.path"/>
<path refid="strutstestcase.dependency.path"/>
<path refid="servlet.dependency.path"/>
</path>
<path id="compiler-tests-dependency.path">
<path refid="netui-compiler.dependency.path"/>
<path refid="webapp.dependency.path"/>
<path refid="velocity.dependency.path"/>
<path refid="servlet.dependency.path"/>
</path>
<target name="run.tests">
<fail unless="formatter.type" message="Unspecified value for formatter.type"/>
<fail unless="testout.dir" message="Unspecified value for testout.dir"/>
<fail unless="fail" message="Unspecified value for fail"/>
<property name="classpath" refid="test.classpath"/>
<echo>test.classpath: ${classpath}</echo>
<property name="show.output" value="false"/>
<condition property="log4j.config" value="${log4jconfig.verbose.junit}">
<not><isset property="log4j.quiet"/></not>
</condition>
<condition property="log4j.config" value="${log4jconfig.junit}">
<and><isset property="log4j.quiet"/></and>
</condition>
<echo>Log4J Config: ${log4j.config}</echo>
<echo>Test Output Directory: ${testout.dir}</echo>
<mkdir dir="${testout.dir}"/>
<junit printsummary="true" fork="${fail}" haltonfailure="${fail}" haltonerror="${fail}" showOutput="${show.output}">
<jvmarg value="-ea"/>
<!-- Setting the production-mode flag to true will cause unresolvable actions to send
a 404 response instead of the nice dev-mode error pages, which is what we want
to happen here. -->
<jvmarg value="-Dbeehive.productionmode=true"/>
<classpath refid="test.classpath"/>
<formatter type="${formatter.type}"/>
<sysproperty key="log4j.configuration" value="file:${log4j.config}"/>
<sysproperty key="netuidrt.logdir" path="${testout.dir}"/>
<test name="org.apache.beehive.netui.test.util.type.TypeUtilsTest" todir="${testout.dir}"/>
<test name="org.apache.beehive.netui.test.util.iterator.IteratorFactoryTest" todir="${testout.dir}"/>
<batchtest fork="yes" todir="${testout.dir}">
<fileset dir="${test.classes.dir}/junitTests">
<include name="org/apache/beehive/netui/test/core/**/*Test.class"/>
<include name="org/apache/beehive/netui/test/util/config/**/*Test.class"/>
<include name="org/apache/beehive/netui/test/script/el/**/*Test.class"/>
<include name="org/apache/beehive/netui/test/pageflow/**/*Test.class"/>
<include name="org/apache/beehive/netui/test/datagrid/**Test.class"/>
<include name="org/apache/beehive/netui/test/nameservice/**Test.class"/>
</fileset>
</batchtest>
<test name="org.apache.beehive.netui.test.databinding.expression.IndexedNameTest" todir="${testout.dir}"/>
<test name="org.apache.beehive.netui.test.script.simpleaction.InternalExpressionUtilsTest" todir="${testout.dir}"/>
</junit>
<echo>Generating a test report into: ${testout.dir}/html</echo>
<mkdir dir="${testout.dir}/html"/>
<!-- build a report -->
<junitreport todir="${testout.dir}/">
<fileset dir="${testout.dir}/">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${testout.dir}/html"/>
</junitreport>
</target>
<target name="run.compiler.tests">
<fail unless="formatter.type" message="Unspecified value for formatter.type"/>
<fail unless="testout.dir" message="Unspecified value for testout.dir"/>
<fail unless="fail" message="Unspecified value for fail"/>
<property file="compiler-test.properties"/>
<path id="compiler.test.classpath">
<path refid="junit.dependency.path"/>
<path refid="compiler-test.dependency.path"/>
<path refid="commons-logging.dependency.path"/>
<path refid="log4j.dependency.path"/>
</path>
<mkdir dir="${testout.dir}"/>
<condition property="log4j.config" value="${log4jconfig.verbose.junit}">
<not><isset property="log4j.quiet"/></not>
</condition>
<condition property="log4j.config" value="${log4jconfig.junit}">
<and><isset property="log4j.quiet"/></and>
</condition>
<echo>Log4J Config: ${log4j.config}</echo>
<echo>Test Output Directory: ${testout.dir}</echo>
<property name="compiler-tests.classpath" refid="compiler-tests-dependency.path"/>
<junit printsummary="true" fork="${fail}" haltonfailure="${fail}" haltonerror="${fail}" showOutput="true">
<jvmarg value="-ea"/>
<classpath refid="compiler.test.classpath"/>
<formatter type="${formatter.type}"/>
<!-- compiler test properties -->
<sysproperty key="log4j.configuration" value="file:${log4j.config}"/>
<sysproperty key="netuidrt.logdir" path="${testout.dir}"/>
<sysproperty key="compiler.test.home" path="${compiler.test.home}"/>
<sysproperty key="included.test.list" value="${included.test.list}"/>
<sysproperty key="excluded.test.list" value="${excluded.test.list}"/>
<sysproperty key="testsuite.dir" path="${testsuite.dir}"/>
<sysproperty key="compiler-tests.classpath" path="${compiler-tests.classpath}"/>
<sysproperty key="test.output.dir" path="${testout.dir}"/>
<!-- end of compiler properties -->
<test name="org.apache.beehive.netui.test.compiler.PageFlowCompilerTest" todir="${testout.dir}"/>
</junit>
<echo>Generating a test report into: ${testout.dir}/html</echo>
<mkdir dir="${testout.dir}/html"/>
<!-- build a report -->
<junitreport todir="${testout.dir}/">
<fileset dir="${testout.dir}/">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${testout.dir}/html"/>
</junitreport>
</target>
<target name="run.test">
<fail unless="test.name" message="No test specified, set the -Dtest.name=&lt;name&gt; property"/>
<java classpathref="test.classpath" classname="${test.name}"/>
</target>
</project>