Resharper 单元测试问题

发布于 2024-08-04 04:25:48 字数 176 浏览 2 评论 0原文

我在 resharper 尝试使用 mstest 运行我的单元测试时遇到了一些烦人的问题。我可以选择一个单独的单元测试并运行/调试它,但是当我选择父节点来运行一堆测试时,测试不会运行;它只是显示待处理几秒钟,然后测试变成灰色。如果我在测试中设置断点并使用调试器重试,我会得到相同的结果,并且不会命中任何断点。以前有其他人经历过这种情况吗?

I'm having a little annoying problem with resharper trying to run my unit tests, using mstest. I can select an individual unit test and run/debug it fine but when I select the parent node to run a bunch of tests, the tests don't run; it just displays pending for a few seconds and then the test goes grey. If I set breakpoints in the tests and try again with the debugger, I get the same result and no breakpoints are hit. Has anyone else experienced this before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

够钟 2024-08-11 04:25:48

对于使用 VS2012 update 2 的任何人(查理提出问题时显然不是,但对于其他人......),请确保您拥有 R# 版本 7.1.3 或更高版本。在撰写本文时,官方版本为 7.1.2,因此您必须点击此链接才能下载它:
http://download.jetbrains.com/resharper/ReSharperSetup.7.1.3000.1964.msi
(引用自 http://youtrack.jetbrains.com/issue/RSRP-339987

For anyone using VS2012 update 2 (Charlie obviously wasn't when he asked the question, but for anyone else...), then make sure you have R# version 7.1.3 or later. At the time of this writing, the official release is 7.1.2 so you'll have to follow this link to go download it:
http://download.jetbrains.com/resharper/ReSharperSetup.7.1.3000.1964.msi
(as referenced from http://youtrack.jetbrains.com/issue/RSRP-339987)

痞味浪人 2024-08-11 04:25:48

尝试重建您的测试项目/整个解决方案。
我有时会遇到类似的问题,resharper 显示我已删除的测试,或者不执行 SUT 项目中新方法的测试。重建后,它会恢复同步。

Try to rebuild your test project/entire solution.
I sometimes have similar problems where the resharper shows tests that I have removed, or doesn't execute tests for new methods in the SUT project. After a rebuild it gets back in sync.

计㈡愣 2024-08-11 04:25:48

ReSharper 5.0.1659 和 VS2010 也遇到了这个问题。事实证明,问题出在 VS 以常规 VS 方式运行测试时创建的 testrun 配置文件中的某个位置。从两张光盘以及解决方案文件中的引用中删除它们,解决了问题,我能够再次使用 ReSharper 运行测试。

Ran into this problem aswell with ReSharper 5.0.1659 and VS2010. Turns out that the problem lies somewhere in the testrun config files that VS creates when running test the regular VS way. Removed them from both disc as well as references in solution file which solved the problem and I was able to run the tests with ReSharper again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文