-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
DX: Use ParaUnit to speed up tests #6883
Changes from all commits
adaca94
a445af9
5bdba7f
aa859fa
82b04ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
"symfony/stopwatch": "^5.4 || ^6.0" | ||
}, | ||
"require-dev": { | ||
"facile-it/paraunit": "^1.3 || ^2.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tbh, I never heard about it. when thinking about parallel execution of PHPUnit, somehow I always had in mind https://github.com/paratestphp/paratest , and to my understanding maintainer of it, Slamdunk, is also more close to PHPUnit itself. would you mind to share this and that about 2 solutions and arguments for decision? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, Paraunit creator here. Paratest was in disuse when I created Paraunit, but Slamdunk took it over later and revived it. Now it has been used into Laravel, hence the growing popularity. The main difference between the two tools is basically in the approach: Paratest is "hand on", uses BTW I know Slamdunk and he even invited me to co-maintaint Paratest, but I have to admit I'm not so well versed in it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the details! side note: yeah, it could be interesting to have the parallel executor available, instead of few possibilities. I could suggest one step further - consider to incorporate it to PHPUnit natively [I know Sebastian wanted to have some internal cleanups first, but if I recall right, lot of them already in place] |
||
"justinrainbow/json-schema": "^5.2", | ||
"keradus/cli-executor": "^2.0", | ||
"mikey179/vfsstream": "^1.6.11", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you tried to compare results of coverage generated by PHPUnit and by paraunit? what's the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I did not verify it, but I'll do it 馃憤.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of coverage it looks like everything works as it should:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have the feeling that number should not be different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number is different because the code is having global state, e.g. https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.21.1/src/Tokenizer/CT.php#L99-L104 - running it with PHPUnit make that
if
covered (or not covered) all the time with the same result, ParaUnit make it non-deterministic.If you run PHPUnit like
./vendor/bin/phpunit --order-by=random
you will get slightly different coverage for each run.