创建CodedUI SpecFlow测试时,我无法在测试浏览器VS 2015中看到我的测试

问题描述:

创建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测试。测试本身正在建设,看起来很好,但没有出现。任何帮助将是伟大的! –

现在解决了这个问题 如果你有你的项目设置保存到你的网络文件夹而不是本地文件夹,那么测试浏览器不会信任/识别项目在构建时创建的DLL,因此不会显示测试。

如果您将项目保存到本地驱动器(C或D),或者将网络驱动器识别为可信。