gpt4 book ai didi

visual-studio - 在 Visual Studio 2013 测试代理上使用 Shims 运行测试

转载 作者:行者123 更新时间:2023-12-03 14:30:08 27 4
gpt4 key购买 nike

我在许多网站上发现了这个问题的各种迭代,但是到目前为止,我还没有找到任何提供完整答案的内容。
我刚刚设置了一些 Visual Studio 测试代理,它们似乎都在运行并运行我们最初计划在它们上运行的大部分单元测试。但是,当我开始检查其中一个单元测试时,它在线上失败了:using (ShimsContext.Create()) ,
使用堆栈跟踪:
Result Message:

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to resolve profiler path from COR_PROFILER_PATH and COR_PROFILER environment variables.

阅读了其他一些帖子后,我在测试代理上安装了 Visual Studio 2013 并确认它可以在本地运行测试。然后我将 COR_PROFILER_PATH 设置为我的机器上正在使用的分析器,该分析器安装在:“C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\12.0.0\Microsoft.IntelliTrace.Profiler .12.0.0.dll”。
然后它在与跟踪相同的地方失败:
Test method threw exception:

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException: Failed to get profiler module handle 'C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\12.0.0\Microsoft.IntelliTrace.Profiler.12.0.0.dll'. The specified module could not be found ---> System.ComponentModel.Win32Exception: The specified module could not be found


建议是探查器已在单独的进程下加载,无法使用。有没有人在这个或类似的设置上取得过任何成功?在基本层面上,Visual Studio 测试代理可以使用 Fakes 运行测试吗?
谢谢

最佳答案

我知道这有点旧,所以 OP 可能得到了他的答案,但是对于其他任何人,我就这个问题向 Microsoft 开了一张票,经过一个半小时的查看我的设置后,我们得出了答案问题:

Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException:无法从 COR_PROFILER_PATH 和 COR_PROFILER 环境变量解析探查器路径。

, 是我在使用 mstest.exe 我应该一直使用 vstest.console.exe .就我而言,这是因为我现在的代码中有 Fakes 测试。

我正在使用 Visual Studio 2013 更新 4。

关于visual-studio - 在 Visual Studio 2013 测试代理上使用 Shims 运行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26743342/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com