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
Proposal for progress output when using teamcity. #5367
Conversation
If JetBrains / the PhpStorm team is fine with this change then I will accept this (after the tests that now fail due to changed output have been updated). |
Thank you very much. |
Codecov Report
@@ Coverage Diff @@
## main #5367 +/- ##
============================================
- Coverage 85.67% 85.02% -0.65%
+ Complexity 6181 6126 -55
============================================
Files 654 654
Lines 19668 19446 -222
============================================
- Hits 16850 16534 -316
- Misses 2818 2912 +94
... and 149 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Do I need to add new test cases? Currently, the only test case is a combination of "--teamcity" and "--no-progress" and there is no test case for "--teamcity" only. PS: added. |
Is there anything I should do about this pull request? If there is nothing in particular I should do, I will wait as I know you are all busy with other tasks! |
…ith the no progress option, rather than unconditionally turning off progress when teamcity is used.
Add --no-progress into command.
Add --no-progress into command.
Add --no-progress into command.
…ith "--no-progress".
Fixed conflicts and aligned new tests with upstream specs. |
@isfedorov What do you think about this PR? |
@SakiTakamachi Could you please clarify why do you need to run PhpUnit tests from CLI with flag |
@isfedorov The goal is to control the display of progress when running tests in PhpStorm, rather than executing them from the CLI. |
@SakiTakamachi Thank you, got it. Could you please clarify why you need to display progress in output rather than just use PhpStorm's indicators in the related tool window? The tool window can already display What benefits will such additional data in output bring to users? |
@isfedorov The intention is to facilitate debugging during test execution by using functions like |
Currently, the control of output for debugging is associated with the control of progress display. |
@SakiTakamachi Thank you for the clarification.
That sounds a bit strange to me. It looks to me that the control of progress (--no-progress) should control only displaying of progress (like dots in CLI For sure PhpStorm can pass by default |
PHPUnit uses PHP's output buffering to capture output made by test(ed) code. When the test does not perform assertions on captured output then the output is considered unexpected and an |
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it, see #5445. |
Overview
Changed to allow selection of output state when used in conjunction with the "--no-progress" option, rather than unconditionally turning off progress when "--teamcity" is used.
Why ?
It is common to use var_dump() or other debugging methods during testing.
The "--teamcity" option turns off the progress display and the associated debugging output.
I have seen people on social networking sites and around me having trouble with this, so I thought it would be a good idea to combine the "--no-pregress" option to allow users to choose their own behavior.
Other ways
Or, if you prefer, I can add an option such as "--teamcity-with-progress" to achieve the same thing, and I will modify it accordingly.
Test
Fixed test failures other than 1348 in the regression test, which had originally failed.
Added a test without "--no-progress" of teamcity and renamed tests with "--no-progress".