PHPackages                             xendk/proctor - 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. xendk/proctor

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

xendk/proctor
=============

Drupal site testing helper.

1.0.1(11y ago)237GPL-2.0+PHPPHP &gt;=5.4.0

Since Apr 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/xendk/proctor)[ Packagist](https://packagist.org/packages/xendk/proctor)[ RSS](/packages/xendk-proctor/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (4)Used By (0)

Proctor
=======

[](#proctor)

[![Circle CI](https://camo.githubusercontent.com/b1cb0017d3dec791f97ef77cdd0e6f1bf7d18d21061e87e6dcd9485e4b82b684/68747470733a2f2f636972636c6563692e636f6d2f67682f78656e646b2f70726f63746f722e7376673f7374796c653d737667)](https://circleci.com/gh/xendk/proctor)[![Travis CI](https://camo.githubusercontent.com/1650126378e324d755570d72e2a9a203013a92d28bea6b36fcac001570faf15f/68747470733a2f2f7472617669732d63692e6f72672f78656e646b2f70726f63746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/xendk/proctor)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0bdb31b622f733a6cdc9e2d4c52fbcb2f2546dff0aecce0d6486d10177416ae4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78656e646b2f70726f63746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xendk/proctor/?branch=master)

Helps with testing of Drupal sites.

Testing of Drupal sites using Behat, Selenium, Codeception or other "browser based" methods, involves a lot of setting up and configuration, both locally and on CI servers. Proctor tries to automate as much as possible.

Walk-through
------------

[](#walk-through)

Install Proctor and its dependencies in a `tests` folder in the Drupal root:

composer require xendk/proctor:~0.1

The reason for using a composer file inside the test folder is that it keeps the tests tools outside of Drupals dependencies. Drupal 8 beta 10 and CodeCeption 2.\* depends on incompatible versions of phpunit, and future clashes is non unthinkable as Drupal includes more libraries.

Commit the `tests/composer.json` and `tests/composer.lock` files.

Run:

```
./tests/vendor/bin/proctor config:init

```

To initialize a `~/.proctor.yml` configuration file. Edit the file and supply mysql credentials for your local environment. This allows Proctor to create test sites.

Run:

```
./tests/vendor/bin/proctor setup:drupal @alias

```

Where `@alias` is a Drush alias to sync database and files from. This can be the production site, a staging site or a site used exclusively as source for tests.

Run:

```
./tests/vendor/bin/proctor build test.mysite.dev

```

This will create a new `test.mysite.dev` site in `sites/`, add it to `sites/sites.php`, sync the database and files and clear the cache on the site. You now have a fresh test site. Re-running the command will overwrite the site with a fresh copy.

Now you're ready to add tests. You can place Behat tests in `tests/behat/`, Codeception tests in `tests/codecept`, and Proctor will run the appropriate tool (further testing frameworks might be forthcoming).

Run:

```
./tests/vendor/bin/proctor use test.mysite.dev

```

This will fix up Behat/Codeception YAML config files to point at the hostname being tested. To mark an URL for fixing, append `# proctor:host` to the end of the line.

Run:

```
./tests/vendor/bin/proctor prepare

```

To start Selenium Server. You can either configure the path to the Selenium Server JAR file in `~/.proctor.yml`, or add the --fetch switch to download it.

Run:

```
./tests/vendor/bin/proctor run

```

To run all tests locally.

CircleCI
--------

[](#circleci)

Proctor knows about Circle CI, so to run tests there, you need a circle.yml that looks something like this:

```
machine:
  environment:
    # Add composer global bin dir to path, needed to find drush.
    PATH: $HOME/.composer/vendor/bin:$PATH
  php:
    # Currently Proctor needs to have the PHP version specified in here.
    version: 5.4.21

dependencies:
  override:
    # Install Proctor and dependencies.
    - composer install --no-interaction:
      pwd: tests
    # Install Drush
    - composer --prefer-source --no-interaction global require drush/drush:6.2.0
    # This will make sending mail from PHP not fail.
    - echo "sendmail_path = /bin/true" > ~/.phpenv/versions/$(phpenv global)/etc/conf.d/sendmail.ini
  cache_directories:
    - "~/.composer"
    # Cache the Selenium Server JAR file here.
    - "~/aux"
  post:
    # Prepare Apache virtual host.
    - ./tests/vendor/bin/proctor setup:circle
    # Start Selenium Server in the background.
    - ./tests/vendor/bin/proctor prepare --fetch --selenium-dir ~/aux:
        background: true
    # Temporary hack. This ensures that the Drush command that Proctor uses
    # for syncing doesn't get the message from SSH about a new host. It
    # messes things up.
    - ssh drush-user@hostname echo "test"
    # Build site.
    - ./tests/vendor/bin/proctor build default
    # And fix Behat/Codeception files to point at it.
    - ./tests/vendor/bin/proctor use localhost:8080

test:
  override:
    # Run the tests.
    - ./tests/vendor/bin/proctor run
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~15 days

Total

2

Last Release

4088d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/229422?v=4)[Thomas Fini Hansen](/maintainers/Xendk)[@xendk](https://github.com/xendk)

---

Top Contributors

[![xendk](https://avatars.githubusercontent.com/u/229422?v=4)](https://github.com/xendk "xendk (76 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xendk-proctor/health.svg)

```
[![Health](https://phpackages.com/badges/xendk-proctor/health.svg)](https://phpackages.com/packages/xendk-proctor)
```

###  Alternatives

[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)

PHPackages © 2026

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