views:

302

answers:

1

I'm trying to run selenium web tests in Visual Studio using MSTest. I have a selenium process class, a selenium runner class and a web dev test class, as in this article: http://keithbloom.wordpress.com/2009/10/16/running-selenium-tests-in-visual-studio/

I get the command prompt opening and I can see the selenium startup messages when I debug. However the first time I call selenium.Open everything shuts down. The MSTest error is reference not set to instance of an object?

And when I try and run it with Resharper (using MSTest), obviously all the paths are wrong :( And for some reason Resharper takes about 2 mins to start the test where as MSTest takes 5s?

Anyone have any idea how to get these tools to actually work together?

+1  A: 

I use Selenium with C# and NUnit quite regularly. I don't use MSTest for my tests but they tend to run quite quickly.

I have put together a C#/NUnit/Selenium tutorial a while ago. The URL for the Tutorial is http://www.theautomatedtester.co.uk/seleniumtraining/selenium_csharp_nunit.htm. I have never tried to run it with Resharper or MSTest but it should work fine. Just need to change the method attributes to the relevant MSTest items.

AutomatedTester