drush test-runfor drush 6x


Run tests. Note that you must use the --uri option.

drush test-run

  • Arguments


    test-run accepts 1 argument/s:


    targets : A test class, a test group. If omitted, a list of test classes and test groups is presented. Delimit multiple targets using commas.

  • Options


    test-run accepts 20 option/s:


    --all : Run all available tests

    --methods : A comma delimited list of methods that should be run within the test class. Defaults to all methods.

    --dirty : Skip cleanup of temporary tables and files. Helpful for reading debug() messages and other post-mortem forensics.

    --xml : Output verbose test results to a specified directory using the JUnit test reporting format. Useful for integrating with Jenkins.

    --format

    --format : format

    --fields

    --fields : fields

    --list-separator

    --list-separator : list-separator

    --line-separator

    --line-separator : line-separator

    --field-labels

    --field-labels : field-labels

    --format=table

    --format=table : format=table

    --format=config

    --format=config : format=config

    --format=csv

    --format=csv : format=csv

    --format=json

    --format=json : format=json

    --format=labeled-export

    --format=labeled-export : format=labeled-export

    --format=list

    --format=list : format=list

    --format=php

    --format=php : format=php

    --format=print-r

    --format=print-r : format=print-r

    --format=var_export

    --format=var_export : format=var_export

    --format=variables

    --format=variables : format=variables

    --format=yaml

    --format=yaml : format=yaml

  • Examples


    List all available classes and groups.

    test-run

    Run all available tests. Avoid permission related failures by running as web server user.

    sudo -u apache test-run --all

    Run one test class.

    test-run XMLRPCBasicTestCase

    Run all classes in a XML-RPC group.

    test-run XML-RPC

    Run all tests from multiple groups/classes.

    test-run XML-RPC,Filter

    Run particular methods in the specified class or group.

    test-run XMLRPCBasicTestCase --methods="testListMethods, testInvalidMessageParsing"

  • Comments


    comments powered by Disqus