invoking GORM methods from Geb tests

大憨熊 提交于 2019-12-02 06:15:15

You really should always use grails remote control plugin. You should not depend on the fact that your tests and the application under test run in the same JVM and that you are able to call grails code from your test. This approach will only work under certain circumstances while using the remote control plugin for this will work always.

Even if your tests and app are running in the same JVM (as most probably is still the case for you) some methods, like GORM for example, might be restricted by grails to be only called from a context of a request, because they need that context to be able to work correctly.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!