ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Malla <malla...@yahoo.co.in>
Subject Re: HTTP 404
Date Fri, 18 Oct 2002 19:08:01 GMT

I am trying to test a list of links, by getting their response codes from their response objects.
But whenever a 404/500 is encountered, i am not able to complete my list. The test stops at
the 404/500 error generating link. Is there a way I can avoid that so that I continue with
my list even if one of the links in the list generates a 404/500?

I know i can continue running other tests using ant even if one test fails.

But how can I continue with my list of links in one particular test.

Thanks.

 Ken Gentle <j.kenneth.gentle@acm.org> wrote:There still isn't enough information here
to thoroughly diagnose the 
problem -- the snippet has at least one error:


^
missing a quote (and should be double quotes, right?)

What is in TestLinks? What is it you're testing? Does it behave properly 
(ie, how you expect it to) using one of junit's test runners?

This, at this point, appears to be a junit test coding issue, or an 
application issue. Doesn't appear to be ANT.

Ken

At 07:18 PM 10/18/2002 +0100, you wrote:

>So do you mean that I should just catch the exceptions in my java classes 
>as I would have done normally.
>
>Please find the task snippet i am trying to run below. How do I catch an 
>exception here?
>
>
> > fork="yes">
>
> 
> 
> 

> 
> 

> 
>
> 
> 
>
>
> 
>
>
>
>
>
> Ken Gentle wrote:You probably need to 
> describe your ANT specific problem a little better --
>what task are you using, what is the environment and what is the output of
>the build for example.
>
>Not having that, and not know what task you're using, I will offer this:
>
>UrlConnection/HttpConnection from the stock Java JDK will, depending on
>what version you have, throw a FileNotFound exception for the 404 code, and
>a different exception on other error HTTP status codes. If the task you're
>using isn't catching the exceptions, it will most likely "fail".
>
>J2SE 1.4.1 is supposed to rationalize this behavior, but I've not had a
>chance to verify it.
>
>
>
>
>At 06:37 PM 10/18/2002 +0100, you wrote:
>
> >During testing response from links, I found that on a 404, the test simply
> >fails, whereas on a 200, everything works fine and I am able to use the
> >response object to get the responsecode. how can I do the same if the link
> >generates a 404 response without the test failing?
> >
> >thanks.
> >
> >
> >
> > Yahoo! Properties Special Buy, sell, rent...your flat, or even post an ad
>
>
>--
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>
> Yahoo! Properties Special Buy, sell, rent...your flat, or even post an ad


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 

 Yahoo! Properties Special  Buy, sell, rent...your flat, or even post an ad
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message