There is no instructions on howto run the @javascript tests. Also it might be helpful to include instructions on how to run the tests on systems with vagrant?

Comments

  • Commit ccbe4ff on 7.x-1.x by dsnopek:
    Issue #2199689: Improve README.txt on how to run Behat tests.
    
dsnopek’s picture

Status: Active » Fixed

Now that we have the excellent documentation written by @cboyden here:

https://drupal.org/node/2271009

I've updated the README.txt to point to that page!

cosmicdreams’s picture

I might be good to include solutions to common troubleshooting issues. From https://drupal.org/node/1783000

Q. Some tests run, but then I see the following Curl error:

[WebDriver\Exception\CurlExec]
Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::beforeScenario()
Curl error thrown for http POST to http://localhost:4444/wd/hub/session$s
couldn't connect to host
You can't just install selenium.

You need to have selenium running on the system that runs your tests for all feature/scenarios tagged with @javascript!
java -jar yourseleniumjarfile.jar

dsnopek’s picture

Wow, I haven't encountered any of those errors, but that link is awesome! Thanks for sharing it!

For the time being, I've added a "Troubleshooting" section our Behat documentation and simply linked there. As we encounter more problems when more people try to run our tests, we can build our own set of tips.

cosmicdreams’s picture

BTW, I posted that because I ran into this problem myself. With the help of Panopoly's tests I was able to follow the instructions, get Selenium running and run the tests.

It's was a very cool way to demonstrate the value of Behat to coworkers.

However, it was confusing at first why it didn't just work because I had skipped over the section that called out Selenium as a requirement.

Also it appears that PhpStorm is adding support for Behat but needs help tracking down all the bugs in their current implementation here: http://youtrack.jetbrains.com/issue/WI-6325

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.