diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8735975fa7..e23d8ad9d6 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -35,6 +35,8 @@ + + diff --git a/tests/README.md b/tests/README.md index 52ddc1e671..9f9b0e471c 100644 --- a/tests/README.md +++ b/tests/README.md @@ -110,8 +110,13 @@ You can run the tests without running the live database and the live cache tests ## Generating Code Coverage -To generate coverage information, including HTML reports you can view in your browser, -you can use the following command: +The coverage reports are generated by default after the execution of tests. These reports +include a textual overview and HTML reports which can be opened in a browser. + +The text file can be found at **build/coverage/text/coverage.txt**. +The HTML files can be viewed by opening **build/coverage/html/index.html** in your favorite browser. + +Alternatively you can use the following command: ```console ./phpunit --colors --coverage-text=tests/coverage.txt --coverage-html=tests/coverage/ -d memory_limit=1024m @@ -122,8 +127,8 @@ functions, and files are tested. It also reports the percentage of the code that It is collected in two formats: a simple text file that provides an overview as well as a comprehensive collection of HTML files that show the status of every line of code in the project. -The text file can be found at **tests/coverage.txt**. -The HTML files can be viewed by opening **tests/coverage/index.html** in your favorite browser. +For the example above, the text file can be found at **tests/coverage.txt** and +the HTML files can be viewed by opening **tests/coverage/index.html**. ## PHPUnit XML Configuration