In-container bean testing with Cactus

"Weinstein, Eugene" <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <4A11E565BBDBAD47BC12885A6734B1370AB29C@ustjc3exmail02.ustrust.global.schwab.com>
Hi,



Perhaps I am trying to re-invent the wheel and there are better tools
for my purposes out there. I generated the test suites for some web
services using Axis WSDL2Java with -t option and now I just pass the
names of those generated classes as parameters to ServletTestRunner.
I've also modified cactus-report.xsl mark slow-running tests. So,
essentially I am using Cactus just as Web interface for "pinging" these
web services.



I have to rebuild the project for each environment every time I make any
change because the service endpoint locations are hard-coded in their
corresponding ServiceLocator classes. I wish I could externalize this
configuration to JNDI and set these properties with something like
Spring. I created non-singleton beans for the ServerLocator classes in
applicationContext.xml and I can get a hold of ApplicationContext
through ServletContext if I extend ServletTestRunner. But the TestSuite
classes are not instantiated by the servlet, their names are just passed
to WebappTestRunner, which constructs them using Reflection API. So, for
now I just have the ServiceLocators read things like endpoint locations
from a properties file. I am wondering, though, if others would find
ServletBeanTestRunner that takes bean names rather than class names as
parameters useful and how I could implement it.



Thanks,



Eugene Weinstein





---------------------------------------------------------------------
The message contains confidential and/or legally privileged
information and is intended for use by the indicated addressee.
If you are not the intended addressee: (a) any disclosure,
reproduction, distribution or action you take because of it is
strictly prohibited; (b) please return the complete message to the
sender; and (c) this message is not a solicitation for purchase or
sale or an agreement of any kind whatsoever that binds the sender.
---------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.