有没有一种方法可以在Grails Spock测试中输出到STDOUT?

时间:2012-02-09 20:11:28

标签: testing grails integration-testing spock

我想通过在每次测试开始时输出到STDOUT来跟踪Grails Spock集成测试的进度。因此,在测试运行时,从服务和控制器输出的日志数据和显示测试开始的输出都是混合的。

示例:

开始测试1

2012-02-09 13:01:41,375 [main] DEBUG  - Adding included service vertex 2 to DAG

2012-02-09 13:01:41,377 [main] DEBUG  - Adding this service vertex 4f34262584ae3fec6cc2d0f0 to DAG

开始测试2

2012-02-09 13:01:41,377 [main] DEBUG   - Connecting included service vertex 4f34262584ae3fec6cc2d0f0 to 2

2012-02-09 13:01:41,379 [main] DEBUG   - Added all the edges to the DAG for this service 4f34262584ae3fec6cc2d0f0

开始测试3

...

1 个答案:

答案 0 :(得分:6)

println in cleanup:

grails test-app --echoOut

显示测试结束。