You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Erik Hatcher <li...@ehatchersolutions.com> on 2003/08/14 18:39:58 UTC

junit failures

Hi, I'm new to tapestry-dev as of a few minutes ago.  We are embarking  
on a fairly aggressive schedule to build several apps using Tapestry  
and I'm trying to come up to speed as quickly as possible.  I want our  
usage of Tapestry to include unit testing, so I wanted to see how  
Tapestry itself was tested.

I just grabbed the latest Tapestry source code and after jumping  
through some hurdles to make it build successfully, I tried to run the  
unit tests.  This involved more hurdles like getting jython and JDOM  
added.

Are both of those licensed such that we cannot check them into the  
Tapestry CVS?  I suspect at least JDOM is fair game to put there, so  
I'd recommend it.

Also, until I copied junit.jar to lib/ext, I was unable to run 'ant  
junit'.  *arg* (perhaps at the very least put ${ant.home}/lib/junit.jar  
in the classpath for the testing tasks) - the build/test process was a  
bit more painful than it should have been (and yes, I'll volunteer to  
help fix things).  I also had to swap the order of <path> definitions  
in junit/build.xml of base.classpath and compile-tests.classpath,  
otherwise an error was reported (I'm running Ant 1.6alpha, although I'm  
sure the order is incorrect in any Ant version).

Why are you using <java> to run JUnit rather than the <junit> task  
itself?

Ok, all build/test issues aside, I got three test failures:

      [java] There were 3 failures:
      [java] 1)  
TestAutoParameters.xml(org.apache.tapestry.junit.mock.MockTestCase)junit 
.framework.AssertionFailedError: Request #2/boolValue: Response does  
not contain string 'boolValue: [false]'.
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockTester.java 
:659)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeOutputAssertions(MockTe 
ster.java:558)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeAssertions(MockTester.j 
ava:410)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeRequest(MockTester.java 
:228)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCase.java:90 
)
      [java] 2)  
TestListenerBinding.xml(org.apache.tapestry.junit.mock.MockTestCase)juni 
t.framework.AssertionFailedError: Request #2/Page Title: Response does  
not contain string '<title>Listener Binding</title>'.
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockTester.java 
:659)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeOutputAssertions(MockTe 
ster.java:558)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeAssertions(MockTester.j 
ava:410)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeRequest(MockTester.java 
:228)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCase.java:90 
)
      [java] 3)  
TestSpecDelegate.xml(org.apache.tapestry.junit.mock.MockTestCase)junit.f 
ramework.AssertionFailedError: Request #2/Error Message: Response does  
not contain string 'Component 'Unknown' not found in application  
namespace.'.
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockTester.java 
:659)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeOutputAssertions(MockTe 
ster.java:558)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeAssertions(MockTester.j 
ava:410)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.executeRequest(MockTester.java 
:228)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
      [java] 	at  
org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCase.java:90 
)

      [java] FAILURES!!!
      [java] Tests run: 432,  Failures: 3,  Errors: 0




BUILD FAILED
C:\apache\jakarta-tapestry\junit\build.xml:68: Java returned: 1


RE: junit failures

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
The main thing I like about Maven is the automatic download of depenencies. Get that working in Ant
and you can steal Maven's constiutiency pretty quickly.

The other cool, builtin reports and L&F stuff is handy, but confusing to get exactly right.

