开发者

Trying to get selenium to start up using MSTest when running tests in Visual Studio

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 som开发者_运维问答e 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