Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabian Becker <halfdan@xnorfz.de>2013-02-19 03:46:32 +0400
committerFabian Becker <halfdan@xnorfz.de>2013-02-20 04:51:32 +0400
commitdb995c7a43966c0289e9644b7e83be735b2fde29 (patch)
treea7df0e2337b41a6531d87ac2745e630b2b3eee33 /tests
parentcee4144362e8e85d77e2dfcaeba0101668c2cfe3 (diff)
More README cleanup and proper formatting.
[ci skip]
Diffstat (limited to 'tests')
-rw-r--r--tests/README.md32
1 files changed, 14 insertions, 18 deletions
diff --git a/tests/README.md b/tests/README.md
index f905c3d8e9..b86817fc1f 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -34,12 +34,10 @@ it might be that your changes are breaking some features unexpectedly.
1. Install PHPUnit on your system
- ```
$ cd your/php/directory
$ sudo pear upgrade PEAR
$ pear config-set auto_discover 1
$ sudo pear install --alldeps pear.phpunit.de/PHPUnit
- ```
Doc at: http://www.phpunit.de/manual/current/en/installation.html
@@ -52,23 +50,19 @@ it might be that your changes are breaking some features unexpectedly.
3. Run the tests (see the next section to run tests in the browser)
- ```
$ cd /path/to/piwik/tests/PHPUnit
$ phpunit
- ```
This will run all unit + integration tests. It might take 30 minutes to run.
You can also run tests of specified "parts" of Piwik.
There are three main groups of tests: Core, Plugins and Integration
- For example run
- $ phpunit --group Core
+ For example run `phpunit --group Core`
to run all Core Piwik tests. You may also combine groups like
- $ phpunit --group Core,Plugins
+ `phpunit --group Core,Plugins`
4. Write more tests :)
- See "Writing Unit tests with PHPUnit"
- http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html
+ See ["Writing Unit tests with PHPUnit"](http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
## JavaScript Tests
@@ -111,20 +105,22 @@ several environments before being able to commit their work.
Excluding images altogether is not an option as they are an important feature.
Therefore, PNG graphs are only tested if the system under test has the same characteristics as the integration server.
-The characteristics of the integration server are described in IntegrationTestCase::canImagesBeIncludedInScheduledReports()
+The characteristics of the integration server are described in `IntegrationTestCase::canImagesBeIncludedInScheduledReports()`
If your system does not comply to those characteristics, images will not be tested and PHPUnit will display the
-warning message contained in IntegrationTestCase::alertWhenImagesExcludedFromTests().
+warning message contained in `IntegrationTestCase::alertWhenImagesExcludedFromTests()`.
In this case, the integration test suite might pass on your box but fail on the integration server. This means your
work altered the expected images. The standard procedure described in the INTEGRATION TESTS section needs to be applied :
- 1 - find out if the change is expected (*)
- 2 - a. if the change is expected, the expected files need to be updated (*)
- b. if the change is not expected, there is a bug needing to be fixed
+
+ 1. find out if the change is expected (*)
+ 2. a. if the change is expected, the expected files need to be updated (*)
+ b. if the change is not expected, there is a bug needing to be fixed
(*) to analyse and/or generate the expected files, you can either
- - set up the vagrant piwik vm (which is used by the integration server) or
- - retrieve the files from the integration server.
+
+ - set up the vagrant piwik vm (which is used by the integration server) or
+ - retrieve the files from the integration server.
## Continous Integration
@@ -169,7 +165,7 @@ click the 'Run tests' button.
If you're in need of a URL that will not only load VisualPHPUnit but run one or more tests,
you may add the list of tests to run as the hash of the URL. For example,
-http://path/to/piwik/trunk/tests/lib/visualphpunit/#/Core/DataTableTest.php:/Core/CookieTest.php
+http://path/to/piwik/tests/lib/visualphpunit/#/Core/DataTableTest.php:/Core/CookieTest.php
will load VisualPHPUnit and immediately run the tests in DataTableTest.php and CookieTest.php.
Currently, this feature will not allow you to specify directories with tests to run.
@@ -181,7 +177,7 @@ and clicking the 'Run Tests' button. If you want to use a phpunit.xml file, eith
one that comes with Piwik, you'll need to modify VisualPHPUnit's configuration. Edit the file
located at
-/path/to/piwik/trunk/tests/lib/visualphpunit/app/config/bootstrap.php
+/path/to/piwik/tests/lib/visualphpunit/app/config/bootstrap.php
and set the 'xml_configuration_file' config option.