Grails 1.3.3 和功能测试插件 1.2.7 问题

发布于 2024-09-13 06:49:51 字数 2958 浏览 4 评论 0原文

有人在让功能测试插件在 Grails 1.3.3 中工作时遇到过麻烦吗?我在以前的项目中使用过它,没有任何问题,但只是尝试将它安装到我的最新项目中,但没有成功。

安装似乎很顺利。

运行脚本: grails create-function-test XXXXX 会导致没有测试文件。这是输出:

Running script /Users/dan/.grails/1.3.3/projects/connect/plugins/functional-test-1.2.7/scripts/CreateFunctionalTest.groovy
Environment set to development
     [copy] Copying 1 resource to /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
    [unjar] Expanding: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-shared-files.jar into /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
   [delete] Deleting: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-shared-files.jar
     [copy] Copying 1 resource to /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
    [unjar] Expanding: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-app-files.jar into /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
   [delete] Deleting: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-app-files.jar

我尝试通过 had 创建一个测试脚本,并将其粘贴到插件页面的演示 Twitter 搜索测试中。它也失败了。这是错误和堆栈跟踪:

functionaltestplugin.FunctionalTestException: TypeError: Cannot find function forEach in object twttr,Observer. (FunctionalTestCase.groovy#752)

junit.framework.AssertionFailedError: functionaltestplugin.FunctionalTestException: TypeError: Cannot find function forEach in object twttr,Observer. (FunctionalTestCase.groovy#752)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:205)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy:526)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.doFollowRedirect(FunctionalTestCase.groovy:309)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.handleRedirects(FunctionalTestCase.groovy:496)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.makeRequest(FunctionalTestCase.groovy:490)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy:526)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at AccessControlTests.testSearch(AccessControlTests.groovy:3)

有什么想法吗?

谢谢, 担

Has anyone had any trouble getting Functional Test plugin working in Grails 1.3.3? I've used it in previous projects with no problem, but just tried installing it into my latest project with no luck.

Installation seems to go fine.

Running the script: grails create-functional-test XXXXX results in no test file. Here's the output:

Running script /Users/dan/.grails/1.3.3/projects/connect/plugins/functional-test-1.2.7/scripts/CreateFunctionalTest.groovy
Environment set to development
     [copy] Copying 1 resource to /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
    [unjar] Expanding: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-shared-files.jar into /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
   [delete] Deleting: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-shared-files.jar
     [copy] Copying 1 resource to /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
    [unjar] Expanding: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-app-files.jar into /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect
   [delete] Deleting: /Users/dan/dev/code/sterling/applications/grails/connect/trunk/connect/grails-app-files.jar

I tried creating a test script by had and pasted in the demo Twitter search test from the plugin page. It failed as well. Here's the error and stack trace:

functionaltestplugin.FunctionalTestException: TypeError: Cannot find function forEach in object twttr,Observer. (FunctionalTestCase.groovy#752)

junit.framework.AssertionFailedError: functionaltestplugin.FunctionalTestException: TypeError: Cannot find function forEach in object twttr,Observer. (FunctionalTestCase.groovy#752)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:205)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy:526)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.doFollowRedirect(FunctionalTestCase.groovy:309)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.handleRedirects(FunctionalTestCase.groovy:496)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.makeRequest(FunctionalTestCase.groovy:490)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy:526)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at functionaltestplugin.FunctionalTestCase.get(FunctionalTestCase.groovy)
at functionaltestplugin.FunctionalTestCase.invokeMethod(FunctionalTestCase.groovy:201)
at AccessControlTests.testSearch(AccessControlTests.groovy:3)

Thoughts?

Thanks,
Dan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

反话 2024-09-20 06:49:51

是的,grails 1.3.x 的功能测试插件有一个错误,根据 Marc Palmer 的说法,现在正在修复 http://grails.1312388.n4.nabble.com/Functional-Test-plugin-doesn-t-work-td2265500.html

我尝试过安装1.3版本的插件但存在依赖性问题。

上面的错误可能是由于缺少导入造成的,也许?

Yes there is a bug with the functional test plugin with grails 1.3.x that according to Marc Palmer is being fixed now http://grails.1312388.n4.nabble.com/Functional-Test-plugin-doesn-t-work-td2265500.html

I tried installing the 1.3 version of the plugin but there were dependency issues.

The errors above are probably due to a lack of imports, maybe?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文