Skip to main content
nik's personal space

Main navigation

  • About
  • Profile
  • Blogs
  • Achievements
  • Reach nik
User account menu
  • Log in

Breadcrumb

  1. Home

Behat tests with Lando and Apple M1

Purpose of this document is to help setup and execute Behat tests using Acquia BLT in local using Lando and also use the same on Github Actions.

Fully working example you can check this repo and working Github Actions tests here.

Recently I faced challenges with the setup since I started using the new Apple M1 laptop and most of the docker images don't work as explained in this Stack Overflow discussion as Google Chrome is not available in arm yet for Linux.

I checked and found out that seleniumhq-community has come up with a solution for this, a new set of Docker images which can be used to run tests in Chromium browser. These images work on Intel chip machines as well, so we can use the same for everyone.

Example repository covers

  • Setting up and running Behat Tests in local (including JavaScript tests).
  • Setting up and running Behat tests via cron job using Github Actions for scheduled testing.

Summary of required changes:

For local:

  • Composer package acquia/blt-behat
  • Chromedriver in .lando.yml
  • Browser configurations detailed out in example.local.yml

For Github Actions:

  • Composer package alexku/blt-github-actions
  • Chromedriver using Github Actions nanasess/setup-chromedriver, usage of the same can be seen here
  • All the scripts to setup and test available here
Knowledge required as PHP developer
Drupal - Tips to keep browser CPU usage in check
Thinking about customer success as a developer
Developing or testing Apple Pay
Being pro-active as developer
Effective communication, how I do it
Migrating multi-value non-associative data
Drupal 8: Reverting features in update hooks
Drupal 8: Updating field configuration in update hooks
Life saver - live dev on Magento Cloud
Certified SAFe® 6 Agilist Badge
BMI IQ - 135
Acquia Certified Cloud Pro 2020
Acquia Certified Front End Specialist - Drupal 9
Triple Certified Drupal Expert - Drupal 9
Acquia Certified Developer - Drupal 9
Acquia Certified Site Studio 6 Site Builder
Acquia Certified Back End Specialist - Drupal 9
Acquia Certified Site Factory Pro
Acquia Certified Developer - Drupal 8
Acquia Certified Developer - Drupal 7
Certified ScrumMaster®
Powered by Drupal