It would be useful if there was a version of run-tests.sh that could just run the PHPUnit tests but allowed concurrency.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2867818-3.patch | 6.23 KB | dawehner |
It would be useful if there was a version of run-tests.sh that could just run the PHPUnit tests but allowed concurrency.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 2867818-3.patch | 6.23 KB | dawehner |
Comments
Comment #2
chi commentedWe may consider the use of ParaTest.
Comment #3
dawehnerI tried to experiment a bit with paratest earlier and again now.
Unit tests
I haven't done the research yet why it counts the amount of tests different nor why the pure phpunit runner skips some tests for me.
Kernel tests
Browser tests
TL;DR It speeds things up indeed
As a side note: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/PhpUni... provides some poormans parallelism.
To be honest though
run-tests.shdoes not just solves the paralleism side of things, it opens up the result in a browser. It does things likeComment #4
mile23The version of run-tests.sh that runs phpunit tests concurrently is run-tests.sh. :-)
The issue is maintainability and testability, not capability. See for instance #2641632: Refactor simpletest's *_phpunit_*() (and junit) functions etc. to a class, deprecate where we start to make this hunk of code more maintainable. #2624926: Refactor run-tests.sh for Console component. tries to refactor the whole thing, which might not be the best idea in just one go. #2866082: [Plan] Roadmap for Simpletest talking about decoupling run-tests.sh and other testing infrastructure from the simpletest module.
Even if we do switch to paratest or whatever, we'll still need to maintain run-tests.sh because the testbot needs it for BC on contrib. So let's just make run-tests.sh maintainable.
Adding tag and parent because you can't actually search for 'run-tests.sh' on d.o.
Comment #5
chi commentedAs a side note, the performance of tests can be improved by adjusting the number of test processes to run in parallel.
Here are ParaTest results against core/tests/Drupal/KernelTests/Core/Entity made on my local environment (8 cores).
Given the above note (#4) there is no point in adding ParaTest to core unless it is considered as successor of run-tests.php in Drupal 9.
Comment #6
dawehnerI have a hard time seeing us maintaining simpletest and run-tests.sh and all the suite in case phpunit totally cuts it. In general it feels like its better to make the phpunit stuff better than to iterating on the simpletest stuff, but you know, that's simply my personal opinion.
Comment #7
mile23OK, so what specifically is missing that we'll get by going from three test runners to four?
Comment #11
jibranI think it should be good if we'd be able to fix it before D9.
Comment #12
mile23What needs fixing?
Comment #13
jibranI meant get rid of run-test.sh and build/use a new phpunit based script which allows concurrency for drupalci.
Comment #14
mile23run-tests.sh currently provides concurrency for PHPUnit-based tests under DrupalCI.
I don't love run-tests.sh, but we have two options:
Make run-tests.sh maintainable or re-write run-tests.sh.
The former can be accomplished in a way that's consistent. In fact most of the work has already been done and awaits review, or at least a ping of interest from anyone to do a reroll. #2866082: [Plan] Roadmap for Simpletest