如何加速grails测试执行 [英] How to speed up grails test execution

查看:66
本文介绍了如何加速grails测试执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在开发Grails 1.0.5应用程序时,我惊讶于 grails test-app 命令的速度有多慢。尽管实际测试只需要10秒钟,但整个执行过程总计为:


real 1m26.953s
user 0m53。 955s
sys 0m1.860s

这包括grails引导,加载插件,编译所有代码等。



任何有关如何加速 grails test-app 执行的提示都将不胜感激。

解决方案

您可以使用交互模式加速您的测试运行。

  grails interactive 



<然后键入

  test-app 

第一次和往常一样,但每次之后都会显着加快。目前有一些交互模式的问题(比如几次运行后内存不足),但我仍然认为它值得。

While developing a Grails 1.0.5 app I'm appalled at how slow the grails test-app command is. Even though the actual tests take just ~10 seconds, the whole execution adds up to

real 1m26.953s user 0m53.955s sys 0m1.860s

This includes grails bootstrapping, loading plugins, compiling all the code, etc.

Any hints on how to speed up the grails test-app execution would be greatly appreciated.

解决方案

You can use interactive mode to speed up your test runs.

Just run

grails interactive

Then type

test-app

The first time will be the same as usual but each time after that will be dramatically faster. There are currently some issues with interactive mode (like running out of memory after a few runs) but I still find it worth it.

这篇关于如何加速grails测试执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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