我可以运行grails集成&针对运行的服务器进行功能测试 [英] Can I run grails integration & functional tests against a running server?

查看:94
本文介绍了我可以运行grails集成&针对运行的服务器进行功能测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Grails中运行集成和功能测试时,我发现反馈看起来很慢。有没有一种方法可以在我编写测试时针对正在运行的服务器实例运行它们,以便在每次执行时节省服务器启动时间?

解决方案

您可以使用 grails interactive ,它可以在不启动服务器的情况下执行所需操作。它启动JVM并保持运行,您可以使用它来运行单元和集成测试。请记住,您最终会耗尽内存并需要定期重启。请参阅 http://docs.grails.org/latest/guide/gettingStarted.html# usingInteractiveMode



同样在1.3.5中,您可以针对正在运行的服务器运行功能测试。使用第9.3节中描述的 baseUrl 属性,位于 http:// grails.org/doc/latest/


I'm finding the feedback look pretty slow when running integration and functional tests in Grails. Is there a way I can run them against a running server instance while I'm writing the tests, to save on server startup time each time they're executed?

解决方案

You can use grails interactive which does what you want without starting a server. It starts a JVM and keeps it running and you can use it to run unit and integration tests. Keep in mind that you'll eventually run out of memory and need to restart periodically. See http://docs.grails.org/latest/guide/gettingStarted.html#usingInteractiveMode

Also in 1.3.5 you can run functional tests against a running server. Use the baseUrl attribute described in section 9.3 at http://grails.org/doc/latest/

这篇关于我可以运行grails集成&针对运行的服务器进行功能测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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