Resharper - 将不确定的测试显示为不确定而不是失败?

发布于 2024-11-12 07:21:46 字数 80 浏览 6 评论 0原文

有谁知道是否有一种方法可以将 resharper 中的不确定测试显示为不确定而不是失败?除了由于错误而失败的测试之外,我想保留仍然需要实施的测试。

Does anyone know if there is a way to show inconclusive tests in resharper as inconclusive rather than failed? i would like to keep tests that still need to be implemented aside from test that are failing due to a bug.

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

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

发布评论

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

评论(1

寒尘 2024-11-19 07:21:46

使用 MSTest,您可以应用 Ignore 属性,测试运行器将忽略测试(并将其标记为“忽略”,而不是“不确定”)。

这允许您放置占位符/部分实现/忽略损坏的测试。

例如

[Ignore]
[TestMethod]
public void SomeTest()
{
    Assert.IsFalse(true);
}

不会产生失败的测试,但会被忽略。

With MSTest, you can apply the Ignore attribute and the test runners will ignore the test (and labelled it as 'ignored', rather than 'inconclusive').

This allows you to put placeholders/ partly implemented/ ignore broken tests.

e.g

[Ignore]
[TestMethod]
public void SomeTest()
{
    Assert.IsFalse(true);
}

will not produce a failed test, but will be ignored.

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