-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
Teamcity styling #350
Teamcity styling #350
Conversation
Looks really great! It's not possible for us to share the output with the normal console so we don't have to maintain the output in two places? |
Hadn't really thought about that but will look at the possibility of unifying the two 👍 |
@olivernybroe we now defer to Collision's adapter for output. However, there seems to be a little issue with test failures showing the error output: I imagine this is to do with test listeners and the output helpers. Any ideas? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I think the code looks great and really nice cleanup. I haven't tested it out locally yet, hopefully I get time to do that soon or someone else does it 👍
{ | ||
parent::__construct(null, $verbose, $colors, false, 80, false); | ||
$this->phpunitTeamCity = new \PHPUnit\Util\Log\TeamCity( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be a bit blind, but what replaced the part which did this? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically nothing. We're firing all of the events that team city were firing manually, and now that we don't share their output at all, it became redundant. Can you see an issue with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone through and manually implemented some of the events. We have to do it manually so as not to give PHPStorm too much information (because then it writes to the console) but just enough to get it to display the correct icon. If we decorate the base TeamCity
logger it writes out too much to the console.
@nunomaduro @olivernybroe I'm pretty happy with this PR now. Could do with somebody who has PhpStorm seeing if I've missed anything. The only quirk is on skipped tests: In order to get the skip indicators in PhpStorm, it has to output the "Test ignored." text. I can get it to go to the bottom using |
Hey @lukeraymonddowning, there is unfortunately something wrong 😢 When I have a failing test, it does not report the error message of it as part of the specific test case. It also looks like the print of the status from the file is getting outputted the wrong place. Another issue found. When using the goto feature (pressing the file) it does not work on phpunit files anymore. This is because it now uses the So after looking further into what the results showing in the wrong grouping is about, it seems like all the output from the collision printer is not being wrapped in
This contains a I hope this feedback helps, sorry for the wall of text |
Thanks @olivernybroe! That's super helpful. Do you know how we could support the full teamcity events without having it print to the console? |
@lukeraymonddowning not completely no 🙁 We might be able to do a wrapper around the out object given to collision, so we can get the output from it and wrap it in a team city format? 🤔 |
@lukeraymonddowning @olivernybroe Once this is ready, fell free to merge and release. |
2fa9a58
to
d10281f
Compare
# Conflicts: # tests/.snapshots/success.txt
@olivernybroe I've just gone and refactored all of the work here to clean it up nicely. Ready for another review whenever you get chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am done testing this out now and it works really well! Amazingly done ❤️
This PR aims to add Pest styling to the PhpStorm
TeamCity
Logger. Here are some output examples: