I'm having trouble configuring Visual Age for Java's WebSphere Test
Environment to run Cactus unit tests [I'm running VAJ 3.5.3]. When I try to
run a test, the method ServletHttpClient.doTest() fails at the statement
connection.getInputStream(), which throws the following exception:
java.io.FileNotFoundException:
http://localhost:8080/test/ServletRedirector
Here's some relevant information. I've created file cactus.properties with
the following entries and placed it at the root of WTE's classpath (it seems
to find this file ok):
cactus.servletRedirectorURL =
http://localhost:8080/test/ServletRedirector
cactus.jspRedirectorURL = http://localhost:8080/test/JspRedirector
The WTE application's configuration file, default_app.webapp, contains the
following XML entry that provides to WTE the alias to the servlet
redirector:
<servlet>
<name>ServletRedirector</name>
<description>Redirector servlet for Cactus</description>
<code>org.apache.commons.cactus.server.ServletTestRedirector</code>
<servlet-path>/test/ServletRedirector</servlet-path>
<autostart>true</autostart>
</servlet>
Finally, here's the test method that causes the exception:
/**
* Test that the controller logs on the user when presented with
* a valid aba number, that is, the user's aba number is placed in
* the HttpSession.
*/
public void testGoodLogon() {
try {
LogonClientController lcc = new LogonClientController();
lcc.logon(request, "091000022");
assertEquals("aba number not placed in session", "091000022",
session.getAttribute("aba"));
} catch (Exception e) {
assert("logon \"091000022\" failed", false);
}
}
Keith Pierce
FedACH Support Services
Federal Reserve Bank of Minneapolis
612-204-6480