jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weinstein, Eugene" <Eugene_Weinst...@ustrust.com>
Subject In-container bean testing with Cactus
Date Thu, 27 Jul 2006 14:57:10 GMT


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.


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.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message