Browser 我的cuke4duke测试挂起并且永远不会终止

Browser 我的cuke4duke测试挂起并且永远不会终止,browser,cucumber,bdd,webdriver,geb,Browser,Cucumber,Bdd,Webdriver,Geb,我不明白为什么我的基于web的Cumber测试从未终止。所有步骤定义都会通过,但浏览器在最后一个步骤中从未退出,因此我的脚本挂起 我目前正在运行cuke4duke(0.4.3)、Geb(0.5.1)、maven(2.2.1)、selenium-firefox驱动程序/selenium-chrome驱动程序(2.0a6和a7) 我已经在Chrome和Firefox(3.6)/WindowsXP和Ubuntu中测试了我的脚本,但没有成功 下面是我的maven构建的输出 [INFO] Scenar

我不明白为什么我的基于web的Cumber测试从未终止。所有步骤定义都会通过,但浏览器在最后一个步骤中从未退出,因此我的脚本挂起

我目前正在运行cuke4duke(0.4.3)、Geb(0.5.1)、maven(2.2.1)、selenium-firefox驱动程序/selenium-chrome驱动程序(2.0a6和a7)

我已经在Chrome和Firefox(3.6)/WindowsXP和Ubuntu中测试了我的脚本,但没有成功

下面是我的maven构建的输出

[INFO]   Scenario: Navigate from homepage               # features/helppage.feature:7
[INFO]     Given I am on the homepage                   # Helppage$_run_closure1@f93ee4
[INFO]     When I click on the about page               # Helppage$_run_closure2@1c87031
[INFO]     Then the title should display "About Google" # Helppage$_run_closure3@1f784d7
[INFO] 
[INFO] 1 scenario (1 passed)
[INFO] 3 steps (3 passed)
[INFO] 0m5.421s
HANGING HERE
环境groovy

import geb.Browser
import org.openqa.selenium.chrome.ChromeDriver;

this.metaClass.mixin(cuke4duke.GroovyDsl)

Before() {
new Browser(new ChromeDriver(),'http://www.google.com')
}

After() {
clearCookies()
}
helppage.groovy

this.metaClass.mixin(cuke4duke.GroovyDsl)

Given (~/I am on the homepage/) {
go('/')
}

When (~/I click on the about page/) {
go('/intl/en/about.html')
}

Then (~/the title should display "(.*)"/) { pageTitle ->
assert title == pageTitle
}

我无法确定问题是否出在webdriver、cuke4duke发行版或其他任何地方。我也不确定如何在maven构建中添加更多调试,以找出问题所在。

您是否尝试过在不使用cuke4duke的情况下运行它


我发现cuke4duke非常有趣,但决定甚至放弃JRuby(不确定您是否正在使用它),直接使用ruby安装,这会更快更可靠。

尝试更新到最新的JRuby(1.6.0)。可能与此问题有关:

我认为您需要在浏览器上调用
quit()
(您可能需要在
Before()
钩子中保存一个句柄)


我没有时间确定测试它-我们已经从cuke4duke迁移到cucumber groovy,但我认为这实际上是您在这里看到的Geb浏览器问题。

我现在也遇到了类似的问题。设置:Cucumber/cuke4duke和步骤定义中的webdriver(selenium)。所有WebDriver都工作正常(例如,HTMLUnit、firefox),但chromedriver在所有测试完成后挂起的位置与您的示例完全相同@瑞典人:你在这个问题上有什么进展吗?