PHPackages                             aklump/drupal-test - 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. aklump/drupal-test

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

aklump/drupal-test
==================

A solution for testing Drupal 7 using PhpUnit.

0.8.3(6y ago)141BSD-3-ClausePHPPHP &gt;=7.0

Since Jan 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aklump/drupal-test)[ Packagist](https://packagist.org/packages/aklump/drupal-test)[ Docs](https://github.com/aklump/drupal-test)[ RSS](/packages/aklump-drupal-test/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (16)Versions (40)Used By (0)

Drupal Test
===========

[](#drupal-test)

[![drupal-test](docs/images/screenshot.jpg)](docs/images/screenshot.jpg)

Summary
-------

[](#summary)

This is a complete testing solution for using PhpUnit with Drupal websites. It provides Unit, Kernel, Client and End to End abstract test classes to use in writing your tests, a single test runner, testing for modules and themes, support for JsonSchema validation, as well as a set of guidelines and processes for better testing of Drupal modules and websites. All of this using a single test runner that can be divided by test suite or filtered by test class using normal PhpUnit options.

Finally, [manual functional tests](https://github.com/aklump/manual-test) are supported as well.

**Visit  for full documentation.**

Quick Start
-----------

[](#quick-start)

After installation (see below), follow instructions in the documentation (*docs/index.html*) to write and run tests.

### Run All Tests

[](#run-all-tests)

```
$ cd tests
$ export SIMPLETEST_BASE_URL=http://mysite.com; phpunit -c phpunit.xml

```

### Run All Unit Tests

[](#run-all-unit-tests)

```
$ cd tests
$ phpunit -c phpunit.xml --testsuite Unit

```

### Run All Kernel Tests

[](#run-all-kernel-tests)

```
$ cd tests
$ phpunit -c phpunit.xml --testsuite Kernel

```

### Run All Client Tests

[](#run-all-client-tests)

```
$ cd tests
$ export SIMPLETEST_BASE_URL=http://mysite.com; phpunit -c phpunit.xml --testsuite Client

```

### Run All End To End Tests

[](#run-all-end-to-end-tests)

```
$ cd tests
$ export SIMPLETEST_BASE_URL=http://mysite.com; phpunit -c phpunit.xml --testsuite EndToEnd

```

Refer to the documentation for more info.

Configuration
-------------

[](#configuration)

See documentation for more information about configuration.

1. Open *tests/drupal\_test\_config.yml* and setup [autoloading](@autoload).
2. From *tests* run `composer update --lock`.
3. Open *tests/phpunit.xml* and add any JSON schema directories.

Requirements
------------

[](#requirements)

- Composer
- PHPUnit

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

[](#contributing)

If you find this project useful... please consider [making a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4E5KZHDQCEUV8&item_name=Gratitude%20for%20aklump%2Fdrupal-test).

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

[](#installation)

From inside the directory above the web root run this one-liner:

```
[ ! -d tests ] && git clone https://github.com/aklump/drupal-test.git tests && (cd tests && ./bin/install.sh) || echo "Installation error, nothing installed."

```

### About the files in this project

[](#about-the-files-in-this-project)

The following files are considered core and should never be modified.

```
drupal_test.yml
drupal_test_bootstrap.php
composer.json
LICENSE
README.md

```

Additionally, do not add files to the following folders, which are replaced on every update. It is safe to add classes to *src* so long as you avoid *src/DrupalTest*.

```
docs
src/DrupalTest

```

Do not modify any of the files in *bin*, which are provided by this module. You may add your own files to *bin*, if you wish.

Update to the latest version
----------------------------

[](#update-to-the-latest-version)

From inside the *tests* directory, run:

```
./bin/update.sh

```

This will copy over the core files from the latest repository, but leave the non-core files alone, namely *phpunit.xml*, which you most-likely will have modified.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~7 days

Recently: every ~35 days

Total

38

Last Release

2385d ago

PHP version history (2 changes)0.6.1PHP &gt;=5.3.2

0.7.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/79476f3b82f9c766433c7eb401cbcfc636cd5d5ccf2b2e6b50ea81d1de6c2730?d=identicon)[aklump](/maintainers/aklump)

---

Top Contributors

[![aklump](https://avatars.githubusercontent.com/u/425737?v=4)](https://github.com/aklump "aklump (374 commits)")

### Embed Badge

![Health badge](/badges/aklump-drupal-test/health.svg)

```
[![Health](https://phpackages.com/badges/aklump-drupal-test/health.svg)](https://phpackages.com/packages/aklump-drupal-test)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2021.0M277](/packages/drupal-core-dev)[google/cloud-tools

PHP tools for Google Cloud Platform

24902.7k5](/packages/google-cloud-tools)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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