English 中文(简体)
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 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?

问题回答

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.





相关问题
building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

热门标签