开发者

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

开发者 https://www.devze.com 2022-12-12 09:58 出处:网络
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:

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

精彩评论

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