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

bit*_*ket 3 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
Run Code Online (Sandbox Code Playgroud)

开始测试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
Run Code Online (Sandbox Code Playgroud)

开始测试3

...

bit*_*ket 6

println in cleanup:

grails test-app --echoOut
Run Code Online (Sandbox Code Playgroud)

显示测试结束.