Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to print the list of test files #5642

Merged
merged 1 commit into from Jan 12, 2024

Conversation

joke2k
Copy link
Contributor

@joke2k joke2k commented Jan 4, 2024

Hello, this work introduces a new command for writing the list of test files, utilizing standard filters such as group, exclude-group, suite, etc.

--list-test-files                List available test files

This could be beneficial when a test runner, like CircleCI, needs to split tests among different workers (see parallelism in https://circleci.com/docs/parallelism-faster-jobs/#other-ways-to-split-tests).

By utilizing this command in conjunction with my previous PR#5462: Support for multiple arguments on CircleCI it will be possible to efficiently split the tests in the following manner:

phpunit $(phpunit --list-test-files | sed -n 's/^ - //p' | circleci tests split)

Making the use of phpunit-finder obsolete, which now seems to be deprecated.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (63eb2ab) 89.28% compared to head (1296afe) 89.34%.

Files Patch % Lines
...c/TextUI/Command/Commands/ListTestFilesCommand.php 95.65% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5642      +/-   ##
============================================
+ Coverage     89.28%   89.34%   +0.06%     
- Complexity     6409     6423      +14     
============================================
  Files           682      683       +1     
  Lines         20370    20403      +33     
============================================
+ Hits          18187    18229      +42     
+ Misses         2183     2174       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented feature/test-runner CLI test runner labels Jan 4, 2024
@sebastianbergmann sebastianbergmann added this to the PHPUnit 11.0 milestone Jan 4, 2024
@sebastianbergmann
Copy link
Owner

After 43ee0fe, this branch has conflicts that must be resolved. Sorry!

@joke2k
Copy link
Contributor Author

joke2k commented Jan 8, 2024

After 43ee0fe, this branch has conflicts that must be resolved. Sorry!

don't worry, I fixed the tests and resolved the conflicts.

sorry about closing and reopening was a misclick

@joke2k joke2k closed this Jan 8, 2024
@joke2k joke2k reopened this Jan 8, 2024
@sebastianbergmann
Copy link
Owner

GitHub still tells me "This branch cannot be rebased due to conflicts".

@joke2k joke2k force-pushed the list-test-files branch 2 times, most recently from d387c7d to 4d6f46b Compare January 9, 2024 20:45
@joke2k
Copy link
Contributor Author

joke2k commented Jan 9, 2024

GitHub still tells me "This branch cannot be rebased due to conflicts".

don't know what happened after your forced push, btw now seems to be fixed.

@sebastianbergmann sebastianbergmann merged commit fa87e27 into sebastianbergmann:main Jan 12, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants