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
JUnit logger reports warnings as failures #3793
Comments
Your example is missing the PHPUnit XML configuration file you use. |
Hey, thanks for looking. I'm not using an XML config file for this example project - I'm just running the |
Hi @celeryclub, see #3832. You can test it with the following patch: This should properly add the warnings attribute. |
"JUnit output in PHPUnit 8.3.4 is incorrect" suggests that previous versions of PHPUnit behaved differently. I do not think that this is the case. I wonder whether it would make sense to introduce a configuration setting for the JUnit logfile writer that controls whether or not warnings are logged. If they are, they should -- IMO -- be logged as errors. And, of course, this touches upon #3162. |
The correct/incorrect depends on who you ask. A toggle would be nice and have the current version of PHPUnit stick to the existing behaviour. |
What @epdenouden says does not sound wrong :) |
Hey, sorry for the delay. I was off the grid for a bit. I apologize if the title was misleading - I only meant that I had identified this behavior in 8.4.3. I think you're probably correct that it's been around for a while. @DanielRuf I tried your patch - it does behave the way I'd expect. Thanks for that! @epdenouden I suppose however you look at it, it would be safer to not introduce a breaking change. If we were to add a toggle, do you imagine that being something that would go into phpunit.xml? |
…to not break jenkins testing for now Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
Hello there. I looks like JUnit output in PHPUnit 8.3.4 is incorrect. My test suite generates 1 warning (
@expectedException
deprecation) and all tests pass, but in the JUnit output it shows 1 failure.Here is a minimal example reproducing the behavior: https://gist.github.com/celeryclub/389ac4d5089255730014d44b236a046e.
Thanks for looking and please let me know if any additional information would be helpful.
"composer info | sort" output:
The text was updated successfully, but these errors were encountered: