- Issue created by @longwave
- Status changed to Needs review
8 months ago 12:36pm 26 April 2024 - 🇭🇺Hungary Gábor Hojtsy Hungary
Looks generally good. Why do we keep TestSuiteBaseTest?
- 🇬🇧United Kingdom catch
📌 Removed deprecated code in TestSuites Postponed is already open, one should be marked duplicate.
- 🇬🇧United Kingdom longwave UK
Whoops, didn't find that one. This one has slightly more changes (phpcs.xml and phpunit.xml) but otherwise is identical - I don't see why that is postponed, as the tests pass here?
- 🇬🇧United Kingdom longwave UK
@Gábor Hojtsy TestSuiteBaseTest still contains a test method to assert that the timezone is set correctly in the PHPUnit bootstrap, I looked for a more appropriate test to merge this into but couldn't find one, so it makes sense to me to leave it where it is.
- Status changed to Needs work
8 months ago 2:04pm 26 April 2024 - 🇮🇹Italy mondrake 🇮🇹
We can do this here, or in the other issue, or in the issue that will bump PHPUnit to 10.
What’s important is that we do not remove the test suites without providing a proper replacement. It’s not relevant for Drupal own testing since run-test.sh is not relying on PHPUnit test suite discovery process (tests are discovered by Drupal’s own code, then each test file is run independently and in a multithread mode). But it is relevant if anyone wants to run tests by group or by suite with PHPUnit own CLI.
It would also need sime manual testing.
- 🇮🇹Italy mondrake 🇮🇹
- 🇬🇧United Kingdom catch
But it is relevant if anyone wants to run tests by group or by suite with PHPUnit own CLI.
The core performance test job runs tests with raw phpunit, and @group. However, I'm a bit confused why removing test suites would break @group, I didn't try to find out why yet.
I think if we only lose the suites themselves and not @group support, we don't necessarily need a replacement up front, we could always add one later. It's not viable to run all functional, functional javascript, or even build tests in one go locally, even kernel tests are a stretch, so it's only really useful for core's actual unit tests.
- 🇬🇧United Kingdom longwave UK
I don't think I've ever even run all unit tests locally at once, I just run individual test classes 99% of the time. Now GitLab CI is so fast it's easiest (although admittedly not the cheapest) just to push and wait 10 minutes for the full set of results, local will always be significantly slower at a large number of test executions.
- 🇬🇧United Kingdom catch
Yeah same here as #14, sometimes even an individual functional or functional javascript test can take as long as a full gitlab test run, which makes sense given it's the slowest test classes that are the limiting factor on gitlab rather than the number of tests now.
- 🇮🇹Italy mondrake 🇮🇹
Unless I’m mistaken…
PHPUnit just uses the ‘suite’ concept to group together a set if test files for which you want to habe a common configuration, see https://docs.phpunit.de/en/11.1/organizing-tests.html
So you can run all tests of a ‘suite’.
But if you want to run all tests of a ‘@group’ in PHPUnit CLI, PHPUnit needs to find all tests in all suites first, then run those that fulfill the group.
I regularly use
—group Database
to run database tests in PHPUnit CLI, and that runs all @group Database tests regardless of the suite they are in. - 🇫🇷France andypost
I find groups handy to exclude some tests, I even have 📌 Make clear separation of action testing groups Needs work
Moreover it's helpful for https://github.com/php/php-src/issues/9992
- 🇺🇸United States smustgrave
So believe this is the last one needed for deprecation removals for d11 but sounds like there is discussion on that? Are we extending the deprecations to 12?
- 🇬🇧United Kingdom longwave UK
We can't extend this to 12, this won't work when we are on PHPUnit 10. So we have to figure out if the group option in PHPUnit 10 still works, and if not, what to do about it.
- Status changed to Closed: duplicate
8 months ago 9:12am 3 May 2024 - 🇮🇹Italy mondrake 🇮🇹
This one will be eventually fixed in 📌 Upgrade PHPUnit to 10, drop Symfony PHPUnit-bridge dependency Fixed .