Search code examples
cucumberwebdrivergherkincucumber-jvm

Acceptance tests using Cucumber/Webdriver never complete


We're using Gherkin, Cucumber-jvm and Webdriver to run acceptance tests against a standard Java/Spring webapp. The issue is that, when running the tests using a Maven job, the tests completely successfully but the job does not complete. Only on closing of the Firefox window does the job complete.

We have a workaround of closing the browser explicitly after each feature, but this will quickly become unsustainable due to time lag.

The tech stack is as follows:

Cucumber-JVM 1.0.4

Selenium 2.12.0

Firefox 8.0

The app runs in JBoss EAP 5.1 on a Windows 7 machine.

When we used the JRuby version of Cucumber, this behaviour did not appear with the above selenium/firefox combination, although it did when we used higher versions of either.

Has anyone seen this behaviour before, and does anyone have any suggestions or workarounds?

Thanks in advance


Solution

  • Do you close your WebDriver?

    @cucumber.annotation.After
    public void afterScenarioRun() {
        driver.close();
    }