FAQs¶
If you are new to the project or Behat, we recommend that you first read through our documentation. For any questions, feedback, or to contribute, you can get in contact with us via Github or our Slack.
Browsers¶
- If you are using Selenium to run Javascript tests, and you access your WordPress site over HTTPS, and your site is using a self-signed HTTPS certificate, you will need to manually configure the web browser to accept that certificate.
Drivers¶
- If you are using the WP-CLI driver to connect to a remote WordPress site over SSH, WordHat assumes the remote server is Linux-like, with a shell that provides GNU Coreutils.
- To configure WordHat to use a specific driver, set
default_driver
in yourbehat.yml
. - As of v1.1.0, it is possible to use multiple drivers at the same time. This should be considered an experimental feature for advanced users only. To enable it, tag a scenario with the name of the driver to use (e.g.
@wpcli
or@wpphp
).
Selenium¶
- On a Mac, Selenium is incompatible with the default Apple Java; error messages look like “Unsupported major.minor version 52.0”. To fix, install Oracle Java Platform JDK.
- Selenium is fiddly to set up, so we recommend using vvo/selenium-standalone to install and run it.
Supported platforms¶
- WordHat supports MacOS, most flavours of Linux, and Windows. We use Travis-CI to test on Ubuntu, and require modern versions of PHP.
Virtual machines (Vagrant)¶
- If you are using a Vagrant-powered virtual machine to run Behat via the WP-CLI driver, you will need to
vagrant ssh
into the box once. This will set up password-less authentication; otherwise, WordHat will prompt you for the SSH password frequently. - If you are using the WP-CLI driver to connect to a Vagrant-powered WordPress site over SSH, you will probably have better performance by switching to use the WP-PHP driver. This is because WP-CLI is slow at opening SSH connections to Vagrant boxes.
WordPress¶
- If your WordPress is installed in a subdirectory, you need to set the
site_url
option to the value of the “WordPress address (URL)” option (found in WordPress > Settings > General). For more information, consult the WordHat documentation.