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

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

问题描述

在开发 Grails 1.0.5 应用程序时,我对 grails test-app 命令的运行速度感到震惊.即使实际测试只需要大约 10 秒,整个执行加起来

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

真正的 1m26.953s用户 0m53.955s系统0m1.860s

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

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

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

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

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.

就跑

grails interactive

然后输入

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天全站免登陆