VS 2013中内置的编码UI测试未在VS 2015中运行

时间:2015-12-11 01:08:04

标签: visual-studio-2015 coded-ui-tests

我有一系列在VS 2013中构建的手工编码项目,在转换到VS 2015之后,我再也无法运行测试了。当我尝试运行或调试它们时,似乎测试运行器会跳过或中止它们。有什么建议吗?

2 个答案:

答案 0 :(得分:1)

是的,基本上我最终做的是通过项目app.config强制重定向所有测试程序集版本。这有点糟糕,因为您必须在本地注释掉重定向,并确保签入源控件的版本具有取消注释的重定向。这是一个黑客,但到目前为止,我已经能够使它工作。

这是我粘贴到app.config中的内容:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.WindowsStore.CodedUITestFramework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.WindowsStore.UITest.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.WindowsStore.UITest.Extension" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITest.ExtensionUtilities" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.WindowsStore.UITesting" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.1.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.WindowsStore.UITest.Playback" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITest.WindowsStoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>


  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.WindowsStore.UITest.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="UiaComWrapper.WindowsStore" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.CodedUITestFramework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITest.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITest.Extension" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.TestTools.UITesting" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>

  <dependentAssembly>
    <assemblyIdentity name="UiaComWrapper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0" />
  </dependentAssembly>
</assemblyBinding>

答案 1 :(得分:0)

使用VS 2015构建测试。然后您可以再次执行它们,但仅限于VS 2015.您始终使用您构建的相同版本执行。