PHPUnit: execute testSuites tags in a specific order

I have testsuites(PHPUnit-Selenium, PHPUnit), I want to run them in a specific order. So I want to run the "install (selenium driven)" test suite, then the "unit tests". I know that I should avoid dependencies in unit testing, but this is not my question (I work with an old application with many dependencies, I need to install and test this task with selenium, then run unit tests, etc.).

So, I don’t need a specific order for my “test cases”, this is normal for this, but only for my “test cases”. Here is my configuration file phpunit.xml:

<phpunit backupGlobals="false">

    <selenium>
      <browser name="Firefox" browser="*firefox" timeout="600" />
    </selenium>

    <testsuites>
        <testsuite name="install (selenium driven)">
            <file>./_install.php</file>
            <exclude>./bin</exclude>
        </testsuite>
        <testsuite name="unit tests">
            <directory>./</directory>
            <exclude>./selenium</exclude>
        </testsuite>
    </testsuites>
</phpunit>

, phpunit, , "install (selenium driven)", " " ( MySQL, ). ? :

  • " (selenium driven)".
  • "unit tests"

:

  • testCases, .
  • , backupGlobals=false , , :(...
  • bootstrap, "" ( ).

, ! ( , ...)

+4
1

, . Unix , , .

, , "" - , , . , setupBeforeClass() unit test. shell_exec() phpunit , , die , .

P.S. , , , , : , , . - , , , . ( @depends ) .

+1

All Articles