How to run a specific phpunit xml testsuite?

前端 未结 5 1504
小鲜肉
小鲜肉 2020-11-30 23:15

how can i choose a specific testsuite to be executed?

$ phpunit --configuration config.xml

config.xml:



        
5条回答
  •  难免孤独
    2020-11-30 23:34

    This is not possible in current versions of PHPUnit as evidenced by these messages in phpunit-user mailing list: http://thread.gmane.org/gmane.comp.php.phpunit.user/1302

    But there is an alternative, you can simply pass a path to phpunit.

    phpunit library/XXX
    

    This would run all the tests in library/XXX directory

    If this is not sufficient for you, another option is to use the @group annotation to divide tests into different categories that could then be run selectively.

提交回复
热议问题