在ant中,我的单元测试没有错误消息



我从零开始编写ant脚本已经有一段时间了,我正在努力完成我的junit任务。

现在我有一个类和一个单元测试。以下是我构建的整个输出:

Buildfile: /home/thomash/workspace3/model/build.xml
init:
compile:
compile-test:
test:
    [junit] Running com.corrisoft.air.model.EntityObjectTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.007 sec
BUILD FAILED
/home/thomash/workspace3/model/build.xml:65: Test com.corrisoft.air.model.EntityObjectTest failed
Total time: 254 milliseconds

如果没有额外的信息,我不确定如何确定为什么我的测试失败。下面是ant构建文件:

<target name="test" depends="compile-test">
    <junit printsummary="withOutAndErr" haltonfailure="yes">
        <classpath refid="compile.classpath" />
        <classpath>
            <fileset dir="${dir.dist}">
                <include name="*.jar" />
            </fileset>
            <pathelement location="${dir.build.classes}"/>
        </classpath>
        <batchtest>
            <fileset dir="${dir.src.test}">
              <include name="**/*Test*.java"/>
            </fileset>
        </batchtest>
    </junit>
</target>

因为它指定了我的junit测试的整个路径,我猜它发现它是正确的,所以这不是问题。

所以我运行-debug -verbose来获得更好的错误信息。我什么也看不见,但我还是把所有的信息都发了出来。

test:
    [junit] Couldn't find junit/framework/TestCase.class
    [junit] Found /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-launcher.jar
    [junit] Found /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant.jar
    [junit] Found /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar
    [junit] Found /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit4.jar
