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] (see issue). 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:
|
database | mysql-5.5 A database-version string with allowed values of:
|
classes | none (implies run all tests) If present, an array of test classes like:
|