aspose file tools*
The moose likes Testing and the fly likes Testing a deployed servlet application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Testing a deployed servlet application?" Watch "Testing a deployed servlet application?" New topic
Author

Testing a deployed servlet application?

Bruce Tay
Greenhorn

Joined: Nov 05, 2012
Posts: 1


Currently I have a servlet based application that retrieves data from an archived database and sends it back to the client as an XML over HTTP.

I want to create an "X" test client to test my database retrieval servlet for the following:

Min HTTP response time
Max HTTP response time
Errors received from server

The application is almost in deployment phase of development , however I need a test client that I can use after its deployed to check the application is performing as it should or if I need to do maintenance in its environment (e.g. reindex database) say after 6 months.

I am wanting it to generate thousands of HTTP requests (spam) the application.

So far I can think of two ways to do this:

Multithreaded java console app that sends multiple HTTP requests simultaneously over multiple threads from my computer.
A separate java servlet that sends HTTPS requests simultaneously from one server to another over multiple threads.

I am thinking that a servlet test application would be the best for the job as its already multithreaded by default.

How would I implement this though, do I just use the requestDispatcher class to call to another servlet or is there a better way?

Any advice welcome!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30548
    
152

Take a look at JUnitPerf. It makes load testing an app in JUnit easier.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
Multithreaded java console app that sends multiple HTTP requests simultaneously over multiple threads from my computer.
A separate java servlet that sends HTTPS requests simultaneously from one server to another over multiple threads.

I am thinking that a servlet test application would be the best for the job as its already multithreaded by default.


Actually it is quite easy to create your own multithreaded test client if each request is created by a Runnable object. I used the Apache HttpClient toolkit. The multithreading in a servlet is not really related to this problem.

Bill

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Testing a deployed servlet application?