views:

449

answers:

6

We have business users that we'd like to get involved writing webtests for our project, but purchasing full Visual Studio licenses just for this purpose seems like overkill.

Are there any open source or third-party tools that can be used to produce webtests that can be read by Visual Studio?

I would prefer a tool that integrates into IE or Firefox and can generate tests as simply as the point-and-click method that the Visual Studio integration provides.

+1  A: 

You could check out Selenium, at http://seleniumhq.org/.

"Maybe the most complete package of the bunch and supports testing in IE, FireFox and Safari. Your unit tests are written in java, so you just need to learn the API. They also have interesting server options where you can run your tests across servers. You can even record tests using a FireFox add-on." (source)

You can later run the tests created with Firefox as unit tests in C#, for example.

Andrea
Thank you. We looked into that, but we'd like to stick with the Microsoft stack *if* possible.
The Matt
A: 

I don't know of anything that uses visual studios web test framework but, as Andrea pointed out, you can use selenium. I would recommend Selenium RC because you can write you tests in whatever language and test framework you want as long as there is support for http connections. I use rc to write tests in C# with NUnit but you could use any vb, ironpython, managed c++, f#, etc. and the Microsoft test framework. The Selenium IDE is a firefox browser extension (no IE version available yet) but selenium works in most web browsers including IE, FF, Safari and Opera.

Other options could include WatiN, which is similar to selenium. Both frameworks support a Functionality testing approach. For unit tests you may want to take a look at NunitAsp.

Wesley Wiser
+1  A: 

You can use something like selenium, watir, webrat, etc. Here is an article from Scott Hanselman that describes integrating watir into an NUnit assertion:

http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx

It's actually a great example that can be used to tie an external testing framework into the MS Test framework as well. This is a project where a small amount of effort to create an assertion that reads the external test framework output, but it's not difficult. We are using this at work now with watir and possibly soon with a combination of webrat and mechanize.

Watir does have a recorder available, check out OpenQA: http://watir-recorder.openqa.org/

RJBrady
+2  A: 

While I would consider Selenium and Watin/Watir as valuable alternatives, they are preety robust testing solutions, I don't think neither would allow you to record .webtests as done by VisualStudio 2008 out of the box. I believe they record unit tests which is fine if that is what you want. The only tool that I know that does exactly what you are asking for is Fiddler.

http://www.fiddler2.com/fiddler2/

Roberto.-

Roberto Hernandez
thank you. fiddler looks somewhat complicated for a non-technical user to use, but I suppose I have little choice.
The Matt
A: 

Fiddler2 allows users to record thier browser session as a Visual Studio web test.

That would allow people to create the basic tests. However, developing a good web test usually involves a coded webtest, not quite so good without the test edition of Visual Studio.

Nat
A: 

I would definitely recommend other tool for this purpose. Microsoft VSTS WebTest are designed for performance testing and are not a good tool for functional testing.

In most of the cases WebTest would have to be correlated which will take care of maintaining HTTP session and other dynamic values. You could follow this guide if you are still interested.

I guess the best option for your team would be to use Selenium with just simple record and playback. From my experience business users will not be technical enough to cope with scripting.

You could get additional benefit of being able to play back the script on more browsers (comparing to Selenium) if you decide to adopt WARIT but it has different kind of challenge and will not be suitable tool for business users either.

Thanks, Maciej

Maciej Zaleski