wiki.techinc.nl/tests/phpunit/suite.xml
Michael Große d9b50a9c0e phpunit: Consider "risky" tests as failed tests
Jenkins, or more precise, junit, already detects PHPUnit's risky tests.
This is currently mapped to the "UNSTABLE" build status for Jenkins jobs.
Our Zuul confguration does consider UNSTABLE as a failure, so it does
result in the appropiate V-1 score already.

But, "UNSTABLE" is confusing in the Gerrit comments from jenkins-bot,
but it is merely about a PHPUnit test, for example:
https://integration.wikimedia.org/ci/job/wmf-quibble-vendor-mysql-php72-docker/28970/

This patch lets phpunit fail loudly and explicitly on risky tests,
and thus makes them easier to find and fix.

Change-Id: I95a54d1e4c8bf6b6abcc698bc14c2db5ce6c2a7d
2020-04-06 18:05:50 +00:00

92 lines
2.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./bootstrap.maintenance.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"
failOnRisky="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
verbose="false">
<testsuites>
<testsuite name="includes">
<directory>includes</directory>
</testsuite>
<testsuite name="languages">
<directory>languages</directory>
</testsuite>
<testsuite name="parsertests">
<file>suites/CoreParserTestSuite.php</file>
<file>suites/ExtensionsParserTestSuite.php</file>
</testsuite>
<testsuite name="skins">
<directory>skins</directory>
<directory>structure</directory>
<file>suites/ExtensionsTestSuite.php</file>
<file>suites/LessTestSuite.php</file>
</testsuite>
<!-- As there is a class Maintenance, we cannot use the name "maintenance" directly -->
<testsuite name="maintenance_suite">
<directory>maintenance</directory>
</testsuite>
<testsuite name="structure">
<directory>structure</directory>
</testsuite>
<testsuite name="tests">
<directory>tests</directory>
</testsuite>
<testsuite name="extensions">
<directory>structure</directory>
<file>suites/ExtensionsTestSuite.php</file>
<file>suites/ExtensionsParserTestSuite.php</file>
<file>suites/LessTestSuite.php</file>
</testsuite>
<testsuite name="documentation">
<directory>documentation</directory>
</testsuite>
<testsuite name="unit">
<directory>unit</directory>
</testsuite>
<testsuite name="integration">
<directory>integration</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>Broken</group>
</exclude>
</groups>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">../../includes</directory>
<directory suffix=".php">../../languages</directory>
<directory suffix=".php">../../maintenance</directory>
<exclude>
<directory suffix=".php">../../languages/messages</directory>
<directory suffix=".php">../../maintenance/benchmarks</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>