Download the PHP package xendk/proctor without Composer
On this page you can find all versions of the php package xendk/proctor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xendk/proctor
More information about xendk/proctor
Files in xendk/proctor
Informations about the package proctor
Proctor
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
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
Proctor knows about Circle CI, so to run tests there, you need a circle.yml that looks something like this:
All versions of proctor with dependencies
symfony/console Version ~2.4
symfony/process Version ~2.0
symfony/yaml Version ~2.4
symfony/finder Version ~2.6