Skip to content

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

Merged
TomasVotruba merged 3 commits intomainfrom
tv-phpunit-display
Aug 21, 2023
Merged

[DX] Add optional testdox/pest like output to get exact test metrics per unit test fixture#4821
TomasVotruba merged 3 commits intomainfrom
tv-phpunit-display

Conversation

@TomasVotruba
Copy link
Copy Markdown
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
Copy Markdown
Member

@TomasVotruba TomasVotruba changed the title tv phpunit display [WIP] tv phpunit display Aug 20, 2023
@TomasVotruba
Copy link
Copy Markdown
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
Copy Markdown
Member

@samsonasik
Copy link
Copy Markdown
Member

Oh, that's enable on purpose previously:

so not that

@TomasVotruba
Copy link
Copy Markdown
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
Copy Markdown
Member

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

@TomasVotruba
Copy link
Copy Markdown
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
Copy Markdown
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