Setup Behat UI ~4 with Drupal ~9 project

Install the Behat UI module on Drupal 9 manually

To add Behat UI module to your Drupal 9 site, you can use Composer to install it and then enable and configure it in your terminal. Alternatively, you can follow the interactive web-based Bash command provided below.

1. From the terminal run the interactive command:

Factory Lollipop

Factory Lollipop is a comprehensive solution for using the factory pattern to generate short-lived test data-structure.

The goal of Factory Lollipop is to enable the rapid creation of objects (vocabularies, terms, content types, nodes) for the purpose of testing. The primary aim of Factory Lollipop is to a fill a void in the world of Drupal Unit testing.
This module allows you to create templates/blueprints for valid and re-usable Drupal objects.

We created this project in response to fixtures which where fixed global records that had to be loaded into the database.

Testing techniques

Tools used for testing

We are using the following tools for the test techniques:

JavaScript testing using Nightwatch

Setup

How to set up Nightwatch is explained in the core README file for tests, core/tests/README.md.

Alternatively, if you use DDEV, you can use DDEV Selenium Standalone Chrome.

Testing module overview

The Testing module provides a framework for running automated unit and functional tests in Drupal. It can be used to verify a working state of Drupal before and after any code changes, or as a means for developers to write and execute tests for their modules. The original module was based on the SimpleTest PHP library.

Selenium testing

Selenium is a tool which automates browser testing, and so can be used to test your Drupal website.

Selenium has two very different ways of creating and running tests:

Subscribe with RSS Subscribe to RSS - Testing