-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
PhpStorm/Teamcity + PhpUnit 7.4.1 - Error in setUpBeforeClass #3364
Comments
ping @SvetlanaZem |
@sebastianbergmann Thank you! |
@sebastianbergmann Why
After that we got unexpected inconsistent state when we run 0 tests, but no one register at least one skipped/error/assertion and after that unexpected behaviour about the icons come in. If |
Fixed sebastianbergmann#3364 Added comparison for failed asserts in setUpBeforeClass Changed printIgnoredTest to protected
Because of no further reaction I have created a pull request with a fix for this. As far as I can see the One way to fix this could be the change the Test interface and add a getName() method but because of my lack of knowledge of the phpunit code base I choose to just "improve" |
Checking for This has caused quite a few bugs and oversights for the test execution ordering. Some background in #3396. |
@epdenouden Just to confirm that I'm reading your comment correctly: You're confirming that the actual code is bugged and it's not enough and that checking against |
@SvetlanaZem @wbars I have time to look into this in depth and have created a branch with some first tests to isolate the issues. It seems there is more than one thing going on. Different scenarios give very different result outputs. Branch: https://github.com/epdenouden/phpunit/tree/issue-3364-teamcity-missing-error Default and TestDox result printer do show 🔬 Default printer example:
🔬TestDox example:
🔬TeamCity however doesn't show anything useful...
|
@sebastianbergmann @epdenouden Please refer my previous comment again about the source of the bug. Since still nobody shared the details behind introduced check and commit message does't do it either it's unclear for me why it should be kept and I still suggest simply remove the check or at least patch it with
|
@wbars Apologies I didn't make it clear in my reply, your investigation helped pinpointing the problem. I am not sure why the extra check for just In any case there needs to be an error emitted somehow about the failing fixtures. I'll look into this. |
@MaximilianKresse and @wbars thanks to both of you for your patience providing ongoing feedback and insight. Maximilian, eventhough your PR didn't get merged, it did provide a quick starting point for further investigation and helped me find the root cause. Thank you. I have proposed a fix for the underlying problem in #3428. Summary: when setup failed, the The TeamCity and other listeners and printers are going to get a nice rewrite for PHPUnit 8. Let me know if you have any other concerns. (preferably in a seperate ticket :) |
The new 'instanceof TestCase' check does indeed hide errors in setUpBeforeClass, but there is also a problem with counting the number of tests returned when counting the result.
@SvetlanaZem @wbars I am working on a POC for an update to the event+logger system of PHPUnit and want to use the TeamCity format as one of the main test cases, as it is async, notices changes in TestSuite and supports parallel testing. Can you help me get in touch with the proper contact at JetBrains? |
@epdenouden Please feel free to write an email for me: kirill.smelov at jetbrains dot com. |
Sample:
When I run this test in phpstorm i will just get "Empty test suite." with the success icon without any failed test. Full output:
There seems to be an critical error in the teamcity logger (src/Util/Log/TeamCity.php). You added some "if (!$test instanceof TestCase) {return;}" in the last version and this also seem to trigger this error (or rather don't trigger an error). When I change the addError method to the following everything works like expected:
I'm not sure whether this is everything to fully fix this bug. Propably the other added if-statements also have to be changed like this.
The text was updated successfully, but these errors were encountered: