Pregunta

I'm using Symfony Functional Tests in NETBEANS. Is it possible to define the order in which order will the test cases be executed?

For example: I have "UserTestCase" case for testing registration of users, changing their profiles etc, and "ForumTestCase" for testing creation of forum posts etc. I want to run UserTestCase before ForumTestCase. Now the order is according to file names (F.. before U..)

¿Fue útil?

Solución 2

I'm using Netbeans for the development and I was wondering for a long time, why this didn't work for me.

Then I found out, that Netbeans simply ignores folder definitions and the order of execution defined in phpunit.xml

See here: https://netbeans.org/bugzilla/show_bug.cgi?id=199072

Otros consejos

You need to define order of tests in your phpunit.xml as described in docs

example:

<phpunit>
  <testsuites>
    <testsuite name="Object_Freezer">
      <file>Tests/Freezer/HashGenerator/NonRecursiveSHA1Test.php</file>
      <file>Tests/Freezer/IdGenerator/UUIDTest.php</file>
      <file>Tests/Freezer/UtilTest.php</file>
      <file>Tests/FreezerTest.php</file>
      <file>Tests/Freezer/StorageTest.php</file>
      <file>Tests/Freezer/Storage/CouchDB/WithLazyLoadTest.php</file>
      <file>Tests/Freezer/Storage/CouchDB/WithoutLazyLoadTest.php</file>
    </testsuite>
  </testsuites>
</phpunit>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top