【发布时间】:2010-12-12 18:24:38
【问题描述】:
我正在尝试 Geb (0.5.1) Grails (1.3.5) 集成。使用 JUnit 运行器(扩展 grails.plugin.geb.GebTests)时,Web 应用程序在执行 Geb 测试之前不会启动。因此测试失败,Firefox 说它无法在 localhost:8090 建立与服务器的连接。
在同一个测试应用程序中运行功能性硒测试(selenium-rc 1.0.2 插件)运行没有问题。
有人知道为什么 grails Web 应用程序在 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'
}
}
}
【问题讨论】:
-
Ruben,这个测试在你的 Grails 项目的 test/functional 目录中吗?
-
是的,测试在test/functional/xx/yy/zz目录下。