Behatch/contexts

Make tests green again

Closed this issue · 8 comments

We have two problems with CI:

All works fine on my computer and I am a little tired to push & wait travis fail.

Behat fails due to Behat/MinkExtension#309 , which is fixed in the recently released 2.3.1 version (Behat/MinkExtension#311). I see two options:

  1. Update composer.json to require "^2.3.1" of "behat/mink-extension" instead of "^2.0". A long jump.
  2. Explicitly specify the "marionette" parameter in "behat.yml.dist" as a workaround:
            selenium2:
                capabilities:
                    marionette: null

I used it to run tests locally. More preferable, i think.
What do you think, @sanpii ?

@ilovemistakes No, it’s still failed with or without chrome driver.

@sanpii could you create a PR where we can comment and check the travis build?

And please restart the build, as it was terminated due to The job exceeded the maximum time limit for jobs, and has been terminated.: https://travis-ci.org/Behatch/contexts/jobs/348405218#L662

@OskarStark Done. I also relaunched the travis build, but I think it is blocked by selinium (it launch the browser but it can’t control its).

I've reproduced this in the docker container. Chrome runs in a sandbox mode by default, which is utilizing linux kernel's user_namespaces and other features for resource isolation. It seems that sandbox is not available in a docker container because containers are run in unprivileged mode by default. So, for travis builds we need to start chrome with "--no-sandbox" option:

selenium2:
  capabilities:
    chrome:
      switches: ["--no-sandbox"]

Btw, behat still fails on tests/features/rest.feature:91 with PHP 5.5.38 because of this PHP bug. php/php-src#886 has not been merged to the 5.5 branch. $_SERVER['CONTENT_TYPE'] doesn't get populated.

Good job @ilovemistakes 👍