Blog/ How to Install Red Test

In previous article, we explained why integration tests will greatly benefit your Drupal automated testing efforts and also announced that we are making Red Test, an integration testing framework for Drupal, open-source. In this article, you'll learn how to install Red Test to get started with your integration tests for Drupal. Here are the steps:

1) Go to your Drupal root and clone the github repository.

git clone

2) This will create a folder named "tests" in your Drupal root. Change directory into that folder.

cd tests

3) Install the required software libraries using composer.

php composer.phar install

This command will install RedTest library along with PHPUnit, ParaTest and others.

4) Remove .git folder so that the cloned repo can be committed to your main Drupal application repo.

rm -rf .git

5) The "tests" git repo you cloned already has pre-defined tests that you can run. To run them, change into Drupal root folder and execute the ParaTest command. Make sure to change the --processes argument to 1.5 times the number of processor cores that you system has. The tests will most likely fail since they are for Drupal's standard installation profile and that's fine. You are just one step away from creating your own first test!

cd ..
tests/bin/paratest --phpunit=tests/bin/phpunit --processes=4 --no-test-tokens --log-junit="tests/output.xml" --configuration=tests/phpunit.xml


By Andrew (not verified) Wednesday, May 11, 2016 - 19:20 Permalink


I try to reproduce provided steps and install red test for my Drupal site. Actually, I found next problems with it.
First, you remove paratest dependency from your composer.json here: So, I just can't run paratest (step 5) by default. Ok, I try to restore dependency and update composer, but get the problem with PHP version. I use 5.3.10 but paratest require 5.4+.

My next step is founding paratest version supports PHP 5.3.x (it was 0.12.3). So, I re-update this and now step 5 is work. But, I can't see anything like output.xml in "tests" directory. No file, no output. Paratest just exit silently.

Please reproduce steps you provided for my case and reply, what's wrong?

Ready to get started?REQUEST A QUOTE