jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mattox" <mich...@idtect.com>
Subject RE : Question on Functional Testing in Cactus
Date Fri, 09 Aug 2002 07:47:56 GMT
Is your design such that the only way to put data in the database is by
using the EJB service (session bean facade) layer?  If this is true then
I like #3.  If you do a data upload then you're bypassing the service
layer, and then later testing your service layer against the data that
it didn't create.  I think you can better test your service layer if you
use it to populate your data.  If not there is the possibility for

Now if you're design allows another layer to access the database
directly (a JSP, servlet, or another application for example), then the
data upload approach makes more sense.  However in this case I'd
consider redesigning to enforce all database calls to go through the
service layer.


-----Original Message-----
From: John Denver [mailto:tenance99@yahoo.com] 
Sent: Friday, August 09, 2002 9:32 AM
To: Cactus Users List
Subject: Question on Functional Testing in Cactus

   The problem that we're having with our EJB
functional testing is that you need to *set* the
status of the entity beans before a full use case can
be tested against a session bean.  

   Presently, everytime we test a use case or set of
use cases, we upload related data to the database so
that we can capture the state of the related entity
beans before running the session bean(s) of the use
case(s).  This means to say that whenever we do a
regression testing and we have 50 use cases, we need
to upload different sets of data approx 50 times and
run the session beans in between uploads.  Not very

   Second alternative solution I can think of is to
create a god dataset so that there will only have one
upload and one run. But the problem is its difficult
and time consuming to design a god data that is
*valid* to all use case and future use cases for
future features.  

   Third alternative solution I can think of is to set
the individual data programatically within the test
script.  These solutions in my opinion is equally time consuming if we
need to set several rows spanning several tables with several fields
that's why we preferred data upload.

   I believe that this is not only applicable to EJB
but to all functional testing that uses object states.
 How do you guys do this and what's the best way to do
this, such that ideally we can test all the use cases
in just one run (and probably only one upload) similar
to test suite of unit testing.  My understanding is
Cactus focus on Functional *Unit* Testing and not the
standard Functional Testing.  If my assumption is
incorrect, how do you effectively set the status of
the entity beans/units that composed of large data set
so that a full use case can be simulated and tested?

Thanks in advance.


Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message