views:

559

answers:

4

I have written a simple HTTP Proxy server in C# that I would like to integration/functional test. Is there a product already created that I could use to do this? If not, what is the best way to write my own tests for this (I already have unit tests)?

+1  A: 

To test the integration by delivering a webpage you could try one of the following:

You can run Watin tests directly from xUnit in C# too - we do this for our applications. I also believe it is possible to dynamically set the proxy settings in the browser for Watin (and probably the others too).

Alternatively to make HTTP requests to a given address try JMeter.

Paul Shannon
A: 

Slightly offtopic: Having seen a share of custom HTTP proxies, the usual feature their authors forget (and later discover that they need) is the support for the CONNECT method. Without CONNECT your proxy can't be used for TLS/SSL connections. Also, software that tunnels their non-HTTP traffic via the proxy won't work either.

Alexander
A: 

There are two more products to use:

  • Web Polygraph
  • Funkload

Both are easy to find via Google. Both perform functional and load testing of web servers/proxies.

A: 

When you're using the above, I'd also suggest running one of the latency/packet loss injection tools discussed in Best way to simulate a WAN network. It's regrettably easy to decide that your proxy is stable when you test it in a non-messy environment.

Flash Sheridan