![](/img/trans.png)
[英]How to test order of method calls and redirects in spock unit testing in grails?
[英]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.