I installed drush via composer, initially drush 8 was installed.

I then try to run tests via drush test-run command,unfortunately I get the following output indicating the command is not found.

(16:38 vagrant@devbox .composer) > drush test-run help The drush command 'test-run help' could not be found. Run drush cache-clear drush to clear the [error]

Installing version 7 via composer gives same output. Clearing the drush cache did not help, am I missing something?

3 Answers 3


The test-run command was removed from Drush; the recommendation now is to simply run the scripts/run-tests.sh script in Drupal folder directly.

See: Running tests through command-line.


The exact command to run the test from drupal root is :

php scripts/run-test.sh module_name

Where module name may be Profile for example or your custom module name. Similarly you can run particular test case from a particular module as well.


Looks like you are in the composer directory. You need to be in the Drupal root of your site to run most commands.

Also you'll need the testing module enabled. Is it Simpletest?

  • Yes it is simpletest and will be shown as Testing in drupal UI. Commented Jul 24, 2017 at 5:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.