PHPackages                             droptica/codeception-drupal-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. droptica/codeception-drupal-bootstrap

ActiveLibrary[Testing &amp; Quality](/categories/testing)

droptica/codeception-drupal-bootstrap
=====================================

A module for Codeception that exposes the Drupal API to test suites.

1.0.0(10y ago)52.0k3[1 PRs](https://github.com/droptica/codeception-drupal-bootstrap/pulls)MITPHP

Since Mar 13Pushed 4y ago16 watchersCompare

[ Source](https://github.com/droptica/codeception-drupal-bootstrap)[ Packagist](https://packagist.org/packages/droptica/codeception-drupal-bootstrap)[ RSS](/packages/droptica-codeception-drupal-bootstrap/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Codeception Drupal Module
=========================

[](#codeception-drupal-module)

BranchBuild StatusCoverageMaster[![Build Status](https://camo.githubusercontent.com/85be57c08772e710584000fc716e191126ed0274dbb6812c419fb9c58bbcd18b/68747470733a2f2f7472617669732d63692e6f72672f436861706162752f636f646563657074696f6e2d6d6f64756c652d64727570616c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Chapabu/codeception-module-drupal)[![Coverage](https://camo.githubusercontent.com/ce401ff2a015feb65f0a26eae289ad06829c5e3bd7c880284e39d46cd428904d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f436861706162752f636f646563657074696f6e2d6d6f64756c652d64727570616c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/Chapabu/codeception-module-drupal?branch=master)Develop[![Build Status](https://camo.githubusercontent.com/15e8c9d3efcee83e9ea0c3e279e2d5c3e61c50f962003d0e65057a191ba1b719/68747470733a2f2f7472617669732d63692e6f72672f436861706162752f636f646563657074696f6e2d6d6f64756c652d64727570616c2e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/Chapabu/codeception-module-drupal)[![Coverage](https://camo.githubusercontent.com/b9c36a0474fea18339a272bbc7fc9412a68b74effa503cdc65f2039803dddc73/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f436861706162752f636f646563657074696f6e2d6d6f64756c652d64727570616c2f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/r/Chapabu/codeception-module-drupal?branch=develop)This module aims to allow tests to use the Drupal API during testing. This allows for better functional testing of your Drupal sites.

It also makes test driven development with Drupal significantly easier, as you can make assertions on items that you create through the UI.

Installation
------------

[](#installation)

```
$ composer require chapabu/codeception-module-drupal --dev
```

Usage
-----

[](#usage)

In your `*.suite.yml` file, add `Drupal` to your enabled modules list.

### Example configuration

[](#example-configuration)

This will run tests under the assumption that your Drupal installation is in a `drupal` sub-directory.

```
class_name: AcceptanceTester modules:
    enabled:
        \Codeception\Module\Drupal7\Drupal7:
            root: 'drupal'
            relative: yes
```

### Options

[](#options)

#### root

[](#root)

Accepts: `string` Default: `current working directory`

This defines the Drupal root in relation to the `codecept.yml` file. If this isn't passed in it defaults to the current working directory.

#### relative

[](#relative)

Accepts: `yes` or `no` Default: `no`

This allows you to specify if the path to the drupal root is relative from the `codeception.yml` file. Accepts `yes` or `no`.

Contributing
------------

[](#contributing)

### Coding standards

[](#coding-standards)

Please ensure all code follows [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)standards where possible (with the exception of and Codeception methods that don't follow this already, such as `_initialize`)

Tests do not need to follow PSR-2 exactly, but should follow the standards laid out by the current tests (i.e. test method naming doesn't conform to PSR-2, but is more useful in this context).

### Tests

[](#tests)

All contributions should come with relevant unit tests as per the rest of the suite. For examples, look under the `tests` directory

#### Running tests - Linux/OSX

[](#running-tests---linuxosx)

To setup for testing, run `$ composer testinit` followed by `$ vendor/bin/codecept run` or simply `$ codecept run` if you have Codeception installed system wide.

The `testinit.sh` script assumes you have Drush installed system-wide. This will install Drupal using the username of root and a blank password to a MySQL database. Feel free to edit this file should you need to, but please ensure it is not committed back.

#### Running tests - Windows

[](#running-tests---windows)

If you want to contribute and are running Windows, you should just run the command contained in the `testinit.sh` script using the command line.

License
-------

[](#license)

The project is licensed under The MIT License (MIT).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 75.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~134 days

Total

2

Last Release

3941d ago

Major Versions

0.1.0 → 1.0.02015-07-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/675aee3c25d9199cdbff3dd4624b2696ddbef744f668923927caf647bbee55ac?d=identicon)[droptica](/maintainers/droptica)

---

Top Contributors

[![Chapabu](https://avatars.githubusercontent.com/u/1395471?v=4)](https://github.com/Chapabu "Chapabu (106 commits)")[![mattc-cogapp](https://avatars.githubusercontent.com/u/62068288?v=4)](https://github.com/mattc-cogapp "mattc-cogapp (33 commits)")[![kostajh](https://avatars.githubusercontent.com/u/208893?v=4)](https://github.com/kostajh "kostajh (1 commits)")

---

Tags

testingtestcodeceptiondrupal

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/droptica-codeception-drupal-bootstrap/health.svg)

```
[![Health](https://phpackages.com/badges/droptica-codeception-drupal-bootstrap/health.svg)](https://phpackages.com/packages/droptica-codeception-drupal-bootstrap)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.5k](/packages/mockery-mockery)[allure-framework/allure-codeception

Allure Codeception integration

5212.1M7](/packages/allure-framework-allure-codeception)[contributte/codeception

Integration of Nette framework to Codeception.

27886.9k1](/packages/contributte-codeception)[jayhealey/webception

Web Interface for running Codeception tests.

19110.7k](/packages/jayhealey-webception)[drupal/tqextension

Behat extension for testing Drupal sites

1134.4k](/packages/drupal-tqextension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
