Automated testing in DrupalCI

Last updated on
24 February 2025

DrupalCI is retired. Go to GitLab CI.

If your project (module, theme, distribution) contains automated test code, you can set up the automated tests to run daily or weekly, and/or to run when new patches are submitted.

Enabling automated testing

  1. Make sure the project has a development release.
  2. From the project page, click "Automated testing".
  3. Click Add test / retest.
  4. Make sure "new test" is selected. Select the Environment, Core version, and Schedule for testing, and save.
  5. Repeat these steps to set up additional schedules.

Set up automated testing for:

  • The maintained branches of your project, usually weekly, against the latest compatible Core version. Sometimes things change in Drupal core that affect contributed projects, so this will test that your project continues to work with the latest version of Drupal core.
  • Patch testing ("Run on commit and for issues"), for each maintained branch. This will make it so when people upload patches or submit merge requests for your project, they will automatically trigger a run of the automated tests.

For more details, see Drupal.org Testing Policy.

Add a composer.json file

If your project has dependencies on other modules or themes, you must add a composer.json file to your project, to list the dependencies for automated testing, because the automated test framework uses the composer.json file to import the dependencies. Your module will fail to enable in the test framework without a composer.json file due to missing module dependencies, because the dependencies in the MODULE.info.yml are not installed by the test framework.

Help improve this page

Page status: No known problems

You can: