Skip to main content

Running Drupal's PHP Unit tests with Headless Chrome Image and ddev

Submitted by daniel on

In a previous article I have looked at running Drupal's Nightwatch and PHPUnit Tests using Drupal's Quickstart development environment. Today, I will look at how to run all the the PHP Unit Tests using a headless version of chrome.

Setting up Headless Chrome Image

Within your project root within the .ddev folder create a new YAML file and call it docker-compose.chromedriver.yaml

Getting started with both Functional Javascript and Nightwatch Testing in Drupal 8.6 or later

Submitted by daniel on

In a previous article, I looked into how to get started with Running Tests using Drupal Contributions on top of a local Lando container. I looked a little at the history of Drupal testing and in particular how to get started running PHP Unit tests. 

Types of Drupal Tests

If we look at core Drupal Views module under tests/src we can see the following in the core/tests folder 

Using Composer to manage your JS Dependencies

Submitted by daniel on
For a while now PHP Developers have used Composer, a PHP Dependency Manager, to manage their app dependencies. Certainly in the Drupal community, Developers have been using composer since Drupal 8 was released back in June 2013.

Lloyds Banking Group

Submitted by daniel on

Worked across various initiatives mainly to do with Authorised user journeys. This including working as part of a newly formed initiative to improve the user login journey and also working to develop a new React based component library.

Date Created

Immediate Media

Submitted by daniel on

Part of newly formed  Agile team to work on migrating exiting websites to their new subscription based website platform.

Date Created

Rebif

Submitted by daniel on

Updates to Adobe Air Application and creation of html slide presentation.

Date Created

Pfizer

Submitted by daniel on

Information site for Haemophilia

Drupal 7 site build and theming, with the use of sag graphics to create a circular transition and fade.

Date Created

Specsavers

Submitted by daniel on

Worked on a headless Symfony build with a Drupal backend rollout for a component based new front page.

Helped to create new digital design standards and develop a component library to be gradually rolled out worldwide.

Date Created

Shelter

Submitted by daniel on

Quickly learnt and took on new responsibilities, providing cover for existing team why they were trained on the new system

 

Date Created