Not evaluating test results when running pest in parallel

Open
#415 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php, typescript, vscode

Research direction

Start by reproducing the VS Code test run with and without the --parallel argument using the provided command and output. Trace how the extension handles the testStarted and testFinished events whose locationHint points to Pest's TestCaseFactory.php(175) : eval()'d code. Done means parallel Pest runs produce located, non-skipped results in the Test Explorer.

Written by the indexing model from the issue text.

Description

bug
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
Dominant language
TypeScript
Stars
169
Forks
72
Avg merge
8m
Merged PRs (30d)
184

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from recca0120/vscode-phpunit

All issues in recca0120/vscode-phpunit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.