[英]Run test methode in phpunit Testsuite
I would like to create a testsuite which will run a list of test methods. 我想创建一个测试套件,它将运行一系列测试方法。 I just found a way to run the whole file.
我只是找到了一种运行整个文件的方法。 Is there a way to just run a specific methode?
有没有办法只运行特定的方法? like so:
像这样:
<phpunit bootstrap="src/autoload.php">
<testsuites>
<testsuite name="money">
<file>tests/IntlFormatterTest.php::test1</file>
<file>tests/IntlFormatterTest.php::test5</file>
<file>tests/CurrencyTest.php::test7</file>
</testsuite>
</testsuites>
</phpunit>
That is not possible (and not desirable) to configure using the XML configuration file. 使用XML配置文件进行配置是不可能的(也是不希望的)。
What you want is to use --filter
to dynamically select the tests to execute. 您要使用
--filter
动态选择要执行的测试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.