Skip to content

Not evaluating test results when running pest in parallel #415

Description

@AJDurant

What happened?

Seems related to #402 and #408

When I add --parallel to my test run (to speed it up) I no longer get test results showing in the test explorer.

In my example output I've run it with a filtered set of tests for brevity, but the same behaviour shows for the full suite.

The results show as expected without --parallel, it seems it's the vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code causing issues.

Steps to reproduce

  1. Using Pest v4 run tests in VS Code, and get results shown
  2. Add --parallel arg to extension settings
  3. Test results now shown as skipped

Extension settings

"phpunit.command": "docker compose exec -it -e XDEBUG_TRIGGER=VSCODE -u sail laravel.test ${php} ${phpargs} ${phpunit} ${phpunitargs}",
    "phpunit.phpunit": "artisan test",
    "phpunit.args": [
        "--parallel"
    ],
    "phpunit.paths": {
        "${workspaceFolder}": "/var/www/html"
    },
    "phpunit.debuggerConfig": "Listen for Xdebug",

Output channel log

docker compose exec -it -e XDEBUG_TRIGGER=VSCODE -u sail laravel.test php -dxdebug.mode=coverage artisan test --parallel --filter=/^(Tests\\Feature\\Auth.*)(( with (data set )?.*)?)?$/ --colors=always --teamcity --coverage-clover /var/www/html/.phpunit.cache/coverage-ba56033f-0.xml
[Queue]
  tests/Feature/Auth/RegistrationTest.php::new users can register
  tests/Feature/Auth/PasswordConfirmationTest.php::confirm password screen can be rendered
  tests/Feature/Auth/PasswordConfirmationTest.php::password can be confirmed
  tests/Feature/Auth/PasswordConfirmationTest.php::password is not confirmed with invalid password
  tests/Feature/Auth/PasswordResetTest.php::reset password link screen can be rendered
  tests/Feature/Auth/PasswordResetTest.php::reset password link can be requested
  tests/Feature/Auth/PasswordResetTest.php::reset password screen can be rendered
  tests/Feature/Auth/PasswordResetTest.php::password can be reset with valid token
  tests/Feature/Auth/AuthenticationTest.php::login screen can be rendered
  tests/Feature/Auth/AuthenticationTest.php::users can authenticate using the login screen
  tests/Feature/Auth/AuthenticationTest.php::users can not authenticate with invalid password
[testStarted] __pest_evaluable_new_users_can_register
  id           : Registration (P\Tests\Feature\Auth\Registration)::Pest evaluable new users can register
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\RegistrationTest::__pest_evaluable_new_users_can_register
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_new_users_can_register
  id           : Registration (P\Tests\Feature\Auth\Registration)::Pest evaluable new users can register
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\RegistrationTest::__pest_evaluable_new_users_can_register
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_login_screen_can_be_rendered
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable login screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_login_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_login_screen_can_be_rendered
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable login screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_login_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_users_can_authenticate_using_the_login_screen
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable users can authenticate using the login screen
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_users_can_authenticate_using_the_login_screen
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_users_can_authenticate_using_the_login_screen
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable users can authenticate using the login screen
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_users_can_authenticate_using_the_login_screen
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_users_can_not_authenticate_with_invalid_password
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable users can not authenticate with invalid password
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_users_can_not_authenticate_with_invalid_password
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_users_can_not_authenticate_with_invalid_password
  id           : Authentication (P\Tests\Feature\Auth\Authentication)::Pest evaluable users can not authenticate with invalid password
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\AuthenticationTest::__pest_evaluable_users_can_not_authenticate_with_invalid_password
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_confirm_password_screen_can_be_rendered
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable confirm password screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_confirm_password_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_confirm_password_screen_can_be_rendered
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable confirm password screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_confirm_password_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_password_can_be_confirmed
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable password can be confirmed
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_password_can_be_confirmed
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_password_can_be_confirmed
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable password can be confirmed
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_password_can_be_confirmed
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_password_is_not_confirmed_with_invalid_password
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable password is not confirmed with invalid password
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_password_is_not_confirmed_with_invalid_password
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_password_is_not_confirmed_with_invalid_password
  id           : Password Confirmation (P\Tests\Feature\Auth\PasswordConfirmation)::Pest evaluable password is not confirmed with invalid password
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordConfirmationTest::__pest_evaluable_password_is_not_confirmed_with_invalid_password
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_reset_password_link_screen_can_be_rendered
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password link screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_link_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_reset_password_link_screen_can_be_rendered
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password link screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_link_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_reset_password_link_can_be_requested
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password link can be requested
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_link_can_be_requested
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_reset_password_link_can_be_requested
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password link can be requested
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_link_can_be_requested
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_reset_password_screen_can_be_rendered
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_reset_password_screen_can_be_rendered
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable reset password screen can be rendered
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_reset_password_screen_can_be_rendered
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testStarted] __pest_evaluable_password_can_be_reset_with_valid_token
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable password can be reset with valid token
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_password_can_be_reset_with_valid_token
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found
[testFinished] __pest_evaluable_password_can_be_reset_with_valid_token
  id           : Password Reset (P\Tests\Feature\Auth\PasswordReset)::Pest evaluable password can be reset with valid token
  locationHint : php_qn:///home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code::\P\Tests\Feature\Auth\PasswordResetTest::__pest_evaluable_password_can_be_reset_with_valid_token
  file         : /home/adurant/git/php-project/vendor/pestphp/pest/src/Factories/TestCaseFactory.php(175) : eval()'d code
  find()       : ✗ not found

Environment

  • OS: Linux
  • VS Code version: 1.119.0
  • Extension version: 3.9.38
  • PHP version: 8.4
  • PHPUnit / Pest version: Pest v4.6.3
  • Run environment: Laravel Sail

Project structure (if relevant)

project/
├── phpunit.xml
├── app/
└── tests/
    ├── Unit/
    │   └── ExampleTest.php
    ├── Feature/
    │   ├── Auth/
    │   │   ├── AuthenticationTest.php
    │   └── ExampleTest.php
    ├── Helpers.php
    ├── Pest.php
    └── TestCase.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions