Excluding certain tests from loading in phpunit
<p>Some of my testcases use a custom testing library. Also these testcases are very slow. So I would like to run them only in the build server and not in my local. I want to run the other tests locally.</p>

<p>Following is the directory structure. The ones inside the <code>slow</code> directory are the slow test cases that should be excluded.</p>

<pre><code>/tests/unit-tests/test-1.php
/tests/unit-tests/test-2.php
/tests/unit-tests/slow/test-1.php
/tests/unit-tests/slow/test-2.php
/tests/unit-tests/foo/test-1.php
/tests/unit-tests/bar/test-2.php
</code></pre>

<p>I tried creating groups using <code>@group</code> annotation. This works, but the issue is that these test files are getting loaded (tests not executed though). Since they require the test library which is not installed locally, it is giving an error.</p>

<p>What is the best way to create the phpunit.xml configuration such that these slow tests are excluded (and not even loaded) by default and can be executed if needed?</p>