Skip to content

Instantly share code, notes, and snippets.

@tylers-username
Last active December 3, 2018 16:52
Show Gist options
  • Save tylers-username/614cc2da92ffef717739b7e598bd2a25 to your computer and use it in GitHub Desktop.
Save tylers-username/614cc2da92ffef717739b7e598bd2a25 to your computer and use it in GitHub Desktop.
Enable functional testing features for Magento 2 Lando Setup
# Append the following to your "services" config
services:
chrome-selenium:
type: compose
services:
image: selenium/standalone-chrome:2.53.1
user: root
expose:
- "4444"
volumes:
- /dev/shm:/dev/shm
command: /opt/bin/entry_point.sh
# Append the following to your "tooling" config
tooling:
test:functional:generate:
description: Generator generates fixtures, repositories, and page objects. Once the FTF is initialized, all classes must be pre-generated to facilitate creating and running the tests. Modules in the FTF are processed by generator in the same order that they are processed during Magento loading.
cmd: cd $LANDO_MOUNT/dev/tests/functional/utils && composer install -d .. && php generate.php
service: appserver
test:functional:
cmd: cd dev/tests/functional && vendor/bin/phpunit
service: appserver
needs:
- database
<!-- File: dev/tests/functional/etc/config.xml -->
<!-- Append this to the <config> section -->
<server>
<item name="selenium"
type="default"
browser="Google Chrome"
browserName="chrome"
host="chrome-selenium" <!-- Name of the service within .lando.yml -->
port="4444" <!-- Port exposed with .lando.yml -->
seleniumServerRequestsTimeout="90"
sessionStrategy="shared">
<desiredCapabilities>
<platform>ANY</platform>
</desiredCapabilities>
</item>
</server>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment