You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <jo...@germuska.com> on 2003/12/06 16:40:50 UTC

Cactus tests (Re: Maven test run)

On Dec 1, 2003, at 10:53 AM, Steve Raeburn wrote:
> 2. Run the Cactus tests

OK, since the TLDs are out of the way (Thanks Tim, Steve!), I got 
started on this one this morning.  I've gotten decently far along but 
have to quit now.  If anyone else is interested in working on this bit, 
let me know so we can cooperate; otherwise, I'll try to get further 
before posting to Bugzilla.

I've gotten most of the preliminary config/setup done and Cactus is 
just getting started and now it wants a copy of tools.jar (for JSP 
compilation).  I'm not quite sure how to hit that one, since Apple 
bundles tools.jar with the core java classes, which Tomcat won't allow 
in WEB-INF/lib  I guess I'll just have to get my own standalone copy of 
tools.jar.  (Is it 100% java, or am I going to have to repackage 
Apple's classes.jar?)

Anyway, just wanted to let people know I was working on this, in case 
others were also interested...

Joe

--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
  "We want beef in dessert if we can get it there."
   -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association



Test Case Exception Throwing style (Re: Cactus tests)

Posted by Joe Germuska <jo...@germuska.com>.
Going further along the quest to get Tomcat tests running in Maven, I 
need to ask a style question:

Most or all of the taglib testcases use a pattern where they call a 
private method "runMyTest" with some parameters.  This method calls 
pageContext.forward() to pass control to a JSP where the tags are 
actually tested.

A problem I had while trying to get the Cactus tests to run is that 
this "runMyTest" method caught an exception from pageContext.forward()  
and called the "fail" method.  This resulted in the real stack trace 
getting printed to STDOUT (amidst output from 100 test cases) and a not 
particularly useful message getting placed in the test report.

I would suggest that the proper behavior here is to throw the exception 
and let JUnit deal with it as an error rather than a failure.  This 
puts the actual error in the test report, which makes it a lot easier 
to solve the problem.

I've actually implemented this change locally in the test classes to 
help me debug the cactus tests.  Would anyone object to making these 
changes permanent?

For what it's worth, I've got it passing 71/97 tests clear, and the 
rest fall into two categories: 19 with failures because the 
context-path of the test app is hardcoded as "test" and the plugin uses 
"struts-cactus", and 7 that have to do with cookie values.  If anyone 
has any clever ideas for the simplest way to extract the context path 
without using the tags which are being tested, I'm all ears...    the 
cookie thing is totally baffling at the moment.

Joe


--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
  "We want beef in dessert if we can get it there."
   -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association


RE: Cactus tests (Re: Maven test run)

Posted by Steve Raeburn <sr...@apache.org>.
Joe,
Thanks for the patches. I should be able to take a look at them
tomorrow.
I'd be happy to bounce some ideas around with you as soon as I have any
:-)

Steve

> -----Original Message-----
> From: Joe Germuska [mailto:joe@germuska.com]
> Sent: December 6, 2003 7:41 AM
> To: Struts Developers List
> Subject: Cactus tests (Re: Maven test run)
>
>
> On Dec 1, 2003, at 10:53 AM, Steve Raeburn wrote:
> > 2. Run the Cactus tests
>
> OK, since the TLDs are out of the way (Thanks Tim, Steve!), I got
> started on this one this morning.  I've gotten decently far along but
> have to quit now.  If anyone else is interested in working on
> this bit,
> let me know so we can cooperate; otherwise, I'll try to get further
> before posting to Bugzilla.
>
> I've gotten most of the preliminary config/setup done and Cactus is
> just getting started and now it wants a copy of tools.jar (for JSP
> compilation).  I'm not quite sure how to hit that one, since Apple
> bundles tools.jar with the core java classes, which Tomcat
> won't allow
> in WEB-INF/lib  I guess I'll just have to get my own
> standalone copy of
> tools.jar.  (Is it 100% java, or am I going to have to repackage
> Apple's classes.jar?)
>
> Anyway, just wanted to let people know I was working on this, in case
> others were also interested...
>
> Joe
>
> --
> Joe Germuska
> Joe@Germuska.com
> http://blog.germuska.com
>   "We want beef in dessert if we can get it there."
>    -- Betty Hogan, Director of New Product Development, National
> Cattlemen's Beef Association
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org