A tool for specifying Drupal architecture details and generating automated tests for them

Installs: 840 925

Dependents: 3

Suggesters: 0

Security: 0

Stars: 98

Watchers: 16

Forks: 20

Open Issues: 10



4.0.2 2020-12-15 15:36 UTC

This package is auto-updated.

Last update: 2021-02-22 14:47:16 UTC


Packagist Build Status

This project provides a tool for specifying Drupal architecture details and generating automated tests for them. It consists of 1) a Google Sheet for capturing specification and generating tests from it and 2) the Behat contexts that automate the generated tests (examples).

Getting started

Google sheet

Copy the appropriate version of the Google sheet to your Google Drive:

Google Sheet Screenshot

Behat tests

Assuming you already have Behat installed via Composer...

  1. Install the Behat contexts:

    composer require --dev acquia/drupal-spec-tool
  2. Add the new contexts to your Behat configuration, e.g.:

    # behat.yml
            - Acquia\DrupalSpecTool\Context\AccessControlContext
            - Acquia\DrupalSpecTool\Context\ContentModelContext
            - Acquia\DrupalSpecTool\Context\MediaContext
            - Acquia\DrupalSpecTool\Context\MenuContext
            - Acquia\DrupalSpecTool\Context\ViewsContext
            - Acquia\DrupalSpecTool\Context\WorkflowContext
  3. Copy the default feature files (representing the out-of-the-box configuration of Lightning) to your features directory. For example, given a BLT-based project:

    mkdir tests/behat/features/drupal-spec-tool
    cp vendor/acquia/drupal-spec-tool/features/*.feature tests/behat/features/drupal-spec-tool/
  4. As you change the specification, update the features to match using the generated Gherkin on the "Behat" tab of the Google sheet. (See Advanced below to automate this process.)

  5. Run Behat! If the tests pass, your application matches the specification. If not, change one or the other according to your needs.


Learn more about the features of the tool and best practices for using it in the announcement blog post on the Acquia Developer Center.


Automate test updates with nickwilde1990/drupal-spec-tool-commands.

Known issues

See open bug reports in the issue queue.


Contributions are welcome! See


Copyright (C) 2018 Acquia, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.