创建CodedUI SpecFlow测试时,我无法在Test Explorer VS 2015中看到我的测试。
我有一个CodedUI项目,我已经添加了SpecFlow,与使用SpecFlow项目不同,我无法看到SpecFlow测试在Test Explorer中运行。
这一切都在Windows 7 VS2015旗舰版上。
我已根据2013年的建议创建了一个.runsettings文件。
<?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 :(得分:-1)
现在解决了这个问题 如果您将项目设置保存到网络文件夹而不是本地文件夹,则测试资源管理器不信任/识别项目在构建时创建的DLL,因此不会显示测试。
如果您将项目保存到本地驱动器(C或D),或者将网络驱动器识别为可信任。