tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hls...@comcast.net>
Subject RE: junit failures
Date Thu, 14 Aug 2003 17:38:19 GMT
> -----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
> 


Mime
View raw message