From afb3df190454fb98db0467be916b724398891b43 Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Fri, 10 Oct 2014 03:52:48 +0200 Subject: we will deprecate old test classes in 4 months and not in 2, simplified test run by only allowing short version, added some examples --- tests/README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'tests/README.md') diff --git a/tests/README.md b/tests/README.md index dffd94a16b..16d1b1ee90 100644 --- a/tests/README.md +++ b/tests/README.md @@ -70,14 +70,21 @@ To execute the tests: 4. Run the tests - $ cd /path/to/piwik/tests/PHPUnit - $ phpunit --testsuite UnitTests - $ phpunit --testsuite IntegrationTests - $ phpunit --testsuite SystemTests - - There are also two main groups of tests: Core and Plugins - For example run `phpunit --group Core` - to run all Core Piwik tests. + $ cd /path/to/piwik + $ ./console tests:run --testsuite unit + $ ./console tests:run --testsuite integration + $ ./console tests:run --testsuite system + + There are also two main groups of tests: core and plugins + For example run `./console tests:run core` to run all Core Piwik tests. + + You can combine testsuite and groups like this: + `./console tests:run --testsuite unit core`. This would run all unit tests in core. + `./console tests:run --testsuite integration CustomAlerts`. This would run all integration tests of the CustomAlerts plugin. + `./console tests:run CustomAlerts`. This would run all unit, integration and system tests of the CustomAlerts plugin. (group only) + + To execute multiple groups you can separate them via a comma: + `./console tests:run CustomAlerts,Insights`. This would run all unit, integration and system tests of the CustomAlerts and Insights plugin. 5. Write more tests :) See ["Writing Unit tests with PHPUnit"](http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html) -- cgit v1.2.3