-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Behat work again (quick workaround) #110
Comments
Thanks for this tip @kabalin, which almost worked to get the qtype_stack Behat tests passing again. However, it did not work: https://travis-ci.org/timhunt/moodle-qtype_stack/jobs/653818879 2 errors:
Have you seen these before? Do you know what they mean? |
Hello @timhunt! No, I did not see similar errors yet. Regarding the first one, I see in the CI log that you run behat test immediately following webserver and senenium container start. I think it could be that behat test is executed before Selenium container is fully ready (as you see it does not fail on the re-run)? I tried adding https://travis-ci.org/kabalin/moodle-qtype_stack/jobs/653942531 Notice, I also removed some obsolete dependencies in your travis file, we do not need Behat related packages since we run it in container and also Java 9 is not required (we use default one which is version 11, mustache issue associated with this was addressed in #91). You can keep bionic requirement, I removed it only to test if this will resolve your second error. Regarding second error, not sure why this does not work, worth trying with Firefox driver may be to confirm? |
@timhunt after some trial and error this issue has been fixed by mounting Moodle directory inside selenium container, i.e.:
Looks like webdriver expects file to be local when upload step is used, so when we are using docker container, it is obviously not there. Here is a successful build of qtype_stack using this change: https://travis-ci.org/github/kabalin/moodle-qtype_stack/jobs/661027012 |
@kabalin I just wanted to say a huge "thank you" to you for working this out and sharing it. I have been making heavy use of it today, verifying my plugins for Moodle 3.9. |
Not at all @timhunt, glad it was helpful 😃 |
Most
moodle-plugin-ci
users are experiencing issues with Behat tests which stopped working at some point last year. While PR #107 is under consideration, this is a quick workaround to make it work again:To sum up, we use
MOODLE_START_BEHAT_SERVERS=NO
to disable built-in selenium and php server initialisation, and then start respective services ininstall
stage after installation step. Selenuim server is initialised using docker image.Please note, this requires Ubuntu Xenial build environment (currently default one in Travis).
The text was updated successfully, but these errors were encountered: