PHPackages                             vincenzodibiaggio/testable-drupal - 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. vincenzodibiaggio/testable-drupal

ActiveLibrary

vincenzodibiaggio/testable-drupal
=================================

A simple set of tools and files to make your Drupal Installation a Testable Drupal Installation Based on Behat, Mink and using Selenium2, Phantomjs and CasperJs, provide a basic structure to integrate with your tests.

4122PHP

Since Jul 31Pushed 12y ago1 watchersCompare

[ Source](https://github.com/vincenzodibiaggio/testable-drupal)[ Packagist](https://packagist.org/packages/vincenzodibiaggio/testable-drupal)[ RSS](/packages/vincenzodibiaggio-testable-drupal/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Testable Drupal
===============

[](#testable-drupal)

A simple set of tools and files to make your Drupal Installation a Testable Drupal Installation. Based on Behat, Mink and using Selenium2, Phantomjs and CasperJs, Testable Drupal provide a basic structure to integrate with your tests.

### What it does

[](#what-it-does)

At this time Testable Drupal has basic tests to

- verify Drupal installation. - using Mink and CasperJs
- to perform a screenshot when required or when a test fail (if you are not using Goutte). - Using Mink
- to perform a 'node create' and 'node update' with interface interaction (waiting for the appearance of the menu, then click... etc). - Using CasperJs

### Integration are welcome :)

[](#integration-are-welcome-)

### Components and requirements

[](#components-and-requirements)

- [Composer](https://getcomposer.org)
- An installation of [Drupal](https://drupal.org/) (your installation). I have worked with Drupal 7.22
- [Drush](http://drush.ws/)
- [drupal-extension](https://github.com/jhedstrom/drupalextension) - provided by composer
- [Behat](http://behat.org/) - provided by composer
- [Mink](http://mink.behat.org/index.html) with extension for Goutte, Mink and Selenium drivers - provided by composer
- [Selenium2](http://docs.seleniumhq.org/)
- [PhantomJs](http://phantomjs.org/)
- [CasperJs](http://casperjs.org/)

### Component installation

[](#component-installation)

1. Install and configure your Drupal installation
2. Download Composer in the root of your project

```
    curl -s https://getcomposer.org/installer | php

```

3. If not present create in the root of your project a file with name composer.json with this content:

```
    {
        "require": {
            "vincenzodibiaggio/testable-drupal": "*"
        },
        "minimum-stability": "dev",
        "config": {
            "bin-dir": "bin/"
        }
    }

```

4. Download dependencies in your project directory

```
    php composer.phar install

```

5. Download [Selenium server](http://docs.seleniumhq.org/download/)
6. Download [PhantomJs](http://phantomjs.org/download.html)
7. Download [CasperJs](http://casperjs.org/) - Pay attention: to use all of feature the minimum version is 1.1-beta1 !
8. Puth both PhantomJs and CasperJs executables in your PATH

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

[](#configuration)

Now Testable Drupal support two test suite

1. 'PHP': Behat/Mink/Selenium/PhantomJs using deep Drupal integration
2. 'JS': PhantomJs/CasperJs to deep interface behavior testing

### Testable Drupal 'PHP'

[](#testable-drupal-php)

#### Configuration

[](#configuration-1)

1. Modify paths and host in `tests/behat_dist.yml` : `wd_host` , `root`, `drupal_root`
2. If you want you can rename `behat_dist.yml` in `behat.yml` but if you launch `behat --init` you overwrite it!

(if you launch a `behat --init` for error you can use the `FeatureContext_dist.php` to replace the new file)

#### Run suite

[](#run-suite)

1. Run Selenium2

```
    java -jar selenium-server-standalone-YOUR_VERSION.jar -role hub

```

2. Run PhantomJs

```
    phantomjs --webdriver=8080 --webdriver-selenium-grid-hub=http://127.0.0.1:4444

```

3. Run tests

```
    cd vendor/vincenzodibiaggio/testable-drupal/tests
    ./../../../../bin/behat --config behat_dist.yml features/test.feature

```

### Testable Drupal 'JS'

[](#testable-drupal-js)

#### Configuration

[](#configuration-2)

1. Modify values in `testable-drupal/jsTests/includes/includeCasper.js` - I'm working in a better integration with Drupal

I recommend to you: put both PhantomJs and CasperJs executables in your PATH. They work fine together without configuration ;)

#### Run suite

[](#run-suite-1)

1. Just run the test: (if you respect the order of filenames you will create nodes and make other test on it... otherwise you will test a failure :D )

```
    cd vendor/vincenzodibiaggio/testable-drupal/jsTests
    casperjs test FILENAME

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f538756abe78cf4bed2cc692ced019ac6b2a9f582c600de2322d741a00c15702?d=identicon)[vincenzodibiaggio](/maintainers/vincenzodibiaggio)

---

Top Contributors

[![vincenzodibiaggio](https://avatars.githubusercontent.com/u/3719429?v=4)](https://github.com/vincenzodibiaggio "vincenzodibiaggio (38 commits)")

### Embed Badge

![Health badge](/badges/vincenzodibiaggio-testable-drupal/health.svg)

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

PHPackages © 2026

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