The multiproject support (one project containing others) is totally f'ed up.  Not in a good way ...
I can't get it to work.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Erik Hatcher [mailto:lists@ehatchersolutions.com] 
> Sent: Thursday, August 14, 2003 1:54 PM
> To: Tapestry development
> Subject: Re: junit failures
> 
> 
> On Thursday, August 14, 2003, at 01:38  PM, Howard M. Lewis 
> Ship wrote:
> > Are the notes in the Contributor's Guide out of date?
> 
> A developer reading docs?!  Ha!  I just type 'ant' and see 
> what happens 
> :)
> 
> I saw the jython info there.  Nothing about JDOM though.
> 
> > JDOM's license ... can't remember.  I actually want to rewrite the
> > test drivers to use Digester
> > instead of JDOM.  Time, time.
> 
> Jason Hunter created JDOM - so I suspect its pretty Apache-friendly.
> 
> > What I've been trying to do is move to Maven so that these are all
> > non-issues, but Maven hasn't been
> > ready for Tapestry yet.  Any help would be great.
> 
> *ugh* Maven.  You want help with that, look elsewhere!
> 
> But if you stick with Ant I'll definitely help.  :)
> 
> >> Why are you using <java> to run JUnit rather than the <junit> task 
> >> itself?
> >
> > I honestly don't remember why ... it may have been so that I could
> > invoke the TapestrySuite whereas
> > the <junit> task invokes each individual test case class 
> individually.
> 
> I'll see if I can swap it out and submit a patch if I get it working.
> 
> > I wonder what this could be? First off, my release process includes
> > running the unit tests and so I
> > CAN'T make a release unless on unit tests work.
> 
> Excellent!
> 
> > And fine from the command line ("ant clean install junit").
> >
> > Ant 1.5.1, JDK 1.4 on Windows XP.  What's your env?
> 
> Ant 1.6alpha (my custom build of it), JDK 1.4 on Windows XP.  
> I really 
> doubt its an Ant version issue, but I'll keep digging.  I really just 
> wanted to report them - but I'm happy to dig to see what's 
> up.  I won't 
> be back on this until Monday though.
> 
> 	Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


Re: junit failures

Posted by Erik Hatcher <li...@ehatchersolutions.com>.
On Thursday, August 14, 2003, at 01:38  PM, Howard M. Lewis Ship wrote:
> Are the notes in the Contributor's Guide out of date?

A developer reading docs?!  Ha!  I just type 'ant' and see what happens 
:)

I saw the jython info there.  Nothing about JDOM though.

> JDOM's license ... can't remember.  I actually want to rewrite the 
> test drivers to use Digester
> instead of JDOM.  Time, time.

Jason Hunter created JDOM - so I suspect its pretty Apache-friendly.

> What I've been trying to do is move to Maven so that these are all 
> non-issues, but Maven hasn't been
> ready for Tapestry yet.  Any help would be great.

*ugh* Maven.  You want help with that, look elsewhere!

But if you stick with Ant I'll definitely help.  :)

>> Why are you using <java> to run JUnit rather than the <junit> task
>> itself?
>
> I honestly don't remember why ... it may have been so that I could 
> invoke the TapestrySuite whereas
> the <junit> task invokes each individual test case class individually.

I'll see if I can swap it out and submit a patch if I get it working.

> I wonder what this could be? First off, my release process includes 
> running the unit tests and so I
> CAN'T make a release unless on unit tests work.

Excellent!

> And fine from the command line ("ant clean install junit").
>
> Ant 1.5.1, JDK 1.4 on Windows XP.  What's your env?

Ant 1.6alpha (my custom build of it), JDK 1.4 on Windows XP.  I really 
doubt its an Ant version issue, but I'll keep digging.  I really just 
wanted to report them - but I'm happy to dig to see what's up.  I won't 
be back on this until Monday though.

	Erik


RE: junit failures

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
> -----Original Message-----
> From: Erik Hatcher [mailto:lists@ehatchersolutions.com] 
> Sent: Thursday, August 14, 2003 12:40 PM
> To: tapestry-dev@jakarta.apache.org
> Subject: junit failures
> 
> 
> Hi, I'm new to tapestry-dev as of a few minutes ago.  We are 
> embarking  
> on a fairly aggressive schedule to build several apps using Tapestry  
> and I'm trying to come up to speed as quickly as possible.  I 
> want our  
> usage of Tapestry to include unit testing, so I wanted to see how  
> Tapestry itself was tested.
> 
> I just grabbed the latest Tapestry source code and after jumping  
> through some hurdles to make it build successfully, I tried 
> to run the  
> unit tests.  This involved more hurdles like getting jython and JDOM  
> added.

Are the notes in the Contributor's Guide out of date?

Jython is LGPL, so it's off limits.

JDOM's license ... can't remember.  I actually want to rewrite the test drivers to use Digester
instead of JDOM.  Time, time.


