dmahendarkar (13) [Avatar] Offline
#1
Hi,
I am just following the junit example in the book. I was able to go through most of it easily thanks for great explanation in book. But I seem to have hit wall. can you please comment. I am posting the ant with -v
=========================
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild.xml
parsing buildfile Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild.xml with URI = file:/C:/Documents%20and%20Settings/Deepak/ewtp/maniksoftinc/WebContent/build.xml
Project base dir set to: Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContent
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
[property] Loading Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild.properties
Override ignored for property "javac.debug"
Override ignored for property "build.src.dir"
Override ignored for property "dist.dir"
Build sequence for target(s) `test-domain' is [clean, compile-domain, test-domain]
Complete build sequence is [clean, compile-domain, test-domain, cleanOutPut, build-war, notify, tables-create, ]
clean:
[delete] Deleting directory Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild
[delete] Deleting directory Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild
[delete] Deleting directory Csmilieocuments and SettingsDeepakewtpmaniksoftincdist
[delete] Deleting directory Csmilieocuments and SettingsDeepakewtpmaniksoftincdist
[mkdir] Created dir: Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild
[mkdir] Created dir: Csmilieocuments and SettingsDeepakewtpmaniksoftincdist
[mkdir] Skipping Csmilieocuments and SettingsDeepakewtpmaniksoftinc eport because it already exists.
[echo] Apache Ant version 1.7.0 compiled on December 13 2006
[echo] Java version 1.5
compile-domain:
[javac] MessageResources.properties skipped - don't know how to handle it
[javac] commaniksoftactionsCreateNewsletterAction.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftactionsCreateNewsletterAction.class is up to date.
[javac] commaniksoftactionsReadNewsletterAction.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftactionsReadNewsletterAction.class is up to date.
[javac] commaniksofteansNewsletter.hbm.xml skipped - don't know how to handle it
[javac] commaniksofteansNewsletter.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksofteansNewsletter.class is up to date.
[javac] commaniksoftuinessBusinessFacade.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftuinessBusinessFacade.class is up to date.
[javac] commaniksoftexceptionsDataAccessLayerException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsDataAccessLayerException.class is up to date.
[javac] commaniksoftexceptionsPersistenceSystemException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsPersistenceSystemException.class is up to date.
[javac] commaniksoftexceptionsUnableToClosefactoryException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsUnableToClosefactoryException.class is up to date.
[javac] commaniksoftexceptionsUnableToCreateFactoryException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsUnableToCreateFactoryException.class is up to date.
[javac] commaniksoftexceptionsUnableToCreatePropertiesException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsUnableToCreatePropertiesException.class is up to date.
[javac] commaniksoftexceptionsUnableToReadException.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftexceptionsUnableToReadException.class is up to date.
[javac] commaniksoftformsNewsletterForm.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftformsNewsletterForm.class is up to date.
[javac] commaniksoftmailFormMail.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftmailFormMail.class is up to date.
[javac] commaniksoftpersistenceAbstractDAO.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftpersistenceAbstractDAO.class is up to date.
[javac] commaniksoftpersistenceBusinessFacadeFactory.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftpersistenceBusinessFacadeFactory.class is up to date.
[javac] commaniksoftpersistenceDAOFactory.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftpersistenceDAOFactory.class is up to date.
[javac] commaniksoftpersistenceNewsletterDAO.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftpersistenceNewsletterDAO.class is up to date.
[javac] commaniksoftpersistencePersistenceCache.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftpersistencePersistenceCache.class is up to date.
[javac] commaniksoftstrutstestcasemocktestTestPositive.java omitted as Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFclassescommaniksoftstrutstestcasemocktestTestPositive.class is up to date.
[javac] factory.properties skipped - don't know how to handle it
[javac] hibernate.cfg.xml skipped - don't know how to handle it
[javac] hibernate.properties skipped - don't know how to handle it
[javac] log4j.properties skipped - don't know how to handle it
[copydir] DEPRECATED - The copydir task is deprecated. Use copy instead.
[copydir] DEPRECATED - The copydir task is deprecated. Use copy instead.
test-domain:
[junit] Implicitly adding Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant-launcher.jar;Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant.jar;Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant-junit.jar to CLASSPATH
[junit] Executing 'Csmilierogram FilesJavajre1.5.0_10injava.exe' with arguments:
[junit] '-classpath'
[junit] 'Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentWEB-INFlibjunit.jar;Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContent;Csmilierogram FilesJavajre1.5.0_10libextQTJava.zip;Csmilieocuments and SettingsDeepakMy Documents oolsmysql-connector-java-5.0.4mysql-connector-java-5.0.4-bin.jar;Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant-launcher.jar;Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant.jar;Csmilieocuments and SettingsDeepakMy Documents oolsapache-ant-1.7.0libant-junit.jar'
[junit] 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
[junit] 'com.maniksoft.strutstestcase.mocktest.TestPositive'
[junit] 'filtertrace=true'
[junit] 'haltOnError=false'
[junit] 'haltOnFailure=true'
[junit] 'formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter'
[junit] 'showoutput=false'
[junit] 'outputtoformatters=true'
[junit] 'logtestlistenerevents=true'
[junit] 'formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter,Csmilieocuments and SettingsDeepakewtpmaniksoftinc eportTEST-com.maniksoft.strutstestcase.mocktest.TestPositive.txt'
[junit] 'crashfile=Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentjunitvmwatcher1416113731.properties'
[junit] 'propsfile=Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentjunit231937731.properties'
[junit]
[junit] The ' characters around the executable and arguments are
[junit] not part of the command.
[junit] Running com.maniksoft.strutstestcase.mocktest.TestPositive
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

BUILD FAILED
Csmilieocuments and SettingsDeepakewtpmaniksoftincWebContentuild.xml:89: Test com.maniksoft.strutstestcase.mocktest.TestPositive failed
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.actOnTestResult(JUnitTask.java:1712)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:820)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657)
at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:28smilie
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:34smilie
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:129smilie
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

Total time: 1 second
dmahendarkar (13) [Avatar] Offline
#2
Re: Problems with junit.
Figured it out.
I overlooked adding my test classes to path. Rather silly smilie
~Deepak