2016-01-06 89 views
0

創建CodedUI SpecFlow測試時,無法在測試瀏覽器VS 2015中看到我的測試。創建CodedUI SpecFlow測試時,我無法在測試瀏覽器VS 2015中看到我的測試

我有一個CodedUI項目,我已經添加了SpecFlow,而不像使用SpecFlow項目,我無法看到SpecFlow測試在測試資源管理器中運行。

這是所有在Windows 7 VS2015終極版env。

我創建了一個.runsettings文件作爲推薦爲2013年

<?xml version="1.0" encoding="utf-8"?> 
<RunSettings> 
<configuration> 
    <configSections> 
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/> 
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 
    <section name="entityFramework" 
     type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
     requirePermission="false"/> 
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> 
    </configSections> 
    <specFlow> 
    <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --> 
    <unitTestProvider name="MsTest" generatorProvider="Specflow.CodedUI.MsTestCodedUiGeneratorProvider, Specflow.CodedUI" runtimeProvider="TechTalk.SpecFlow.UnitTestProvider.MsTest2010RuntimeProvider, TechTalk.SpecFlow" /> 
    <!-- <unitTestProvider name="SpecRun" />--> 
    <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --> 
    <plugins> 
    </plugins> 
    </specFlow> 
    <runtime> 
    <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.VisualStudio.QualityTools.CodedUITestFramework" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.VisualStudio.TestTools.UITest.Common" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.VisualStudio.TestTools.UITest.Extension" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.VisualStudio.TestTools.UITesting" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.VisualStudio.QualityTools.CodedUITestFramework" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
     <dependentassembly> 
     <assemblyidentity culture="neutral" name="Microsoft.Services.TestTools.UITesting.Html" publickeytoken="b03f5f7f11d50a3a"> 
      <bindingredirect newversion="14.0.0.0" oldversion="10.0.0.0"></bindingredirect> 
     </assemblyidentity> 
     </dependentassembly> 
    </assemblybinding> 
    </runtime> 
    <entityFramework> 
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> 
     <parameters> 
     <parameter value="mssqllocaldb"/> 
     </parameters> 
    </defaultConnectionFactory> 
    <providers> 
     <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/> 
     <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/> 
    </providers> 
    </entityFramework> 
    <system.data> 
    <DbProviderFactories> 
     <remove invariant="System.Data.SQLite.EF6"/> 
     <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" 
     description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/> 
     <remove invariant="System.Data.SQLite"/> 
     <add name="SQLite Data Provider" invariant="System.Data.SQLite" 
     description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/> 
    </DbProviderFactories> 
    </system.data> 
</configuration> 
    </RunSettings> 

我選擇的測試設置文件,在這個文件指向。

當我在本地構建我的解決方案時仍然碰到磚牆。

+0

我現在已經創建了一個CodedUI項目,並從頭開始成功添加了SpecFlow,但是我仍然沒有看到我在Test Explorer中創建的SpecFlow測試。測試本身正在建設,看起來很好,但沒有出現。任何幫助將是偉大的! –

回答

-1

現在解決了這個問題 如果你有你的項目設置保存到你的網絡文件夾而不是本地文件夾,那麼測試瀏覽器不會信任/識別項目在構建時創建的DLL,因此不會顯示測試。

如果您將項目保存到本地驅動器(C或D),或者將網絡驅動器識別爲可信。

相關問題