将 grails 测试应用程序失败打印到控制台
SO 上已经有几个关于此的问题,但没有一个答案令人满意。我正在做测试驱动的 Grails 开发。但是,由于 STS 不断崩溃,我无法使用它来运行单元测试,而是在命令行上使用“grails test-app”来运行它们。这很好,但是当测试失败时,它不会将失败的原因打印到控制台。按照其他线程中的建议使用 -echoOut 和 -echoErr 没有帮助,这只会打印测试期间记录或打印的内容,但不会打印 JUnit 或 Spock 失败的原因。所以目前,我总是必须等待 HTML 生成,然后在浏览器中查找故障,这确实减慢了我的速度。我会接受任何解决方案,无论多么hacky(即将其侵入grails源并重新编译它对我来说没问题!)。
There have been several questions about this on SO already, but none of the answers was satisfactory. I am doing test-driven grails development. However, because STS keeps crashing, I can't use it to run the unit tests and run them using "grails test-app" on the command line instead. This is fine, but when a test fails, it just won't print the REASON for the failure to the console. Using -echoOut and -echoErr as suggested in other threads does not help, this will only print stuff that was logged or printed during the test, but not the JUnit or Spock reason of failure. So currently, I always have to wait for the HTML to be generated and then find the failure in my browser and this reallly slows me down. I will accept any solution, no matter how hacky (i.e. hacking it into the grails source and recompiling it would be fine with me!).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以做这样的事情......
You can do something like this...