Grails 1.3.3和Functional Test插件1.2.7问题

时间:2010-08-04 22:49:24

标签: grails functional-testing

有没有人在Grails 1.3.3中使用Functional Test插件时遇到任何问题?我已经在以前的项目中使用它没有问题,但只是尝试将它安装到我的最新项目中,没有运气。

安装似乎没问题。

运行脚本:grails create-functional-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

我尝试创建一个测试脚本,并在插件页面的演示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)

思考?

谢谢, 丹

1 个答案:

答案 0 :(得分:0)

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

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

上述错误可能是由于缺乏进口,可能?