views:

24

answers:

0

Hi. i am trying to run and publish my junit tests in html using a build.xml file calling the junit target but it doesnt seem to work.

here is how my build.xml looks like:

<target name="Unity Agent SDK Test ">
    <mkdir dir="${junit.output.dir}" />
    <echo message="making directory" />
    <junit fork="yes" printsummary="yes">
        <formatter type="xml" />
        <test name="com.kc.AllTests" todir="${junit.output.dir}" />
        <test name="com.kc.unity.agent.util.ActivityOneTestcase" todir="${junit.output.dir}" />
        <test name="com.kc.unity.agent.util.FaceBookRestManagerTestCase" todir="${junit.output.dir}" />
        <test name="com.kc.unity.agent.util.OAuthManagerTestCase" todir="${junit.output.dir}" />

        <classpath refid="Unity Agent SDK Test.classpath" />

        <bootclasspath>
            <path refid="run.Unity Agent SDK Test (1).bootclasspath" />
        </bootclasspath>
    </junit>
    <echo message="junit finished" />
</target>
<target name="junitreport">
    <junitreport todir="${junit.output.dir}">
        <fileset dir="${junit.output.dir}">
            <include name="TEST-*.xml" />
        </fileset>
        <report format="frames" todir="${junit.output.dir}" />
    </junitreport>
</target>

Here is the error i get:

Unity Agent SDK Test : [echo] making directory [junit] Exception in thread "main" java.lang.RuntimeException: Stub! [junit] at junit.framework.TestResult.(TestResult.java:4) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:315) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)

BUILD FAILED C:\xxxxxxxxx\Android\Projects\Unity Agent SDK Test\build.xml:85: java.lang.RuntimeException: Stub!

Total time: 1 second