tags:

views:

64

answers:

2

Hi, I'm looking for a tool that plugs into the browser and records user actions and then saves a webtest in either c# or vb.net. Then the tests can be compiled and run without a browser, ie tests use httpwebrequest with extraction rules etc.

I only have Visual Studio 2005 professional, I know that the functionality I'm after is available in I think VS 2008 Team Suite or VS for testers.

Is anyone aware of a tool for this functionality?

Hope I was clear enough.

Thanks

+2  A: 

Check out Selenium.

As well as an advanced IDE recorder, it allows you to create C# NUnit tests, as well as supports a bunch of other frameworks and languages.

Your Unit tests use the Thoughtworks Selenium API to mimic browser behaviour.

Wim Hollebrandse
Thanks. But am I correct in assuming that although selenium generates code for the tests, it runs the tests in a browser. I'd like to be able to run the tests wihout a browser. eg. using httpwebrequest and httpwebresponse. Like Visual Studio Web Test classes WebTestRequest and WebTestResponse
anne
See my update. You clearly didn't check the Selenium link out properly. ;-)
Wim Hollebrandse
A: 

No, I think you are wrong Wim Hollebrandse. You can create c# tests with the selenium .net driver, but httpwebrequest and httpwebresponse are sent through Selenium RC server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.

http://seleniumhq.org/docs/05%5Fselenium%5Frc.html

  1. The client/driver establishes a connection with the selenium-RC server.

  2. Selenium-RC server launches a browser (or reuses an old one) with an URL that injects Selenium-Core’s JavaScript into the browser-loaded web page.

  3. The client-driver passes a Selenese command to the server.

  4. The Server interprets the command and then triggers the corresponding JavaScript execution to execute that command within the browser.

  5. Selenium-Core instructs the browser to act on that first instruction, typically opening a page of the AUT.

  6. The browser receives the open request and asks for the website’s content to the Selenium-RC server (set as the HTTP proxy for the browser to use).

  7. Selenium-RC server communicates with the Web server asking for the page and once it receives it, it sends the page to the browser masking the origin to look like the page comes from the same server as Selenium-Core (this allows Selenium-Core to comply with the Same Origin Policy).

  8. The browser receives the web page and renders it in the frame/window reserved for it.

Mike