views:

111

answers:

2

I am thinking that this would be an Apache server with some custom pages, or possibly a java application. Used for browser or http client testing, it should give me a variety of 500 errors when a specific page is requested. Give me a page that responds in 5 seconds, 10, 30 or whatever. Give me a page where the first byte does not come back for 30 seconds. Give me a page where I get a few bytes per second.

I expect that others have made this kind of thing before, and I know it is not too difficult, but I would certainly like to use what someone else has already made.

A: 

I use CherryPy for this sort of thing. When using the quickstart functionality, if you edit the script file you run it from, it will automatically restart.

Sii
A: 

I am mostly working in the Java world, so jumping into Python is not ideal. Here are a few alternatives based on Java:

  • FitNesse - fitnesse.org
  • Jetty - www.mortbay.org/jetty/
  • Java HTTP Server (Sun) - java.sun.com/javase/6/docs/jre/api/net/httpserver/spec/

I was not aware of the sun httpserver, but this seems to provide the lightweight implementation that I can add a small amount of code to for simulating timeouts and error responses.

Roger Campbell