MinkExtension
MinkExtension copied to clipboard
saucelabs connection fails when tests are run by jenkins
This one took me a while to debug, as the test was running fine when run by hand, and failed when run via jenkins.
In short: when jenkins runs selenium tests, the Selenium2Factory sets some capabilities: tunnel-identifier, build, tags. This makes the connection to saucelabs fail (symptoms: no test running at all in saucelabs console, behat aborting with no output on the command line, our test code which is supposed to take a screenshot of the browser session creates a 0-bytes file).
I commented out the injection of tunnel-identifier, and the test now passes.
I think that the injection of capabilities should be enabled/disabled by a specific setting in the conf
Note: a workaround is to set by hand in the yml config, in the desired capabilities, tunnel-identifier to an empty string
Sorry for getting back to this only now, but I believe #201, that I've created recently might offer a way to solve this problem. This however will create a BC break for people expecting tunnel to be always started.
Buncha whooo haaa... took me forever to find this issue... Created a PR https://github.com/Behat/MinkExtension/pull/287