Skip to content
Commit d70b6bc9 authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez
Browse files

Set "wd_host" directly in "behat.yml" instead of through "BEHAT_PARAMS"



The "wd_host" parameter of Selenium2 sessions specify the URL used by
the Selenium driver to connect with the Selenium server. Thus, when the
Selenium server is at a different host or port than the default one (for
example, when run on Drone) the "wd_host" parameter must be set for each
of the Selenium2 sessions defined in "behat.yml".

The "BEHAT_PARAMS" environment variable, which extends the "behat.yml"
configuration file, was used for that. However, this required adding to
the "BEHAT_PARAMS" in "run-local.sh" each new session added to
"behat.yml", including those added in the acceptance tests of apps.

To address that limitation, this commit introduces a simulated variable,
"selenium.server"; just before the acceptance tests are run the
"selenium.server" variable in the "wd_host" parameter is replaced in the
"behat.yml" file used by the acceptance tests. Note that the file that
is modified is the one inside the Docker container used to run the
acceptance tests, so the original file is not touched.

Note that a simulated variable is needed because Behat does not support
overridding nor setting configuration parameters with environment
variables.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent 082646f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment