VS11 Dev Preview 单元测试资源管理器不显示单元测试
我想知道是否有人遇到过 MSTest 单元测试未显示在新的单元测试资源管理器中的问题。
我运行的是 Windows 7(32 位)。我从下面的链接下载了 VS11 开发者预览版。 http://www.microsoft.com/download/en/details.aspx ?id=27543
我创建了一个示例 C# 控制台应用程序,并从 MSTest 项目模板添加了测试库。然后我创建了一个示例单元测试,并重建了解决方案。当我打开测试资源管理器(View->OtherWindows->UnitTest Explorer)时,我没有看到任何已加载的测试。
我只看到一条消息说…… “没有发现任何测试。请构建您的项目并确保安装了适当的测试框架适配器”。
我假设 MSTest 适配器已自动安装。如果没有,我什至不知道如何安装适配器。
我可能在这里遗漏了一些东西,但我无法弄清楚。有人遇到过这个问题吗?
I wonder has anyone come across with this issue where the MSTest Unit Test doesn’t show up in the new Unit Test Explorer.
I’m running Windows 7 (32bit). I downloaded the VS11 Developer Preview from the link below. http://www.microsoft.com/download/en/details.aspx?id=27543
I created a sample C# Console App, and add the Test Library from the MSTest project template. Then I created a sample Unit Test, and rebuild the solution. When I open the Test Explorer (View->OtherWindows->UnitTest Explorer) I do not see any tests loaded.
I only see a message saying…
“No test discovered. Please build your project and ensure the appropriate test framework adapter is installed”.
I assume the MSTest adapter is automatically installed. If not I’m not even sure how to install an adapter.
I could be missing something here but I cannot figure it out. Has anyone experiencing this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
发现这仅适用于Windows8。 (现阶段)
更多信息
http://jerssoft.blogspot.com/2011 /09/vs11-unit-test-explorer-acercamientos.html#more
(你需要翻译成英语)
“当然,如果我们正确配置并在最终版本中,所有这些都会以正确的方式工作,因为根据理解,如果你想尝试这个插件,你需要工作使用 Windows 8 :) "
http://geekswithblogs.net/lbugnion/archive/2011/09/24/running-unit-tests-in-visual-studio-2011-and-windows-8.aspx
Found out that at this only works with Windows8. (At this stage)
More info
http://jerssoft.blogspot.com/2011/09/vs11-unit-test-explorer-acercamientos.html#more
(you need to translate to English)
"Of course, all this work the right way if we have properly configured and in the final version , since according to understand, if you want to try this plugin, you need to be working with Windows 8 :) "
http://geekswithblogs.net/lbugnion/archive/2011/09/24/running-unit-tests-in-visual-studio-2011-and-windows-8.aspx
如果您使用的是 VS Ultimate 版本的 VS 11 开发人员预览版,那么它支持针对 Windows7 风格的应用程序/项目进行基于 MStest 的单元测试(如果您正在尝试这样做)。您可能遇到了错误。可以分享一下你的重现步骤吗?
谢谢,
阿布舍克·阿格拉瓦尔
项目经理,Visual Studio,
微软公司
If you are using VS Ultimate version of VS 11 developer preview, then it support MStest based unittesting for Windows7 style apps/projects if that is what you were trying out. It is possible that you are hitting a bug. Will it possible for you to share your repro steps?
Thanks,
Abhishek Agrawal
Program Manager, Visual Studio,
Microsoft Corp
这对我使用 Visual Studio Express 2012 Web RC 不起作用,但我最终还是成功了。
我添加了对 Microsoft.VisualStudio.QualityTools.UnitTestFramework 的引用,我在 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies 中找到了它,
我确保将其设置为“复制本地”,但可能不需要。
然后我尝试清理和重建但没有效果。我确保我没有选择任何测试设置(测试菜单>测试设置>取消选中testrunconfig,如果选择),然后更改我的测试>测试设置>默认处理器架构为 x64(我的机器是 x64)。
然后我清理并重建了解决方案,当我单击“全部运行”时,我的测试资源管理器已填充。
This wasn't working for me using Visual Studio Express 2012 Web RC, but I got it going eventually.
I added the reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework which I found in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies
I made sure this was set to Copy Local but probably not required.
Then I tried cleaning and rebuilding but with no effect. I made sure I didn't have any testsettings selected (Test Menu > Test Settings > Untick the testrunconfig if selected), then changed my Test > Test Settings > Default Processor Architecture to x64 (my machine is x64).
Then I cleaned and rebuilt the solution and my Test Explorer was populated when I click Run All.