How do I set the test output to console instead of html in gradle for specs2

蹲街弑〆低调 提交于 2019-12-05 02:15:17

You can use

test {
  //makes the standard streams (err and out) visible at console when running tests
  testLogging.showStandardStreams = true
}

But this logs stdout at the info level so you need to run gradle -i to see it (it seems this will be fixed in 1.1: http://issues.gradle.org/browse/GRADLE-1966)

Alternatively, you can add an event handler:

test {
  onOutput { descriptor, event ->
    logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
  }
}

This is not really an answer but more of a suggestion since I'm not using Gradle. Can you pass arguments to the test action and did you try passing the "console" argument?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!