Most options exist in two forms, a short form of 1 to 6 characters and a longer more explicit form. The two different forms do exactly the same thing and can be used interchangeably.
Some options accept multiple values:
$ ./bin/atoum -f tests/units/MyFirstTest.php tests/units/MySecondTest.phpNote
If you use an option multiple times, only the last one will be used.
# Only test MySecondTest.php
$ ./bin/atoum -f MyFirstTest.php -f MySecondTest.php
# Only test MyThirdTest.php and MyFourthTest.php
$ ./bin/atoum -f MyFirstTest.php MySecondTest.php -f MyThirdTest.php MyFourthTest.phpThis option lets you specify the path to the :ref:`autoloader file<autoloader_file>`.
$ ./bin/atoum -af /path/to/autloader.php
$ ./bin/atoum --autoloader-file /path/to/autoloader.phpThis option lets you specify the path to the :ref:`bootstrap file<bootstrap_file>`.
$ ./bin/atoum -bf /path/to/bootstrap.php
$ ./bin/atoum --bootstrap-file /path/to/bootstrap.phpThis option lets you specify the path to the :ref:`configuration file<fichier-de-configuration>` used for running the tests.
$ ./bin/atoum -c config/atoum.php
$ ./bin/atoum --configuration tests/units/conf/coverage.phpThis option lets you specify the path to the XDEBUG_CONFIG variable. This can also be configured with $runner->setXdebugConfig().
Typically te usage will be
$ ./bin/atoum -xc idekey=PHPSTORMNote
You can ready the Xdebug configuration<https://xdebug.org/docs/remote> on this topic.
This option lets you specify the tests directory(ies) to run. You can also :ref:`configure it<configuration-test>`.
$ ./bin/atoum -d tests/units/db/
$ ./bin/atoum --directories tests/units/db/ tests/units/entities/This option lets you specify the test files to run.
$ ./bin/atoum -f tests/units/db/mysql.php
$ ./bin/atoum --files tests/units/db/mysql.php tests/units/db/pgsql.phpThis option lets you specify the test files to launch based on a pattern.
$ ./bin/atoum -g ???
$ ./bin/atoum --glob ???This option lets you filter the classes and methods to launch.
# launch only the method testMyMethod of the class vendor\\project\\test\\units\\myClass
$ ./bin/atoum -m vendor\\project\\test\\units\\myClass::testMyMethod
$ ./bin/atoum --methods vendor\\project\\test\\units\\myClass::testMyMethod
# launch all the test methods in class vendor\\project\\test\\units\\myClass
$ ./bin/atoum -m vendor\\project\\test\\units\\myClass::*
$ ./bin/atoum --methods vendor\\project\\test\\units\\myClass::*
# launch only methods named testMyMethod from all test classes
$ ./bin/atoum -m *::testMyMethod
$ ./bin/atoum --methods *::testMyMethodNote
Refer to the section on filters by :ref:`filtres-par-classe-ou-methode` for more information.
This option lets you filter the classes and methods tested, based on namespaces.
$ ./bin/atoum -ns mageekguy\\atoum\\tests\\units\\asserters
$ ./bin/atoum --namespaces mageekguy\\atoum\\tests\\units\\assertersNote
Refer to the section on filters :ref:`filtres-par-namespace` for more information.
This option lets you filter the classes and methods to launch based on tags.
$ ./bin/atoum -t OneTag
$ ./bin/atoum --tags OneTag TwoTagNote
Refer to the section on filters by :ref:`filtres-par-tag` for more information.
This option lets you run the tests in directories defined in the configuration file through $script->addTestAllDirectory('path/to/directory').
$ ./bin/atoum --test-allThis option lets you launch atoum own unit tests to check that it runs smoothly on your server. You can also do it in the configuration with $script->testIt();.
$ ./bin/atoum --test-itThis option lets you specify the extensions of test files to run.
$ ./bin/atoum -tfe phpt
$ ./bin/atoum --test-file-extensions phpt php5tThis option allows you to enable debug mode
$ ./bin/atoum --debugNote
Refer to the section on the :ref:`le-mode-debug` for more information.
This option allows you to activate the loop mode of atoum.
$ ./bin/atoum -l
$ ./bin/atoum --loopNote
Refer to the section on the :ref:`mode-loop` for more information.
This option allow you to force disabling loop mode. This allow you to overwrite a loop mode activated inside a configuration file.
This option enable a mode verbose mode of atoum.
$ ./bin/atoum ++verboseThis option lets you specify atoum reports default title.
$ ./bin/atoum -drt Title
$ ./bin/atoum --default-report-title "My Title"Note
If the title contains spaces, you must surround it with quotes.
This option to enable branch and path coverage scoring. You can also do it by :ref:`configuration<reports-configuration_path-branch>`.
$ ./bin/atoum -ebpc
$ ./bin/atoum --enable-branch-and-path-coverageThis option lets you force the output to the terminal.
$ ./bin/atoum -ft
$ ./bin/atoum --force-terminalThis option lets you specify the path to the output file created by atoum.
$ ./bin/atoum -sf /path/to/atoum.score
$ ./bin/atoum --score-file /path/to/atoum.scoreThis option lets you disable the generation of the code coverage report.
$ ./bin/atoum -ncc
$ ./bin/atoum --no-code-coverageThis option lets you disable the generation of the code coverage report for one or more class.
$ ./bin/atoum -nccfc vendor\\project\\db\\mysql
$ ./bin/atoum --no-code-coverage-for-classes vendor\\project\\db\\mysql vendor\\project\\db\\pgsqlNote
It's important to double each backslash to avoid them being interpreted by the shell.
This option lets you disable the generation of the code coverage report for one or more namespaces.
$ ./bin/atoum -nccfns vendor\\outside\\lib
$ ./bin/atoum --no-code-coverage-for-namespaces vendor\\outside\\lib1 vendor\\outside\\lib2Note
It's important to double each backslash to avoid them being interpreted by the shell.
This option lets you disable the generation of the code coverage report for one or more directories.
$ ./bin/atoum -nccid /path/to/exclude
$ ./bin/atoum --no-code-coverage-in-directories /path/to/exclude/1 /path/to/exclude/2This option lets you disable the generation of the code coverage report for one or more methods.
$ ./bin/atoum -nccfm foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethod
$ ./bin/atoum --no-code-coverage-for-methods foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethodThis option lets you get only execution progression with dots.
$ bin/atoum -udr
$ bin/atoum --use-dot-report
............................................................ [60/65]
..... [65/65]
Success (1 test, 65/65 methods, 0 void method, 0 skipped method, 872 assertions)!This option lets you reduce the output generated by atoum.
$ ./bin/atoum -ulr
$ ./bin/atoum --use-light-report
[SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS>][ 59/1141]
[SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS>][ 118/1141]
[SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS>][ 177/1141]
[SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS>][ 236/1141]
[SSSSSSSSSSSSSSSSSSSSSSSSS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SSSSSSSSSSSSSSSSSS________________________________________][1141/1141]
Success (154 tests, 1141/1141 methods, 0 void method, 0 skipped method, 16875 assertions) !This option lets you to produce tap report
$ ./bin/atoum -utr
$ ./bin/atoum --use-tap-reportThis option makes the test suite fail if there is at least one void test method.
$ ./bin/atoum -fivm
$ ./bin/atoum --fail-if-void-methodsThis option makes the test suite fail if there is at least one skipped test method
$ ./bin/atoum -fism
$ ./bin/atoum --fail-if-skipped-methodsThis option lets you set the maximum number of processes launched to run the tests.
$ ./bin/atoum -mcn 5
$ ./bin/atoum --max-children-number 3This option lets you specify the path to the php executable used to run your tests.
$ ./bin/atoum -p /usr/bin/php5
$ ./bin/atoum --php /usr/bin/php5By default, the value is search amongst the following values (in order):
- PHP_BINARY constant
- PHP_PEAR_PHP_BIN environment variable
- PHPBIN environment variable
- constant PHP_BINDIR + '/php'
This option lets you display a list of available options.
$ ./bin/atoum -h
$ ./bin/atoum --helpThis command initialize some configuration files.
$ ./bin/atoum --init path/to/configuration/directoryThis option lets you display the current version of atoum.
$ ./bin/atoum -v
$ ./bin/atoum --version
atoum version DEVELOPMENT by Frédéric Hardy (/path/to/atoum).. versionadded:: 3.3.0 Dot report added