加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – Specs2:忽略规格与消息?

发布时间:2020-12-16 09:44:38 所属栏目:安全 来源:网络整理
导读:我需要将我的一个测试用例置于“待定”状态。 我想在运行测试时向输出显示一些信息,像JInit @Ignore(“Pending:issue#1234需要修复”)。 与Specs2有相当的吗? class MySpec extends mutable.Specification { args(skipAll = true) // Can I include a mes
我需要将我的一个测试用例置于“待定”状态。

我想在运行测试时向输出显示一些信息,像JInit @Ignore(“Pending:issue#1234需要修复”)。

与Specs2有相当的吗?

class MySpec extends mutable.Specification {
  args(skipAll = true) // Can I include a message here in the output somehow?

  "cool MyClass feature" should {
    "which is broken unfortunately" in {
      failure
    }
  }
}

提前致谢!

解决方法

对于一个个别的例子,我相信你可以使用:

class MySpec extends mutable.Specification {

  "cool MyClass feature" should {
    "which is broken unfortunately" in {
      failure
    }.pendingUntilFixed("message about the issue")
  }

}

我不知道是否有办法扩展它,以将标签中的所有示例标记为待处理的相同消息,如您所希望的那样。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读