This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Testing and the fly likes How to use httpclient by apache to test my application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to use httpclient by apache to test my application" Watch "How to use httpclient by apache to test my application" New topic
Author

How to use httpclient by apache to test my application

nick sharma
Greenhorn

Joined: May 05, 2008
Posts: 28
Hello everyone,
I developed an application using JSP's with Beans.i needed to check the load and performance limit for my application.
In one of the earlier posts i read about httpclient being used to do so.can anyone please guide me as to how i test my software at low cost.
thank you
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
1. Download and install HTTPClient (version 3.1 is latest)
2. Read the tutorial.html - you might want to write the example simple application just to get comfortable with the tools.
3. Figure out the user's "path" through your application that you want to test - I like to make a diagram with named circles and arrows - I also see a lot of UML style diagrams, whatever you are comfortable with. I suggest you start with the simplest path your app has.
4. Now for the hard part - you have to write a testing program to execute the client side of that user "path". Each test pass should run in its own Thread so that you can start multiple "simultaneous" requests. I like to write a sort of script containing the user inputs to be sent at each step - depending on the complexity of your app you might use XML to create the script.

Bill
nick sharma
Greenhorn

Joined: May 05, 2008
Posts: 28
i downloaded the binary file but i have a .jar file in the binary zip folder.can you please tell me vat You exactly mean by install??
is there any manual configuration involved like adding class path etc or do you mean an installation done by windows installer etc??
Please clear the above doubt.

Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
The commons-httpclient-3.1.zip is just a zipped file of the working directories for the project, pretty typical of Apache toolkits. It is only the big applications like Tomcat that have special installers.

I unzipped the entire set of files, using the base directory that is in the zip file so I now have a commons-httpclient-3.1 directory in my JavaMisc directory I use for this sort of thing. Inside that we find:

commons-httpclient-3.1.jar - you need this on your classpath to compile and run programs using the toolkit.

a bunch of license .txt files and RELEASE_NOTES.txt - the notes give the history of the project as leading to the current version

the docs directory - containing:
.apidocs - the standard JavaDocs formatted API documentation
.. several other directories containing examples and files used by the:
.html files that duplicate the Apache web site information including the page for the tutorial

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use httpclient by apache to test my application