Gradle:如何在控制台中实时显示测试结果? [英] Gradle: How to Display Test Results in the Console in Real Time?

查看:210
本文介绍了Gradle:如何在控制台中实时显示测试结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在运行的同一个控制台中看到测试结果(system.out / err,来自正在测试的组件的日志消息):

I would like to see test results ( system.out/err, log messages from components being tested ) as they run in the same console I run:

gradle test

不要等到测试是为了查看测试报告(这些测试报告仅在测试完成时生成,所以在测试运行时我不能尾巴-f任何东西)

And not wait until tests are done to look at the test reports ( that are only generated when tests are completed, so I can't "tail -f" anything while tests are running )

推荐答案

您可以在命令行上使用INFO日志记录级别运行Gradle。它会显示每个测试运行时的结果。缺点是你也会为其他任务获得更多的输出。

You could run Gradle with INFO logging level on the command line. It'll show you the result of each test while they are running. Downside is that you will get far more output for other tasks also.

gradle test -i

这篇关于Gradle:如何在控制台中实时显示测试结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