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.48k stars 343 forks source link

[Bug]: Pest crashes when trying to output JUnit #1070

Closed calebdw closed 8 months ago

calebdw commented 8 months ago

What Happened

Hello!

Please see related comment: https://github.com/pestphp/pest/pull/887#issuecomment-1906685934, creating an issue so thread doesn't get lost.

After updating to Pest v2.32.0 or higher my ci pipeline is failing with:

In WorkerCrashedException.php line 41:

  The test "PARATEST='1' TEST_TOKEN='1' UNIQUE_TEST_TOKEN='1_65afff3fbe543' t  
  ests/Architecture/AbstractModelFactoryRuleTest.php" failed.                  

  Exit Code: 255(Unknown error)                                                

  Output:                                                                      
  ================                                                             

     ERROR  Fatal error: Uncaught SebastianBergmann\CliParser\    
  RequiredOptionArgumentMissingException: Required argument for option "--log  
  -junit" is missing in /builds/web-developers/eaglesys/vendor/sebastian/cli-  
  parser/src/Parser.php:189

I'm running the tests with:

 vendor/bin/pest -p --processes=8 --log-junit=pest.xml

note that I've tried both --log-junit pest.xml and --log-junit=pest.xml with the same failure.

Rolling Pest back to v2.31.0 allows my tests to run again

Thanks!

How to Reproduce

 vendor/bin/pest -p --processes=8 --log-junit=pest.xml

Sample Repository

No response

Pest Version

2.32.0

PHP Version

8.2

Operation System

Linux

Notes

No response

pimjansen commented 8 months ago

Same here! Happened since last update:

[pestphp/pest](https://github.com/pestphp/pest) require-dev minor   2.31.0 -> 2.32.2
Prophe1 commented 8 months ago

Same here!

nuernbergerA commented 8 months ago

I can confirm that the latest changes made with https://github.com/pestphp/pest/commit/b9d2be87a28b218fd13d52df1c0d6c72d58cf191 have broken junit logging with paratest

nunomaduro commented 8 months ago

@nuernbergerA Can you check what exactly is broken please?

nuernbergerA commented 8 months ago

@nunomaduro im already on it

first things i can say:

current state: