Closed sertxudev closed 7 months ago
it happened to me too, had to downgrade to 7.3.1
I am unable to reproduce this in ParaTest, maybe there's some layer in Laravel that's unrelated to ParaTest.
Can you create a dedicated repo that reproduces the issue?
Sure! Here you are https://github.com/sertxudev/paratest-bug
It's a Laravel fresh installation, I've only changed the database from MySQL to SQLite. Running the default tests fails.
Z:\Website_Developments\home\laravel\data>vendor\bin\paratest --testdox
ParaTest v7.4.0 upon PHPUnit 10.5.10 by Sebastian Bergmann and contributors.
Processes: 6
Runtime: PHP 8.2.3
Configuration: Z:\Website_Developments\home\laravel\data\phpunit.xml
In WorkerCrashedException.php line 41:
The test "PARATEST="1" TEST_TOKEN="1" UNIQUE_TEST_TOKEN="1_65c212950b915" tests\Unit\ExampleTest.php" failed.
Exit Code: 255(Unknown error)
Working directory: Z:\Website_Developments\home\laravel\data
Output:
================
Fatal error: Uncaught AssertionError: assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']))
in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php:46
Stack trace:
#0 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(46): assert(false, 'a
ssert(isset($g...')
#1 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(79): {closure}()
#2 {main}
thrown in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php on line 46
Error Output:
================
PHP Fatal error: Uncaught AssertionError: assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv
'])) in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php:46
Stack trace:
#0 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(46): assert(false, 'a
ssert(isset($g...')
#1 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(79): {closure}()
#2 {main}
thrown in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php on line 46
Z:\Website_Developments\home\laravel\data>php artisan test --parallel --testdox
ParaTest v7.4.0 upon PHPUnit 10.5.10 by Sebastian Bergmann and contributors.
Processes: 6
Runtime: PHP 8.2.3
Configuration: Z:\Website_Developments\home\laravel\data\phpunit.xml
In WorkerCrashedException.php line 41:
The test "PARATEST="1" TEST_TOKEN="1" UNIQUE_TEST_TOKEN="1_65c2130ac243c" tests\Unit\ExampleTest.php" failed.
Exit Code: 255(Unknown error)
Working directory: Z:\Website_Developments\home\laravel\data
Output:
================
Fatal error: Uncaught AssertionError: assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv'])) in Z:\Website_Developments\home\laravel\d
ata\vendor\brianium\paratest\bin\phpunit-wrapper.php:46
Stack trace:
#0 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(46): assert(false, 'assert(isset($g...')
#1 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(79): {closure}()
#2 {main}
thrown in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php on line 46
Error Output:
================
PHP Fatal error: Uncaught AssertionError: assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv'])) in Z:\Website_Developments\home\lara
vel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php:46
Stack trace:
#0 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(46): assert(false, 'assert(isset($g...')
#1 Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php(79): {closure}()
#2 {main}
thrown in Z:\Website_Developments\home\laravel\data\vendor\brianium\paratest\bin\phpunit-wrapper.php on line 46
[!NOTE] Downgrading to v7.3.1 works with both commands
Z:\Website_Developments\home\laravel\data>vendor\bin\paratest --testdox
ParaTest v7.3.1 upon PHPUnit 10.5.10 by Sebastian Bergmann and contributors.
Processes: 6
Runtime: PHP 8.2.3
Configuration: Z:\Website_Developments\home\laravel\data\phpunit.xml
.. 2 / 2 (100%)
Time: 00:00.598, Memory: 10.00 MB
Example (Tests\Unit\Example)
ā That true is true
Example (Tests\Feature\Example)
ā The application returns a successful response
OK (2 tests, 2 assertions)
Z:\Website_Developments\home\laravel\data>php artisan test --parallel --testdox
ParaTest v7.3.1 upon PHPUnit 10.5.10 by Sebastian Bergmann and contributors.
Processes: 6
Runtime: PHP 8.2.3
Configuration: Z:\Website_Developments\home\laravel\data\phpunit.xml
.. 2 / 2 (100%)
Time: 00:00.766, Memory: 22.00 MB
Example (Tests\Unit\Example)
ā That true is true
Example (Tests\Feature\Example)
ā The application returns a successful response
OK (2 tests, 2 assertions)
Summary
Hi, good evening,
There's a bug with the new v7.4.0, if I downgrade to v7.3.1 it works as expected. It seems the bug is related to the option
--testdox
at v7.4.0, if I remove that parameter works as expected.Feel free to ask if you want me to test anything. š
Thanks!
Current behavior
ParaTest v7.4.0 with --testdox (Laravel Artisan)
ParaTest v7.4.0 with --testdox (Paratest binary)
How to reproduce: command, code and error stack trace
I'm using the following command:
Expected behavior
ParaTest v7.3.1 with --testdox (Laravel Artisan)
ParaTest v7.4.0 without --testdox (Laravel Artisan)