> -----Original Message----- > From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk] > Sent: 31 October 2002 08:45 > To: Cactus Users List > Subject: Re: followRedirects is false > > Hello, > > It's disappointing that no-one knows the answer to > this - it must be a fairly common problem :-( > I have to accept that it's just not possible > then...sigh... >
Hey, it's only been 2 days since you posted... :-). Ok, I've sent some ideas in a another email. > Okay, is there a plan B? > I could accept running this from an Ant task There are several ways of starting cactus tests. Please read the http://jakarta.apache.org/cactus/howto_runner.html In addition to what's written there are now 2 more front ends: - a maven plugin (http://jakarta.apache.org/turbine/maven/reference/plugins/cactus) - a tight Jetty integration (search the cactus archives) A Cactus Eclipse plugin is also almost ready to be used... > but I > would still need the Form Authentication to work. > However, for security reasons there is no 'test' user, > there are only valid LDAP users so I cannot hard-code > a username and password into the Cactus test (I can't > have that in CVS!) > > Is it possible to run Cactus from an ant task and > specify the username and password into the test from > the command line? > e.g. ant runtests -Duid=myUid -Dpwd=myPWD > yes, here's an example: public beginXXX(WebRequest request) { request.setAuthentication( new FormAuthentication( System.getProperty("uid"), System.getProperty("pwd"))); [...] -Vincent > ?? > > (Hopefully) Thanks in advance > > Charlene > > > --- Charlene Mitchell <[EMAIL PROTECTED]> > wrote: > Hi, > > > > I have a secure EJB application running on > > JBoss3.0.3/Jetty and I'm trying to integrate some > > Cactus Unit Tests. I have read the docs and created > > a > > sample EJB Test, deployed it in a war and added > > security to the web.xml so that I can authenticate > > and > > run the tests from a browser. > > > > ..but after I log in I get a page back indicating an > > error as follows: > > BROWSER ERROR > > ============= > > "Failed to get the test results. This is probably > > due > > to an error that happened on the server side when > > trying to execute the tests. Here is what was > > returned > > by the server : []" > > > > This tells me nothing so I look in the JBoss log and > > I > > see the following: > > JBOSS ERROR > > =========== > > INFO [wire] >> "Content-type: > > application/x-www-form-urlencoded" > > INFO [wire] >> "Host: localhost" > > INFO [wire] >> "User-Agent: Jakarta HTTP > > Client/2.0.0a1" > > INFO [wire] >> \r\n > > INFO [wire] << "HTTP/1.1 302 Moved Temporarily" > > [\r\n] > > INFO [wire] << "Date: Tue, 29 Oct 2002 08:16:09 > > GMT" > > [\r\n] > > INFO [wire] << "Server: Jetty/4.1.0 (SunOS 5.8 > > sparc)" [\r\n] > > INFO [wire] << "Servlet-Engine: Jetty/4.1.0 > > (Servlet > > 2.3; JSP 1.2; java 1.4.0_01)" [\r\n] > > INFO [wire] << "Set-Cookie: > > JSESSIONID=bsp7oiipqikl7;Path=/myapp-ejbtest" [\r\n] > > INFO [wire] << "Set-Cookie2: > > > JSESSIONID=bsp7oiipqikl7;Version=1;Path=/myapp-ejbtest;Discard" > > [\r\n] > > INFO [wire] << "Location: > > > http://localhost/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl7" > > [\r\n] > > INFO [wire] << "Transfer-Encoding: chunked" [\r\n] > > INFO [HttpMethod] HttpMethodBase.execute(): > > Received > > 302 response, but followRedirects is false. > > Returning > > 302. > > > > The WebServer doesn't indicate any error as such: > > WEB SERVER ERROR > > ================ > > "POST /myapp-ejbtest/j_security_check HTTP/1.1" 302 > > 0 > > > "http://localhost:19201/myapp-ejbtest/login.html;JSESSIONID=bsp7oiipqikl 7" > > "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" > > "GET > > > /myapp- > ejbtest/ServletRedirector?Cactus_TestMethod=testConvert&Cactus_TestClass =m > y.package.MyBeanTest&Cactus_AutomaticSession=true&Cactus_Service=CALL_TE ST > > HTTP/1.1" 302 0 "-" "Jakarta HTTP Client/2.0.0a1" > > > > Can some kind person point me in the right direction > > here? > > > > Many thanks in advance > > > > Charlene > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > -- > To unsubscribe, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:cactus-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:cactus-user-help@;jakarta.apache.org>