Page MenuHomekolab.org

Selenium executed with driver 'firefox' despite env variable phantomjs
Closed, ResolvedPublic

Description

Tests will currently fail, as Selenium is executed with a firefox web browser, despite an environment variable ROUNDCUBE_TEST_BROWSER set to phantomjs. tests/Selenium/bootstrap.php seems to refer to firefox if no configuration value is set, leading me to believe that the environment variable is not taken in to account.

This, as such, may be a setup problem.

However, when tests/Selenium/bootstrap.php default is substituted for phantomjs, the tests still fail. This may (again) have to do with the environment variables not being taken in to account (not unlike ROUNDCUBE_TEST_BROWSER) however rather than fail instantly the tests seem to time out.

Details

Ticket Type
Task

Event Timeline

vanmeeuwen updated the task description. (Show Details)
vanmeeuwen raised the priority of this task from to 60.
vanmeeuwen added a project: Roundcube.
vanmeeuwen changed Ticket Type from Task to Task.
vanmeeuwen added a subscriber: vanmeeuwen.

P2 has the relevant snippet of the stdout/stderr output.

That might be down to an ugly typo in integration/stick/phpunittest.py where ROUNDCUBE_TEST_BROWSER should be ROUNDCUBE_TESTS_BROWSER instead.

But... if the direct substitution in bootstrap.php doesn't work, I'm out of ideas. All it does is to forward that value to PHPUnit_Extensions_Selenium2TestCase::setBrowser().

Please note that for the standalone Selenium server to run with PhantomJS, the phantomjs binary needs to be executable for the java process. Although I don't know the internals how Selenium interacts with PhantomJS. I was happy enough to just see it work on my dev box.

petersen removed a subscriber: bruederli.
vanmeeuwen added a subscriber: bruederli.

I've fixed the typo and reverted all workarounds (sed, installing firefox) to get back to the supposed base-line in which this should work.

FWIW, we install selenium-standalone-server.jar in /usr/local/lib/, and phantomjs in /usr/local/bin/ -- the latter may or may not be included in the $PATH if at all it does take such a thing in to account.

P3 holds the current output for integration tests.

The way to reproduce this locally is to run the container:

$ docker run -it --rm=true --hostname=kolab.example.org -e ID=847 -e COMMIT=1e3d637c7087ad5533814e9fdc45b0cbdde36a53 \
      -e DIFFERENTIAL= -e PACKAGE=roundcubemail -e PHAB_CERT= -e PHAB_USER= -e PHID=PHID-HMBT-k7l4onfckrehjsilmp2i \
      -e URI=https://git.kolab.org/diffusion/R/roundcubemail -e RO_URI=https://git.kolab.org/diffusion/R/roundcubemail \
      -e VCS=git -e TEST_BUILD=1 -e TEST_FUNCTIONAL=1 -e TEST_INTEGRATION=1 -e TEST_PERFORMANCE=1 -e TEST_UNIT=1 \
      -e TEST_OBS=0 --entrypoint="/bin/bash" kolab/ci-maipo -s

Then, run /entrypoint.sh -- it will drop you back in to an interactive shell.

But... if the direct substitution in bootstrap.php doesn't work, I'm out of ideas.

https://cgit.kolab.org/stick/commit/?id=3af8927709861f674fc1395a5cc500d1916a0263

has the sed command commented?
That would still default to firefox?

In T533#6865, @pokorra wrote:

But... if the direct substitution in bootstrap.php doesn't work, I'm out of ideas.

https://cgit.kolab.org/stick/commit/?id=3af8927709861f674fc1395a5cc500d1916a0263

has the sed command commented?
That would still default to firefox?

It does, I opted to not attempt to workaround the way it is supposed to work after the typo fix went in making ROUNDCUBE_TEST_BROWSER become ROUNDCUBE_TESTS_BROWSER.

vanmeeuwen closed this task as Resolved.Jul 2 2015, 4:16 PM

This ticket is now actually irrelevant.