php - 使用 PHPUnit,如何只测试两个或多个组?

标签 php testing

在 PHPUnit 的帮助中显示如下:

  --group ...              Only runs tests from the specified group(s).
  --exclude-group ...      Exclude tests from the specified group(s).

对一组来说足够简单。这有效:

phpunit --group fast

现在,我不太明白如何对多个组执行此操作。以下对我不起作用:

phpunit --group fast unit   # It believes you want to test unit.php
phpunit --group fast, unit  # It believes you want to test unit.php
phpunit --group "fast unit" # It looks for a single group "fast unit"
phpunit --groups fast, unit # There is no option, groups
phpunit --group fast --group unit   # Only one is honored

任何关于正确语法的想法都将受到欢迎。谢谢。

最佳答案

使用没有任何空格的逗号分隔。例如

phpunit --group fast,unit

关于php - 使用 PHPUnit,如何只测试两个或多个组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4806260/

相关文章:

php - jQuery UI 可排序并更新 mysql 数据库

php - 如何让用户级别编辑任何人制作的自定义帖子类型?

php - MySQL合并重复记录的方法

java - 与 Junit 并行运行测试

testing - 使用 TypeORM 和 Nestjs 进行测试的过程,以及使用 mocks 开玩笑的过程?

ruby-on-rails - FactoryGirl after_create 方法不保存

php - 如何去掉重复的Json信息?

php - Wordpress 和 Enquire.js - 条件加载原理

testing - 将当前 URL 写入 TestCafe 中的控制台

java - 如何在 JMeter 中分析和报告 HTTP 响应