Go Premium for a chance to win a PS4. Enter to Win


HTTPUNIT, visit another page while stay in same session

Posted on 2009-07-15
Medium Priority
Last Modified: 2012-05-07
HI: I am using HTTPUnit now to test a web application. The application needs authentication. I use HTTPUNIT to get first page and set parameters in the form and logged in, now I want the httpunit to visit the other pages while keeping the session. I try to use WebResponse newResponse(urlconnection), but it directs me to login page it seems the HTTPUNIT did not remember  my previous authentication.


After login in, since I already have url lists, I want http unit to visit url lists one by one. And then I record its memory usage. I do not want to visit first page, and fetch page and find link and open the link. Since I know url, I want HTTP unit visit that url directly.

Any good solution?

Question by:JianJunShen
  • 3
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 24857919
Use the same WebConversation for each
LVL 86

Assisted Solution

CEHJ earned 2000 total points
ID: 24857923
(or WebClient)

Author Closing Comment

ID: 31603658
The answer is extremely fast and accurate. Highly appreciated for such kind of help.
LVL 86

Expert Comment

ID: 24857947

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question