I have some testsuites
(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.).
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 phpunit.xml
configuration file :
<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>
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 :
- Run "install (selenium driven)" test suite
- Run "unit tests" test suite
Other information :
- I have many testCases files so I don't want to specify them
- I know I should avoid
backupGlobals=false
too, I'm sorry, I can't :( ... - I know the
bootstrap
option, but I need to "test" installation (so it's a test suite)
Thanks a lot if you have a clue ! (I've tried to find a solution, but I did not find any for now...)