Hi Les,

Yes, I did get the email... I started looking at it and was confused as
to why you weren't just using Junit straight up, and sent you a note :-)

My suggestions would be 2:

1) Look at MockObjects - you can set up your ServletContext, etc before
hand if your action needs it. They ARE unit tests, so you need to
isolate them from the environment and surrounding code, which
MockObjects do very well.

2) Don't use ServletContext and the other web framework artifacts unless
you HAVE to. 
A) it makes it harder to test (only a little with MockObjects, but
still) and 
B) Maybe I'm just a purist, but I don't like to muddy my Actions with
web code. I like to have the flexibility to have them called from a
JMSDispatcher, etc. 
WebWork2 does a pretty good job of isolating you from the Web stuff if
you only need the parameters, Session, etc. 

Jason

> -----Original Message-----
> From: Les Stroud [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, June 22, 2003 10:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] WebWork Getting Started Guide
> 
> 
> Ah, somehow I missed it.  
> 
> Anyway, it's not really on top of junit, it is just an 
> extension that makes figuring out how to test an action a 
> little simpler.  Like I said, there's not that much to it. It 
> simply encapsulates all of the Action Proxy stuff.  Also, if 
> you are new to it like I am, I found that it took quite some 
> time to discover why my test cases were all bombing out with 
> NullPointerExceptions (which were not originating in my tests 
> :)). Turned out, it was related to the lack of a servlet 
> context.  So, the test case extension figures out whether the 
> null pointer exception that you are getting is servlet 
> related and manages it.  That's about it. So, it does enough 
> and provides enough of a blue print for someone new to 
> webwork2 to easily build action tests (which are really functional not
> unit.)  If that's useful you guys are welcome to it. 
> 
> BTW -- Jason, did you get my direct email with source in it?
> 
> LES
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jason Carreira
> Sent: Sunday, June 22, 2003 9:43 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] WebWork Getting Started Guide
> 
> I replied... Not sure if you got it... You seem to have a 
> framework for testing actions... I'm just not sure why you 
> need a framework on top of Junit instead of just directly 
> testing your Actions with TestCase's?
> 
> > -----Original Message-----
> > From: Les Stroud [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, June 22, 2003 1:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [OS-webwork] WebWork Getting Started Guide
> > 
> > 
> > Jason,
> > Should I take that as a not interested??  No problem. :)
> > 
> > LES
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of [EMAIL PROTECTED]
> > Sent: Monday, June 16, 2003 6:42 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [OS-webwork] WebWork Getting Started Guide
> > 
> > I replied to your notiva.com email with some files (I didn't
> > wanna eat up everyone's bandwidth :) ).  Let me know what you think.
> > 
> > LES
> > 
> > -----Original Message-----
> > From: Jason Carreira [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 16, 2003 3:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [OS-webwork] WebWork Getting Started Guide
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, June 16, 2003 3:00 PM
> > > > 
> > > Jason -- I did have one question.  I implemented all of the 
> > > interfaces for junit in a set of classes to test the 
> actions using 
> > > ActionProxy.  It makes it a little easier because it handles the 
> > > exceptions that are thrown as a result of not having a servlet 
> > > context when running the unit tests.  Is this something 
> that would 
> > > be useful to the project?  If so, how would I submit them?
> > > 
> > > LES
> > 
> > I don't follow... Which interfaces?
> > 
> > Jason
> > 
> > 
> > -------------------------------------------------------
> > This SF.NET email is sponsored by: eBay
> > Great deals on office technology -- on eBay now! Click here:
> > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5
> > 
> > _______________________________________________
> > 
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: INetU
> > Attention Web Developers & Consultants: Become An INetU
> > Hosting Partner. Refer Dedicated Servers. We Manage Them. You 
> > Get 10% Monthly Commission! INetU Dedicated Managed Hosting 
> > http://www.inetu.net/partner/index.php
> > 
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > 
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: INetU
> > Attention Web Developers & Consultants: Become An INetU
> > Hosting Partner. Refer Dedicated Servers. We Manage Them. You 
> > Get 10% Monthly Commission! INetU Dedicated Managed Hosting 
> > http://www.inetu.net/partner/index.php
> > 
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU 
> Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
> Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU 
> Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
> Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to