Changing addUncoveredFilesFromWhitelist to false drastically speeds up code coverage report generation. Including extensions/skins in the config also removes the need to manually edit your phpunit.xml file when you want to inspect code coverage for your extension or skin locally. With this patch you can very quickly generate coverage for an extension/skin or subsection of core, this is especially useful if you are using an IDE that supports running a test and importing its coverage into the editor. The downside to this patch is that the coverage report only contains information about code that's exercised by the tests, so this patch on its own is unsuitable for our current processes in integration/config which generate a full code coverage report per patch for extensions or post-merge for core. However, since we are not yet using phpunit.xml.dist in CI, this patch should be OK to merge as is. A follow-up patch to integration/config will use sed or phpunit-suite-edit.py to set processUncoveredFilesFromWhitelist to true. Bug: T192078 Change-Id: I3d19627fa36f6cc6666c29fdb638272fdaa30630
66 lines
1.9 KiB
XML
66 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<phpunit bootstrap="tests/phpunit/bootstrap.php"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
|
|
|
|
colors="true"
|
|
backupGlobals="false"
|
|
convertErrorsToExceptions="true"
|
|
convertNoticesToExceptions="true"
|
|
convertWarningsToExceptions="true"
|
|
forceCoversAnnotation="true"
|
|
stopOnFailure="false"
|
|
timeoutForSmallTests="10"
|
|
timeoutForMediumTests="30"
|
|
timeoutForLargeTests="60"
|
|
beStrictAboutTestsThatDoNotTestAnything="true"
|
|
beStrictAboutOutputDuringTests="true"
|
|
beStrictAboutTestSize="true"
|
|
verbose="false">
|
|
<php>
|
|
<ini name="memory_limit" value="512M" />
|
|
</php>
|
|
<testsuites>
|
|
<testsuite name="unit">
|
|
<directory>tests/phpunit/unit</directory>
|
|
<directory>**/**/tests/phpunit/unit</directory>
|
|
</testsuite>
|
|
<testsuite name="integration">
|
|
<directory>tests/phpunit/integration</directory>
|
|
<directory>**/**/tests/phpunit/integration</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
<groups>
|
|
<exclude>
|
|
<group>Broken</group>
|
|
</exclude>
|
|
</groups>
|
|
<filter>
|
|
<whitelist addUncoveredFilesFromWhitelist="false">
|
|
<directory suffix=".php">includes</directory>
|
|
<directory suffix=".php">languages</directory>
|
|
<directory suffix=".php">maintenance</directory>
|
|
<directory suffix=".php">extensions</directory>
|
|
<directory suffix=".php">skins</directory>
|
|
<exclude>
|
|
<directory suffix=".php">languages/messages</directory>
|
|
<file>languages/data/normalize-ar.php</file>
|
|
<file>languages/data/normalize-ml.php</file>
|
|
</exclude>
|
|
</whitelist>
|
|
</filter>
|
|
<listeners>
|
|
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener">
|
|
<arguments>
|
|
<array>
|
|
<element key="slowThreshold">
|
|
<integer>50</integer>
|
|
</element>
|
|
<element key="reportLength">
|
|
<integer>50</integer>
|
|
</element>
|
|
</array>
|
|
</arguments>
|
|
</listener>
|
|
</listeners>
|
|
</phpunit>
|