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

Add test for bug: JUnit doesn't log error, and it doesn't appear in DefaultPrinter #5188

Merged

Conversation

Slamdunk
Copy link
Contributor

@Slamdunk Slamdunk commented Feb 9, 2023

This test passes on 9.6 (with proper, minor adjustments of the --FILE-- section of course).

Basically in 10.0 when:

  • The test errors in the setUp
  • The JUnit logger is active

The following unexpected behaviours happen all at once:

  1. The output is truncated after progress:
    E 1 / 1 (100%)No tests executed!
  2. The junit log file reports that the test passed
  3. The exit status is 0

@sebastianbergmann
Copy link
Owner

Please add an --XFAIL-- as long as this bug is not fixed. See a3549f1#diff-857aef1a9952bb4d15370bbdc6684ec245135671e8c077c84f527b4f86720f23R13 for an example.

@sebastianbergmann sebastianbergmann added type/bug Something is broken feature/test-runner CLI test runner version/10 Something affects PHPUnit 10 labels Feb 9, 2023
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #5188 (66a251b) into main (a6f61c5) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #5188   +/-   ##
=========================================
  Coverage     81.28%   81.28%           
  Complexity     5844     5844           
=========================================
  Files           629      629           
  Lines         18516    18516           
=========================================
  Hits          15051    15051           
  Misses         3465     3465           
Impacted Files Coverage Δ
src/Runner/Version.php 84.61% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sebastianbergmann sebastianbergmann merged commit eb21f06 into sebastianbergmann:main Feb 9, 2023
@sebastianbergmann
Copy link
Owner

Thank you! Do you plan on working on a fix?

@Slamdunk Slamdunk deleted the junit_logger_on_errors branch February 9, 2023 14:31
@Slamdunk
Copy link
Contributor Author

Slamdunk commented Feb 9, 2023

I am not, currently.

What worries me the most is the 0 exit code: silent errors produce the worst outcome.

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/bug Something is broken version/10 Something affects PHPUnit 10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants