1

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

安装似乎很顺利。

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

我尝试通过 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)

想法?

谢谢,丹

4

1 回答 1

0

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

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

上面的错误可能是由于缺乏进口,也许吧?

于 2010-11-17T03:38:15.000 回答