2014-09-03 43 views
2

在执行硒自动化测试在Visual Studio 12单元测试项目是给下面的错误:硒C#MSTest的 - 无法为runsettings插件配置设置 'VSTest运行配置'

------ Discover test started ------ 
Failed to configure settings for runsettings plugin 'VSTest Run Configuration' as it threw following exception: 
'An error occurred while parsing EntityName. Line 1, position 14.' 
Please contact the plugin author. 
Failed to configure settings for runsettings plugin 'VSTest Run Configuration' as it threw following exception: 
'An error occurred while parsing EntityName. Line 1, position 14.' 
Please contact the plugin author. 
-------------------------- 

测试方法:

[TestMethod] 
public void Test_Login() 
{ 
     IWebDriver driver = new FirefoxDriver(); 
     driver.Navigate().GoToUrl("https://google.co.in"); 
} 

环境:OS:Win7的64位/火狐32.0/Seleniom客户端C#(2.42.0)

详细错误:

Test Name: Test_Login 
Test FullName: SeleniumCSharp.Login.Test_Login 
Test Source: d:\Project\R&D\Selenium\SeleniumCSharp\SeleniumCSharp\Login.cs : line 31 
Test Outcome: Failed 
Test Duration: 0:00:48.1050863 

Result Message: 
Test method SeleniumCSharp.Login.Test_Login threw exception: 
OpenQA.Selenium.WebDriverException: Failed to start up socket within 45000 ms. Attempted to connect to the following addresses: 127.0.0.1:7055 
Result StackTrace: 
at OpenQA.Selenium.Firefox.FirefoxDriverServer.ConnectToBrowser(TimeSpan timeToWait) in c:\Projects\webdriver\dotnet\src\webdriver\Firefox\FirefoxDriverServer.cs:line 275 
    at OpenQA.Selenium.Firefox.FirefoxDriverServer.Start() in c:\Projects\webdriver\dotnet\src\webdriver\Firefox\FirefoxDriverServer.cs:line 97 
    at OpenQA.Selenium.Firefox.FirefoxDriverCommandExecutor.Execute(Command commandToExecute) in c:\Projects\webdriver\dotnet\src\webdriver\Firefox\FirefoxDriverCommandExecutor.cs:line 58 
    at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 852 
    at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 830 
    at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 89 
    at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxBinary binary, FirefoxProfile profile) in c:\Projects\webdriver\dotnet\src\webdriver\Firefox\FirefoxDriver.cs:line 151 
    at OpenQA.Selenium.Firefox.FirefoxDriver..ctor() in c:\Projects\webdriver\dotnet\src\webdriver\Firefox\FirefoxDriver.cs:line 119 
    at SeleniumCSharp.Login.Test_Login() in d:\Project\R&D\Selenium\SeleniumCSharp\SeleniumCSharp\Login.cs:line 32 

注意:当我执行的测试方法,第一次它得到成功执行。但是对于 所有后续执行都提高了以上错误。

请帮我解决这个问题。

回答

1

我发现其中一个父文件夹的标题中有一个&符号(&),这导致了错误......尽管这是一个无用的错误消息?我猜XML分析器必须对目录路径做些什么,导致解析错误