-
- Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
The <groups> element and the defaultTestSuite attribute can be used, for example, to filter the tests to be run already in the XML configuration file. While I do not (anymore, at least) think that this is a good idea, these are configuration options that have been around for a long time and that are used in practice. How widely they are used, though, I do not know.
Here is an example: https://github.com/phpstan/phpstan-doctrine/blob/2.0.6/phpunit.xml#L36-L40
With this configuration, phpunit will run all tests except for those that have a #[Group('platform')] attribute and phpunit --group=platform will run only the tests that have a #[Group('platform')] attribute. However, running all tests is not possible.
We should consider introducing a new CLI option to ignore test filtering configured in the XML configuration file. Maybe --all is a good name for this.