Behatch / contexts

Behat extension with most custom helper steps
Other
393 stars 203 forks source link

Make tests green again #242

Closed sanpii closed 6 years ago

sanpii commented 6 years ago

We have two problems with CI:

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

ilovemistakes commented 6 years ago

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 ?

sanpii commented 6 years ago

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

OskarStark commented 6 years ago

@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

sanpii commented 6 years ago

@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).

ilovemistakes commented 6 years ago

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"]
ilovemistakes commented 6 years ago

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.

OskarStark commented 6 years ago

Good job @ilovemistakes 👍

sanpii commented 6 years ago

@ilovemistakes thank you very much, that works :tada:

https://travis-ci.org/Behatch/contexts/builds/351320817