Skip to content

Instantly share code, notes, and snippets.

@quicksketch
Created April 23, 2026 23:30
Show Gist options
  • Select an option

  • Save quicksketch/0366dd626f9086093ac5b42149d6172e to your computer and use it in GitHub Desktop.

Select an option

Save quicksketch/0366dd626f9086093ac5b42149d6172e to your computer and use it in GitHub Desktop.
Backdrop CMS with DDEV AGENTS.md for Running Tests

Backdrop CMS Core Development Project

This is a PHP project, managed by git with remote connections to the canonical Backdrop CMS GitHub repository.

This project uses DDEV, a docker-based local development tool, to run a local environment.

Initializing the Environment

This web environment can be started using:

ddev start

If unsure if the environment is started, the status can be checked with:

ddev status -j | jq .raw.services.web.status

Test Coverage

New code should be validated by test coverage using the built-in testing tool "SimpleTest". SimpleTest in Backdrop CMS is similar to Drupal's built-in testing framework.

Test can be run using:

ddev exec ./core/scripts/run-tests.sh --force --cache --verbose

To save execution time when running tests, individual test classes should always be specified, separated by spaces:

ddev exec ./core/scripts/run-tests.sh --force --cache --verbose --concurrency 8 Example1TestCase Example2TestCase Example3TestCase

A list of all existing tests can be retrieved with:

ddev exec ./core/scripts/run-tests.sh --list

Many existing test classes exist within the code base to serve as examples of how to write test coverage for Backdrop CMS. When adding new tests, add the test information to a my_module.tests.info file such as the following:

[Example1TestCase]
name = Example Test Case
description = Provides an example test within the "my_module" module.
group = Module
file = my_module.test

If tests fail to start entirely, clearing the test cache may help:

ddev exec ./core/scripts/run-tests.sh --clean

CLI Tools

This project uses the Backdrop CMS bee project to access Backdrop commands via the command line.

Use ddev bee help to get a list of commands.

Use ddev bee cc all to clear the Backdrop CMS caches.

Use ddev bee uli to get a login link that can be accessed via a web browser.

Git Configuration

This project is connected to Git version control. There are many remote servers set up.

backdrop is the canonical code repository. Pull the latest code from this remote. quicksketch is my personal fork of the canonical repository. Push to this remote when making pull requests.

There are many other remotes that access forks of the project from other Backdrop CMS community members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment