Browser like dealing with sequential URL

M

Marcin

Hi,

What is the easiest way to use jakarta HttpClient 3.0 , to behave like
browser executing methods with sequential URLs?
For example:
I'm executing method with `http://google.com`
Then I'm executing method with `/catalog1/` (My aim is to execute with
`http://google.com/catalog1/`)
Then I'm executing method with `index2.html` (My aim is to execute with
`http://google.com/catalog1/index2.html`)
Then I'm executing method with `/catalog2` (My aim is to execute with
`http://google.com/catalog2/`)

What I want is to simulate browser behavior dealing with URLs in links,
forms and so on.

Anyone has experience in that field?

Thanks.
M.
 
R

Ryan Dillon

For what purpose do you want to do the simulation? Is it for functional
testing or stress testing maybe?

Have you checked out HttpUnit (http://httpunit.sourceforge.net/). It
allows you to easily call urls via GETs and POSTs etc and check all
sorts of things in the response.

Cheers
 
M

Marcin

Thanks Ryan.

It's rather functional testing.

The HttpUnit has great functionality, but I need something that has
functionality of both: HttpUnit (great html parsing and handling) and
HttpClient (many configuration parameters, timeout, etc.)

I will stay with HttpClient.
The only problem I have with it now is I can't get the current URI.
When it handles redirections automatically ,getURI method gets for me
the URI which I declared, but I want the last URI after all
redirections. I must handle redirections by myself which isn't efficient
for me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top