Submit a patch for testing against drupal core test suite
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
testbot.drush.inc
testbot.example

README.md

testbot

Submit a patch for testing against Drupal core test suite.

Advantages

While iterating on a code change, make a command line request to run Drupal core tests with your local changes. This avoids you dealing with:

  • insufficient local machine resources or configuration to run tests efficiently
  • inconsistent results compared to qa.d.o
  • disruption of your 'creative coding moments’ due to the patch submission workflow
  • long test runtime on qa.d.o

Tests will be run on the ReviewDriven.com platform.

Installation

Place the command file anywhere that drush allows. Copy the .testbot file to the repository root directory (i.e. the same directory that contains the .git directory).

Execution

Open a command shell (Linux and Mac at least) and type 'drush testbot'.

Command Syntax

The command accepts six optional parameters. In Drush fashion, each is specified as '--name=value' on the command line. The parameter names are:

  • branch
  • issue
  • php-version
  • database
  • patch
  • properties

Individual parameters (among the first five above) have precedence over corresponding values in the properties parameter.

The 'properties' parameter is a JSON string consisting of 'name:value' pairs. It may include any of the above parameters as well as a 'classes' parameter. In lieu of setting properties on the command line, add them to a '.testbot' file in the repository root directory (i.e. the same directory that contains the .git directory).

The recognized property names and their default values are:

Name Default
branch 8.0.x
issue Extracted from git branch name like [issue-number]-issue-description. If the branch name does not follow this convention, then add this property to the command.
patch Generated by running 'git diff' in the current directory. Patch is uploaded to 'https://paste.kde.org' and the URL returned in the command output.
php-version 5.3 with Drupal 7, 5.4 with Drupal 8
Allowed values are:
  • 5.3 (Drupal 7 only)
  • 5.4, 5.5, 5.6
database mysql-5.5
A database-version string with allowed values of:
  • mariadb-5.5 or 10.0
  • mongodb-2.6 (only with Drupal 8)
  • mysql-5.5
  • pgsql-8.3, 9.1, or 9.3
  • sqlite-x.y
classes none (implies run all tests)
If present, an array of test classes like:
  • NumberFieldTestCase (Drupal 7)
  • Drupal\comment\Tests\Views\CommentFieldFilterTest (Drupal 8)