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

[DX] Add optional testdox/pest like output to get exact test metrics per unit test fixture #4821

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Aug 20, 2023

Make use of https://github.com/robiningelbrecht/phpunit-pretty-print to return testdox-like output.

This allows us:

  • see test runtime in ms per case
  • see slow tests
  • see progress of current test case

Use like:

vendor/bin/phpunit -c phpunit-debug.xml

@samsonasik
Copy link
Member

@TomasVotruba TomasVotruba changed the title tv phpunit display [WIP] tv phpunit display Aug 20, 2023
@TomasVotruba
Copy link
Member Author

I see 👍 I think they're disable by default and this extension turns them on.

I want to keep original PHPUnit output by default and enable this extension on the in CLI. Any ideas how to achieve that?

@samsonasik
Copy link
Member

@samsonasik
Copy link
Member

Oh, that's enable on purpose previously:

so not that

@TomasVotruba
Copy link
Member Author

TomasVotruba commented Aug 20, 2023

I want to keep original PHPUnit output by default and enable this extension on the in CLI. Any ideas how to achieve that?

This is more important. I want to run something like:

vendor/bin/phpunit --bootstrap xy

...to enable this output for local debugging. The CI and everything else should be untouched.

Any ideas how to achieve that?

@samsonasik
Copy link
Member

Probably create different phpunit.xml? Eg: phpunit.xml.ci.dist, Copy the file into phpunit.xml on run on CI

@TomasVotruba
Copy link
Member Author

Indeed 👍 That's what I though, it just feels wrong to copy-paste so much :D

@TomasVotruba TomasVotruba force-pushed the tv-phpunit-display branch 2 times, most recently from 736bd2e to f2f79c5 Compare August 20, 2023 17:35
@TomasVotruba TomasVotruba changed the title [WIP] tv phpunit display [PHPUnit] Fix extreemely slow PHPUnit run on data providers with value objects Aug 20, 2023
@TomasVotruba TomasVotruba changed the title [PHPUnit] Fix extreemely slow PHPUnit run on data providers with value objects [PHPUnit] Fix extreemely slow PHPUnit run on data providers with objects Aug 20, 2023
@TomasVotruba TomasVotruba changed the title [PHPUnit] Fix extreemely slow PHPUnit run on data providers with objects [DX] Add optional testdox/pest like output to get exact test metrics per unit test fixture Aug 20, 2023
@TomasVotruba
Copy link
Member Author

ClI-based invoke in progress: robiningelbrecht/phpunit-pretty-print#1

@TomasVotruba TomasVotruba merged commit fa6bad2 into main Aug 21, 2023
@TomasVotruba TomasVotruba deleted the tv-phpunit-display branch August 21, 2023 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants