views:

519

answers:

5

I'm looking for a tool / library (preferably .NET based) that does web page record/playback. I want this tool to issue http requests directly instead of automating a browser for performance reasons. Come to think of it, I'm pretty much looking for a recorder that can generate code that uses the WebClient class in .NET.

All of the tool I've found are designed for web-based UI testing so they interface with browsers in order to support javascript, dialogs, etc.

A: 

I've used NUnitASP to verify that the page loads and doesn't throw an exception, but it doesn't really do very much UI interaction; and no javascript.

Tom Ritter
A: 

I've used HttpUnit in Java quite a bit. A quick google search finds this page with a few HttpUnit clone projects, so that might be a place to start.

I've tried to use Java HttpUnit tests with .NET apps before, but .NET's usage of postbacks and viewstate makes it pretty ugly (if it works at all).

Eric Petroelje
+1  A: 

The LoadRunner virtual user generator (VUGen) works by recording and playing back the HTTP requests. You can download a trial of LoadRunner from HP and just intall VUGen if you want to play around with it. It generates scripts in a proprietary flavor of C, but it may give you some ideas of how to do the same thing in .NET.

There's also an open source load testing tool calledWebLoad, that I believe was created by the original developers of LoadRunner. My guess is that they have a scripting component that works similar to VUGen. You can find the source code for WebLoad on SourceForge.

Patrick Cuff
+1 for WebLOAD and LoadRunner
annakata
+1  A: 

I don't know if this interests you, but I use a combination of fiddler & curl, and sometimes Wireshark:

Fiddler: http://www.fiddler2.com/fiddler2/ Curl: http://curl.haxx.se/ Wireshark: http://www.wireshark.org/

There is no recording/replaying of scripts, but I find these two tools very useful,

Fiddler for looking at the requests & responses, Curl for replaying them and wireshark for when it gets really messy.

MatthieuF
Fiddler can actually replay requests.
Peter Štibraný
Yeah, sorry, I did know that.
MatthieuF
A: 

I'm not familiar with a tool that will do what you're looking for that's .Net based, but if you can tolerate a Java UI, JMeter will do exactly what you're looking for.

It's basically a load-testing tool that functions at the transport (ie, Request/Response) level. It has record/playback/scripting functionality and supports a number of different protocols.

Peter Bernier