> 
> Are both of those licensed such that we cannot check them into the  
> Tapestry CVS?  I suspect at least JDOM is fair game to put there, so  
> I'd recommend it.
> 
> Also, until I copied junit.jar to lib/ext, I was unable to run 'ant  
> junit'.  *arg* (perhaps at the very least put 
> ${ant.home}/lib/junit.jar  
> in the classpath for the testing tasks) - the build/test 
> process was a  
> bit more painful than it should have been (and yes, I'll 
> volunteer to  
> help fix things). 

What I've been trying to do is move to Maven so that these are all non-issues, but Maven hasn't been
ready for Tapestry yet.  Any help would be great.


 I also had to swap the order of <path> 
> definitions  
> in junit/build.xml of base.classpath and compile-tests.classpath,  
> otherwise an error was reported (I'm running Ant 1.6alpha, 
> although I'm  
> sure the order is incorrect in any Ant version).
> 
> Why are you using <java> to run JUnit rather than the <junit> task  
> itself?

I honestly don't remember why ... it may have been so that I could invoke the TapestrySuite whereas
the <junit> task invokes each individual test case class individually.


> 
> Ok, all build/test issues aside, I got three test failures:
> 
>       [java] There were 3 failures:
>       [java] 1)  
> TestAutoParameters.xml(org.apache.tapestry.junit.mock.MockTest
> Case)junit 
> .framework.AssertionFailedError: Request #2/boolValue: Response does  
> not contain string 'boolValue: [false]'.
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockT
> ester.java 
> :659)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeOutputAsserti
> ons(MockTe 
> ster.java:558)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeAssertions(Mo
> ckTester.j 
> ava:410)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeRequest(MockT
> ester.java 
> :228)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCa
> se.java:90 
> )
>       [java] 2)  
> TestListenerBinding.xml(org.apache.tapestry.junit.mock.MockTes
> tCase)juni 
> t.framework.AssertionFailedError: Request #2/Page Title: 
> Response does  
> not contain string '<title>Listener Binding</title>'.
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockT
> ester.java 
> :659)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeOutputAsserti
> ons(MockTe 
> ster.java:558)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeAssertions(Mo
> ckTester.j 
> ava:410)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeRequest(MockT
> ester.java 
> :228)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCa
> se.java:90 
> )
>       [java] 3)  
> TestSpecDelegate.xml(org.apache.tapestry.junit.mock.MockTestCa
> se)junit.f 
> ramework.AssertionFailedError: Request #2/Error Message: 
> Response does  
> not contain string 'Component 'Unknown' not found in application  
> namespace.'.
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.matchSubstring(MockT
> ester.java 
> :659)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeOutputAsserti
> ons(MockTe 
> ster.java:558)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeAssertions(Mo
> ckTester.j 
> ava:410)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.executeRequest(MockT
> ester.java 
> :228)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTester.execute(MockTester.java:183)
>       [java] 	at  
> org.apache.tapestry.junit.mock.MockTestCase.runTest(MockTestCa
> se.java:90 
> )
> 
>       [java] FAILURES!!!
>       [java] Tests run: 432,  Failures: 3,  Errors: 0

I wonder what this could be? First off, my release process includes running the unit tests and so I
CAN'T make a release unless on unit tests work.

The suite runs fine from Eclipse ....

    [java] junit.framework.TestSuite.run(TestSuite.java:203)
    [java] junit.framework.TestSuite.runTest(TestSuite.java:208)
    [java] junit.framework.TestSuite.run(TestSuite.java:203)
    [java] junit.textui.TestRunner.doRun(TestRunner.java:116)
    [java] junit.textui.TestRunner.start(TestRunner.java:172)
    [java] junit.textui.TestRunner.main(TestRunner.java:138)

    [java] **********************************************************

    [java] ......................
    [java] Time: 26.448

    [java] OK (432 tests)

And fine from the command line ("ant clean install junit").

Ant 1.5.1, JDK 1.4 on Windows XP.  What's your env?


> 
> 
> 
> 
> BUILD FAILED
> C:\apache\jakarta-tapestry\junit\build.xml:68: Java returned: 1
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>