fileset: Setup scanner in dir /home/thomash/workspace3/model/lib with patternSet{ includes: [*.jar] excludes: [] }
fileset: Setup scanner in dir /home/thomash/workspace3/model/build-lib with patternSet{ includes: [*.jar] excludes: [] }
fileset: Setup scanner in dir /home/thomash/workspace3/model/dist with patternSet{ includes: [*.jar] excludes: [] }
Finding class junit.framework.Test
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/Test.class
Class java.lang.Object loaded from parent loader (parentFirst)
Class junit.framework.Test loaded from ant loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirrorImpl
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskMirrorImpl.class
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror loaded from parent loader (parentFirst)
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror$SummaryJUnitResultFormatterMirror loaded from parent loader (parentFirst)
Class java.lang.ClassLoader loaded from parent loader (parentFirst)
Class org.apache.tools.ant.AntClassLoader loaded from parent loader (parentFirst)
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror$JUnitTestRunnerMirror loaded from parent loader (parentFirst)
Class java.lang.Throwable loaded from parent loader (parentFirst)
Finding class junit.framework.AssertionFailedError
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/AssertionFailedError.class
Class java.lang.AssertionError loaded from parent loader (parentFirst)
Class junit.framework.AssertionFailedError loaded from ant loader (parentFirst)
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask loaded from parent loader (parentFirst)
fileset: Setup scanner in dir /home/thomash/workspace3/model/src/test/java with patternSet{ includes: [**/*Test*.java] excludes: [] }
    [junit] Using System properties {java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/opt/jdk1.8.0/jre/lib/amd64, java.vm.version=25.0-b70, ant.library.dir=/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/home/thomash/workspace3/model, java.runtime.version=1.8.0-b132, java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment, java.endorsed.dirs=/opt/jdk1.8.0/jre/lib/endorsed, os.arch=amd64, java.io.tmpdir=/tmp, line.separator=
    [junit] , java.vm.specification.vendor=Oracle Corporation, os.name=Linux, ant.home=/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030, sun.jnu.encoding=UTF-8, java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.45/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.45/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.45/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib:/opt/eclipse-kepler/configuration/org.eclipse.osgi/bundles/435/1/.cp, java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=3.2.0-60-generic, user.home=/home/thomash, user.timezone=America/New_York, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, java.class.path=/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-antlr.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-bcel.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-bsf.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-log4j.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-oro.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-regexp.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-resolver.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-apache-xalan2.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-commons-logging.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-commons-net.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-jai.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-javamail.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-jdepend.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-jmf.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-jsch.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit4.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-launcher.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-netrexx.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-swing.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-testutil.jar:/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant.jar:/opt/eclipse-kepler/configuration/org.eclipse.osgi/bundles/351/1/.cp/lib/antdebug.jar:/opt/eclipse-kepler/configuration/org.eclipse.osgi/bundles/351/1/.cp/lib/remote.jar:/opt/eclipse-kepler/configuration/org.eclipse.osgi/bundles/352/1/.cp/lib/remoteAnt.jar:/opt/java8/lib/tools.jar:/opt/eclipse-kepler/plugins/org.eclipse.swt.gtk.linux.x86_64_3.102.1.v20140206-1358.jar, user.name=thomash, java.vm.specification.version=1.8, sun.java.command=org.eclipse.ant.internal.launching.remote.InternalAntRunner -debug -verbose -Dorg.eclipse.ant.core.ANT_PROCESS_ID=1395833172397 -Declipse.connect.port=40388 -Declipse.pdebuild.home=/opt/eclipse-kepler/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/.// -Declipse.pdebuild.scripts=/opt/eclipse-kepler/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts// -Declipse.pdebuild.templates=/opt/eclipse-kepler/plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/templates// -Dant.home=/opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030 -logger org.eclipse.ant.internal.launching.remote.logger.RemoteAntBuildLogger -inputhandler org.eclipse.ant.internal.ui.antsupport.inputhandler.ProxyInputHandler -buildfile /home/thomash/workspace3/model/build.xml, java.home=/opt/jdk1.8.0/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.X11.XToolkit, java.vm.info=mixed mode, java.version=1.8.0, java.ext.dirs=/opt/jdk1.8.0/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/opt/jdk1.8.0/jre/lib/resources.jar:/opt/jdk1.8.0/jre/lib/rt.jar:/opt/jdk1.8.0/jre/lib/sunrsasign.jar:/opt/jdk1.8.0/jre/lib/jsse.jar:/opt/jdk1.8.0/jre/lib/jce.jar:/opt/jdk1.8.0/jre/lib/charsets.jar:/opt/jdk1.8.0/jre/lib/jfr.jar:/opt/jdk1.8.0/jre/classes, java.vendor=Oracle Corporation, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=gnome, sun.cpu.isalist=}
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.class
Finding class junit.framework.TestListener
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/TestListener.class
Class junit.framework.TestListener loaded from ant loader (parentFirst)
Class java.lang.ClassNotFoundException loaded from parent loader (parentFirst)
Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
Class java.lang.Class loaded from parent loader (parentFirst)
Class java.io.IOException loaded from parent loader (parentFirst)
Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
Class java.lang.IllegalArgumentException loaded from parent loader (parentFirst)
Class java.lang.String loaded from parent loader (parentFirst)
Class java.io.InputStream loaded from parent loader (parentFirst)
Class java.io.FileInputStream loaded from parent loader (parentFirst)
Class java.util.Hashtable loaded from parent loader (parentFirst)
Class java.util.Properties loaded from parent loader (parentFirst)
Class java.io.Reader loaded from parent loader (parentFirst)
Class java.io.FileReader loaded from parent loader (parentFirst)
Class java.io.BufferedReader loaded from parent loader (parentFirst)
Class java.io.Writer loaded from parent loader (parentFirst)
Class java.io.FileWriter loaded from parent loader (parentFirst)
Class java.lang.Exception loaded from parent loader (parentFirst)
Class java.io.StringWriter loaded from parent loader (parentFirst)
Class java.io.StringReader loaded from parent loader (parentFirst)
Class java.io.BufferedWriter loaded from parent loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.class
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror$JUnitResultFormatterMirror loaded from parent loader (parentFirst)
Class java.io.OutputStream loaded from parent loader (parentFirst)
Class java.io.ByteArrayOutputStream loaded from parent loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$1
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner$1.class
Class java.io.PrintStream loaded from parent loader (parentFirst)
Class org.apache.tools.ant.util.TeeOutputStream loaded from parent loader (parentFirst)
Class java.util.Vector loaded from parent loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.class
Class java.text.NumberFormat loaded from parent loader (parentFirst)
Finding class junit.framework.TestResult
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/TestResult.class
Class junit.framework.TestResult loaded from ant loader (parentFirst)
Finding class junit.framework.Protectable
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/Protectable.class
Class junit.framework.Protectable loaded from ant loader (parentFirst)
Class java.util.List loaded from parent loader (parentFirst)
Class java.lang.ThreadDeath loaded from parent loader (parentFirst)
Class java.util.Collection loaded from parent loader (parentFirst)
Class java.util.ArrayList loaded from parent loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner$3
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner$3.class
Class org.apache.tools.ant.taskdefs.optional.junit.JUnitTest loaded from parent loader (parentFirst)
Finding class com.corrisoft.air.model.EntityObjectTest
Loaded from /home/thomash/workspace3/model/build/classes com/corrisoft/air/model/EntityObjectTest.class
Class com.corrisoft.air.model.EntityObjectTest loaded from ant loader (parentFirst)
Class java.util.Calendar loaded from parent loader (parentFirst)
Class java.util.GregorianCalendar loaded from parent loader (parentFirst)
Finding class junit.framework.TestCase
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/TestCase.class
Finding class junit.framework.Assert
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/Assert.class
Class junit.framework.Assert loaded from ant loader (parentFirst)
Class junit.framework.TestCase loaded from ant loader (parentFirst)
Finding class junit.framework.ComparisonFailure
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/ComparisonFailure.class
Class junit.framework.ComparisonFailure loaded from ant loader (parentFirst)
Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
Class java.lang.annotation.Annotation loaded from parent loader (parentFirst)
Finding class junit.framework.JUnit4TestAdapter
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/JUnit4TestAdapter.class
Finding class org.junit.runner.manipulation.Filterable
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/manipulation/Filterable.class
Class org.junit.runner.manipulation.Filterable loaded from ant loader (parentFirst)
Finding class org.junit.runner.manipulation.Sortable
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/manipulation/Sortable.class
Class org.junit.runner.manipulation.Sortable loaded from ant loader (parentFirst)
Finding class org.junit.runner.Describable
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/Describable.class
Class org.junit.runner.Describable loaded from ant loader (parentFirst)
Class junit.framework.JUnit4TestAdapter loaded from ant loader (parentFirst)
Finding class junit.framework.JUnit4TestAdapterCache
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/JUnit4TestAdapterCache.class
Class java.util.HashMap loaded from parent loader (parentFirst)
Class junit.framework.JUnit4TestAdapterCache loaded from ant loader (parentFirst)
Class java.lang.reflect.Constructor loaded from parent loader (parentFirst)
Finding class org.junit.runner.notification.RunListener
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunListener.class
Class org.junit.runner.notification.RunListener loaded from ant loader (parentFirst)
Finding class junit.framework.JUnit4TestAdapterCache$1
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/JUnit4TestAdapterCache$1.class
Class junit.framework.JUnit4TestAdapterCache$1 loaded from ant loader (parentFirst)
Finding class org.junit.runner.Request
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/Request.class
Class org.junit.runner.Request loaded from ant loader (parentFirst)
Finding class org.junit.runners.model.InitializationError
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runners/model/InitializationError.class
Class org.junit.runners.model.InitializationError loaded from ant loader (parentFirst)
Finding class org.junit.runners.model.RunnerBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runners/model/RunnerBuilder.class
Class org.junit.runners.model.RunnerBuilder loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.AllDefaultPossibilitiesBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/AllDefaultPossibilitiesBuilder.class
Class org.junit.internal.builders.AllDefaultPossibilitiesBuilder loaded from ant loader (parentFirst)
Class java.lang.RuntimeException loaded from parent loader (parentFirst)
Finding class org.junit.internal.requests.ClassRequest
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/requests/ClassRequest.class
Class org.junit.internal.requests.ClassRequest loaded from ant loader (parentFirst)
Finding class org.junit.runner.Runner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/Runner.class
Class org.junit.runner.Runner loaded from ant loader (parentFirst)
Finding class org.junit.internal.runners.ErrorReportingRunner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/runners/ErrorReportingRunner.class
Class org.junit.internal.runners.ErrorReportingRunner loaded from ant loader (parentFirst)
Finding class org.junit.internal.requests.SortingRequest
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/requests/SortingRequest.class
Class org.junit.internal.requests.SortingRequest loaded from ant loader (parentFirst)
Finding class org.junit.internal.requests.FilterRequest
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/requests/FilterRequest.class
Class org.junit.internal.requests.FilterRequest loaded from ant loader (parentFirst)
Finding class org.junit.runner.Request$1
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/Request$1.class
Class org.junit.runner.Request$1 loaded from ant loader (parentFirst)
Class java.util.Set loaded from parent loader (parentFirst)
Finding class org.junit.internal.builders.SuiteMethodBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/SuiteMethodBuilder.class
Class org.junit.internal.builders.SuiteMethodBuilder loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.NullBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/NullBuilder.class
Class org.junit.internal.builders.NullBuilder loaded from ant loader (parentFirst)
Class java.util.HashSet loaded from parent loader (parentFirst)
Finding class org.junit.internal.builders.IgnoredBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/IgnoredBuilder.class
Class org.junit.internal.builders.IgnoredBuilder loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.IgnoredClassRunner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/IgnoredClassRunner.class
Class org.junit.internal.builders.IgnoredClassRunner loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.AnnotatedBuilder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/AnnotatedBuilder.class
Class org.junit.internal.builders.AnnotatedBuilder loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.JUnit3Builder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/JUnit3Builder.class
Class org.junit.internal.builders.JUnit3Builder loaded from ant loader (parentFirst)
Finding class org.junit.internal.runners.JUnit38ClassRunner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/runners/JUnit38ClassRunner.class
Class org.junit.internal.runners.JUnit38ClassRunner loaded from ant loader (parentFirst)
Finding class org.junit.internal.builders.JUnit4Builder
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/builders/JUnit4Builder.class
Class org.junit.internal.builders.JUnit4Builder loaded from ant loader (parentFirst)
Finding class org.junit.runners.BlockJUnit4ClassRunner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runners/BlockJUnit4ClassRunner.class
Finding class org.junit.runners.ParentRunner
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runners/ParentRunner.class
Class org.junit.runners.ParentRunner loaded from ant loader (parentFirst)
Class org.junit.runners.BlockJUnit4ClassRunner loaded from ant loader (parentFirst)
Class java.util.Arrays loaded from parent loader (parentFirst)
Class java.util.Iterator loaded from parent loader (parentFirst)
Finding class org.junit.Ignore
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/Ignore.class
Class org.junit.Ignore loaded from ant loader (parentFirst)
Finding class org.junit.runner.RunWith
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/RunWith.class
Class org.junit.runner.RunWith loaded from ant loader (parentFirst)
Finding class org.junit.runner.manipulation.NoTestsRemainException
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/manipulation/NoTestsRemainException.class
Class org.junit.runner.manipulation.NoTestsRemainException loaded from ant loader (parentFirst)
Finding class org.junit.runner.notification.StoppedByUserException
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/StoppedByUserException.class
Class org.junit.runner.notification.StoppedByUserException loaded from ant loader (parentFirst)
Finding class org.junit.internal.AssumptionViolatedException
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/AssumptionViolatedException.class
Finding class org.hamcrest.SelfDescribing
Finding class org.junit.internal.runners.InitializationError
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/internal/runners/InitializationError.class
Class org.junit.internal.runners.InitializationError loaded from ant loader (parentFirst)
Class java.lang.System loaded from parent loader (parentFirst)
Class java.lang.StringBuffer loaded from parent loader (parentFirst)
    [junit] Running com.corrisoft.air.model.EntityObjectTest
Finding class org.junit.runner.Description
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/Description.class
Class java.io.Serializable loaded from parent loader (parentFirst)
Class org.junit.runner.Description loaded from ant loader (parentFirst)
Class java.lang.CharSequence loaded from parent loader (parentFirst)
Class java.util.regex.Pattern loaded from parent loader (parentFirst)
Finding class org.junit.runner.notification.RunNotifier
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunNotifier.class
Class org.junit.runner.notification.RunNotifier loaded from ant loader (parentFirst)
Class java.util.Collections loaded from parent loader (parentFirst)
Finding class org.junit.runner.notification.RunNotifier$3
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunNotifier$3.class
Finding class org.junit.runner.notification.RunNotifier$SafeNotifier
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunNotifier$SafeNotifier.class
Class org.junit.runner.notification.RunNotifier$SafeNotifier loaded from ant loader (parentFirst)
Class org.junit.runner.notification.RunNotifier$3 loaded from ant loader (parentFirst)
Finding class junit.framework.JUnit4TestCaseFacade
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/JUnit4TestCaseFacade.class
Class junit.framework.JUnit4TestCaseFacade loaded from ant loader (parentFirst)
Finding class org.apache.tools.ant.taskdefs.optional.junit.JUnitVersionHelper
Loaded from /opt/eclipse-kepler/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.class
Class java.lang.reflect.Method loaded from parent loader (parentFirst)
Finding class org.junit.runner.notification.Failure
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/Failure.class
Class org.junit.runner.notification.Failure loaded from ant loader (parentFirst)
Finding class org.junit.runner.notification.RunNotifier$4
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunNotifier$4.class
Class org.junit.runner.notification.RunNotifier$4 loaded from ant loader (parentFirst)
Finding class junit.framework.TestFailure
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar junit/framework/TestFailure.class
Class junit.framework.TestFailure loaded from ant loader (parentFirst)
Finding class org.junit.runner.notification.RunNotifier$7
Loaded from /home/thomash/workspace3/model/build-lib/junit-4.11.jar org/junit/runner/notification/RunNotifier$7.class
Class org.junit.runner.notification.RunNotifier$7 loaded from ant loader (parentFirst)
Class java.util.Enumeration loaded from parent loader (parentFirst)
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.012 sec
BUILD FAILED
/home/thomash/workspace3/model/build.xml:65: Test com.corrisoft.air.model.EntityObjectTest failed
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.actOnTestResult(JUnitTask.java:1954)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:854)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1899)
    at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:800)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:392)
    at org.apache.tools.ant.Target.performTasks(Target.java:413)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)

在这里找到了答案:JUnit没有给出关于"错误"的信息

所以我添加了一个格式化器到我的junit任务,一切都很好:

        <formatter type="plain" usefile="false"/>

相关内容

  • 没有找到相关文章

最新更新