Solved

HTTPUNIT, visit another page while stay in same session

Posted on 2009-07-15
4
334 Views
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.

Domain:

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?

0
Comment
Question by:JianJunShen
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 24857919
Use the same WebConversation for each
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 500 total points
ID: 24857923
(or WebClient)
0
 

Author Closing Comment

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

Expert Comment

by:CEHJ
ID: 24857947
:-)
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where to store the queries for modification of table 4 65
session migration servlets 2 39
tomcat startup error 5 66
String array comparison 4 34
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

831 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