jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fred Loney" <lo...@spiritedsw.com>
Subject Re: Single test class for both local and remote
Date Wed, 05 Feb 2003 06:01:11 GMT
The reason for the todo item is local/server regression testing. The
application framework I use insulates most of the code from the
container context. Thus, one can code and test locally quickly, then
occasionally deploy and test on the server using the same code base.

The only hitch is that the test case must derive from ServletTestCase
for server testing. The work-around I use is to pair a small TestCase
with a small ServletTestCase, both of which do nothing more than
delegate to a common test exerciser object.

It is not clear that the todo item that I initiated is necessary,
although there might be other uses. It would be worthwhile to keep the
item open for a while.

Fred Loney

----- Original Message -----
From: "Vincent Massol" <vmassol@octo.com>
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
Sent: Tuesday, February 04, 2003 12:47 AM
Subject: RE: Single test class for both local and remote


> Hi Tim,
>
> Yes, it may make sense in some situations. This is why we've added a
new
> todo in the Cactus todo list
> (http://jakarta.apache.org/cactus/todo.html) about:
>
> "Ability to write Cactus tests by extending normal JUnit TestCase
> instead of Cactus extensions (by using special Cactus TestSuite
> objects). This will allow to easily execute the same test outside and
> inside of the container (for test not depending on container objects).
> Idea suggested by <link href="mailto:loney@spiritedsw.com">Fred
> Loney</link>."
>
> Now, for your problem at hand, what would be the issue about running
> both the remote and local EJB class from a ServletTestCase? Is it a
> question of speed only?
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Tim McNerney [mailto:mcnerney@navis.com]
> > Sent: 04 February 2003 01:00
> > To: cactus-user@jakarta.apache.org
> > Subject: Single test class for both local and remote
> >
> > I want to build a test which works both locally (on the client side)
> and
> > remotely (on the server side). This is basically testing the local
and
> > remote interfaces of an EJB. Since much of the code would be the
same
> > for both, I'd like to keep it in one class. Let's say I'm using
> > (extending) a ServletTestCase for the server side test. Is there
some
> > way for me to tell my test class not to connect to the test on the
> > server side but simply run the test locally?
> >
> > And I'm making any sense?
> >
> > --Tim
> >
> >
>
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>


Mime
View raw message