有没有办法在 resharper 的测试运行程序中显示部分类名?
我创建了一组测试,并使用部分类将它们组合在一起。有没有办法让部分名称显示在测试运行程序中?我所拥有的类似于
文件 1:
public partial class MyWrapperClass
{
[TestClass]
public class This_is_a_descriptive_scenario {
[TestMethod]
public void This_is_a_descriptive_scenario_outcome() { ... }
}
}
文件 2:
public partial class MyWrapperClass
{
[TestClass]
public class This_is_a_descriptive_scenario2 {
[TestMethod]
public void This_is_a_descriptive_scenario2_outcome() { ... }
}
}
当在 Visual studio 的内置测试运行器中运行此类测试时,如果我已将类列添加到测试结果中,我可以看到结果为:MyWrapperClass+This_is_a_descriptive_test。但是,当您在 resharper 的 testrunne 中运行测试时,它们会按项目和/或命名空间以及类名进行分组,但我看不到这些测试是任何地方的部分类的一部分。这可能吗?
I have created a set of tests that I have grouped together by using a partial class. Is there a way to get the partial name to show up in the test runner? What I have is something like
File 1:
public partial class MyWrapperClass
{
[TestClass]
public class This_is_a_descriptive_scenario {
[TestMethod]
public void This_is_a_descriptive_scenario_outcome() { ... }
}
}
File 2:
public partial class MyWrapperClass
{
[TestClass]
public class This_is_a_descriptive_scenario2 {
[TestMethod]
public void This_is_a_descriptive_scenario2_outcome() { ... }
}
}
When running tests like that in the builtin test runner in Visual studio I can see the result as: MyWrapperClass+This_is_a_descriptive_test, if I have added the class column to the test result. But when you run the test in resharper's testrunne they are grouped by project and/or namespace and the class name, but I can't see that the tests are part of a partial class anywhere. Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为这不被支持。尽管可能可以延长它。如果你愿意沿着这条路走下去,我可以为你指明正确的方向。
最简单的解决方案是使用命名空间进行分组而不是部分类。
希望这对
米格尔有帮助
I don't think this is supported. Although it might be possible to extend it. I can point you in the right direction if you're willing to go down that path.
The easiest solution would be to use namespaces for grouping instead of partial classes.
Hope this helps
Miguel
两个文件中的分部类的名称是相同的...不,当前没有任何内容可以按测试文件名对测试进行分组。
The name of a partial class is the same in either file... No, there's nothing that currently groups tests by test file name.