pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.63k stars 357 forks source link

Output when run via PHPStorm looks like phpunit, not pest #198

Closed Synchro closed 3 years ago

Synchro commented 4 years ago

I originally assumed that this issue was in pest-intellij and reported it here, but @olivernybroe tells me it's not, so reposting it here.

I have set up a pest test running as per the docs, and when it runs inside PHPStorm it looks like "regular" phpunit:

image

But when I run it on a command line it produces pretty pest output:

image

I assume the difference is in the --teamcity output option, but can I get the pretty pest output in PHPStorm? Or is the teamcity format output needed to provide source links?

I also noticed that when phpunit is run via pest, it reports zero assertions – I don't know if that's a symptom of the same problem or a separate thing.

owenvoke commented 4 years ago

Check out issue https://github.com/pestphp/pest/issues/188 regarding adding Collision output to the TeamCity adapter. 👍🏻 Hopefully we're able to get this working soon (although I have no idea what's involved). 🤔

That zero assertions issue seems odd though...

olivernybroe commented 4 years ago

Thanks for posting it here 👍

So the TeamCity printer has a printResult method. This one has to be updated to use the same logic pest uses for it's printer.

@owenvoke The collision output is also related to this printer, however I think solving this one is much easier.

olivernybroe commented 4 years ago

I guess we don't have to solve the zero assertion issue if we change the output to the same as pest is using, as pest don't show the amount of assertions 🤣

nunomaduro commented 3 years ago

@olivernybroe Now that TeamPrinter is merged - does it solve this issue?

olivernybroe commented 3 years ago

Unfortunately not. We only added the printer, we did not change to output so it looks like the normal pest output.

As mentioned earlier, we have to update the printResult method, so the output is the same as in normal run with pest.

dcblogdev commented 3 years ago

I'm also getting PHPUnit output when running PEST

The test: image

The Output in storm: image

In CLI works perfectly: image

olivernybroe commented 3 years ago

@dcblogdev Yeah, so this one is still waiting for someone to take on the task and actually change the output to pest looking output when using the TeamCity printer.

nunomaduro commented 3 years ago

@olivernybroe Is this fixed?

olivernybroe commented 3 years ago

@nunomaduro nope, it still hasn't been done.

The biggest reason why I don't work on this myself if because it's not really a problem for me, I don't read the console output phpstorm to see the amount of tests, as that is available in phpstorms interface