Note that there are some explanatory texts on larger screens.

plurals
  1. POPHPUnit : Execute testSuites in specific order
    primarykey
    data
    text
    <p>I have some <code>testsuites</code> (PHPUnit-Selenium, PHPUnit), I want to run them in a specific order. So I want to run "install (selenium driven)" test suite then "unit tests" test suite. I know I should avoid dependencies in Unit testing, but my question is not about this (I work with an old application with many dependencies, I need an installation and test this intallation with selenium then run unit tests, etc.). </p> <p>So, I don't need a specific order for my "test cases", it's okay for this, but only for my "test suites". Here is my <code>phpunit.xml</code> configuration file :</p> <pre><code>&lt;phpunit backupGlobals="false"&gt; &lt;selenium&gt; &lt;browser name="Firefox" browser="*firefox" timeout="600" /&gt; &lt;/selenium&gt; &lt;testsuites&gt; &lt;testsuite name="install (selenium driven)"&gt; &lt;file&gt;./_install.php&lt;/file&gt; &lt;exclude&gt;./bin&lt;/exclude&gt; &lt;/testsuite&gt; &lt;testsuite name="unit tests"&gt; &lt;directory&gt;./&lt;/directory&gt; &lt;exclude&gt;./selenium&lt;/exclude&gt; &lt;/testsuite&gt; &lt;/testsuites&gt; &lt;/phpunit&gt; </code></pre> <p>So when I run phpunit, it seems it does not wait for "install (selenium driven)" result, so "unit tests" fails (MySQL error, but nevermind). How can I deal with this ? I would like two separate steps :</p> <ol> <li>Run "install (selenium driven)" test suite</li> <li>Run "unit tests" test suite</li> </ol> <p>Other information : </p> <ul> <li>I have many testCases files so I don't want to specify them</li> <li>I know I should avoid <code>backupGlobals=false</code> too, I'm sorry, I can't :( ...</li> <li>I know the <code>bootstrap</code> option, but I need to "test" installation (so it's a test suite)</li> </ul> <p>Thanks a lot if you have a clue ! (I've tried to find a solution, but I did not find any for now...)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload