Grails中的Geb功能测试失败,因为web应用程序尚未启动

Grails中的Geb功能测试失败,因为web应用程序尚未启动,grails,groovy,Grails,Groovy,我正在尝试Geb(0.5.1)Grails(1.3.5)集成。使用JUnit runner(扩展grails.plugin.geb.GebTests)时,web应用程序在执行geb测试之前不会启动。因此测试失败,Firefox表示无法在localhost:8090上建立与服务器的连接 在同一测试应用程序中,运行功能性selenium测试(selenium rc 1.0.2插件)时不会出现问题 有人知道为什么GrailsWeb应用程序在Geb功能测试之前没有启动,而在Selenium功能测试中却正

我正在尝试Geb(0.5.1)Grails(1.3.5)集成。使用JUnit runner(扩展grails.plugin.geb.GebTests)时,web应用程序在执行geb测试之前不会启动。因此测试失败,Firefox表示无法在localhost:8090上建立与服务器的连接

在同一测试应用程序中,运行功能性selenium测试(selenium rc 1.0.2插件)时不会出现问题

有人知道为什么GrailsWeb应用程序在Geb功能测试之前没有启动,而在Selenium功能测试中却正确启动了吗

import geb.*

class GebTests extends grails.plugin.geb.GebTests {

    void testIndexSearch() {
        Browser.drive("http://localhost:8090/agora") {
            go('/admin')
            assert title == 'the title'
        }
    }

}
不需要Browser.drive()。你试过以下方法吗

import geb.*

class GebTests extends grails.plugin.geb.GebTests {
    void testIndexSearch() {
        go('/admin')
        assert title == 'the title'
    }
}
要设置Grails应用程序根以外的基本URL,请添加:

String getBaseUrl() { "http://some/url" }
不需要Browser.drive()。你试过以下方法吗

import geb.*

class GebTests extends grails.plugin.geb.GebTests {
    void testIndexSearch() {
        go('/admin')
        assert title == 'the title'
    }
}
要设置Grails应用程序根以外的基本URL,请添加:

String getBaseUrl() { "http://some/url" }

Ruben,此测试在Grails项目的test/functional目录中吗?是的,此测试在test/functional/xx/yy/zz目录中。Ruben,此测试在Grails项目的test/functional目录中吗?是的,此测试在test/functional/xx/yy/zz目录中。删除周围的Browser.drive(){}语句后,测试成功。thx删除周围的Browser.drive(){}语句后,测试成功。谢谢