2014-09-03 90 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分析器必須對目錄路徑做些什麼,導致解析錯誤