jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlene Mitchell <charlene...@yahoo.co.uk>
Subject WebTestResultParser exception
Date Thu, 07 Nov 2002 08:00:20 GMT
Hi,

(I thought this deserved a separate post/topic).

Now that I have my Cactus test working from Ant (using
the nice new FormAuthentication class), is it possible
to also get the same testcase working directly from a
URL in a browser?

I don't use FormAuthentication in the test *unless* a
System property username/password is set - that way I
rely on the fact that the web server automatically
redirects me to authenticate with a login page (this
should work). 
But I'm getting a strange error which I
couldn't find any info for in the mail archives:

  java.lang.StringIndexOutOfBoundsException: String
index out of range: 100
  at java.lang.String.substring(String.java:1473)
  at
org.apache.cactus.client.WebTestResultParser.readRootElement(WebTestResultParser.java;org/apache/cactus/util/log/LogAspect.aj(1k):147)
  at
org.apache.cactus.client.WebTestResultParser.parse$ajcPostAround11(WebTestResultParser.java;org/apache/cactus/util/log/LogAspect.aj(1k):101)
  at
org.apache.cactus.client.WebTestResultParser.parse(WebTestResultParser.java;org/apache/cactus/util/log/LogAspect.aj(1k):1222)

>From the command line the test succeeds and the result
I get is:
    [junit] (httpclient.wire                     88  )
<< "<webresult></webresult>"

Could this empty webresult tag be the problem?
(I'm testing a method, I'm not testing for any HTML
results).

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-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message