簡體   English   中英

有沒有一種方法可以在Grails Spock測試中輸出到STDOUT?

[英]Is there a method to output to STDOUT in a Grails Spock test?

我想通過在每次測試開始時輸出到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

...

println in cleanup:

grails test-app --echoOut

顯示測試結束。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM