Impossible to run individual test
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker, php, typescript
- Domain
- devtools, testing-qa
Research direction
Reproduce the issue with the Docker command and phpunit.paths configuration shown, then trace the individual “Run test” invocation and its ${phpunitargs} path through the extension. Compare the host path in the PHPUnit log with the configured /project mapping. Done means an individual test runs in the container without PHPUnit reporting the host path as missing.
Written by the indexing model from the issue text.
Description
What happened?
When I run the tests from docker (the containers are running), I could not run tests individually from the IDE.
The issue is coming from the fact that the extension, when running in a docker environment, do not apply the path mapping to the file tested which is inside the container, instead he keeps the absolute path of the host.
Steps to reproduce
- Open or create a PHP project
- Set up dockers config as well as the extension config (see below)
- Run all test from the side panel
- Try to run one test (inside a test file), right click, "Run test"
- Observe the error.
P.S I have anonymized the output channel log
Extension settings
{
"phpunit.config": "project/phpunit.xml.dist",
"phpunit.php": "php",
"phpunit.phpunit": "vendor/bin/phpunit",
"phpunit.command": "docker compose -f docker-compose-test.yml exec -t php-e2e sh -c \"while ! curl -s http://localhost:80/healthz >/dev/null; do sleep 1; done; php vendor/bin/phpunit ${phpunitargs}\"",
// bugged! wait until the fix https://github.com/recca0120/vscode-phpunit/issues/416
// "phpunit.command": "docker compose -f docker-compose-test.yml up -d php-e2e 2>/dev/null; docker compose -f docker-compose-test.yml exec -t php-e2e sh -c \"while ! curl -s http://localhost:80/healthz >/dev/null; do sleep 1; done; php vendor/bin/phpunit ${phpunitargs}\"",
"phpunit.debuggerConfig": "Listen for Xdebug",
"phpunit.paths": {
"${workspaceFolder}/project": "/project"
}
}
Output channel log
❌ PHPUnit 12.5.21 by Sebastian Bergmann and contributors.
Test file "/home/<my user>/Documents/projets/<a folder>/<a folder>/project/tests/Controller/AccountControllerTest.php" not found
Environment
-
OS: Debian Trixie
-
VS Code version (vscodium):
Version: 1.116.02821
Commit: 221e0a382c0be3a673a4e4cab0601344a0b3de3a
Date: 2026-04-15T00:28:13Z
Electron: 39.8.7
ElectronBuildId: undefined
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
- Extension version: [3.9.38] - 2026-04-02
- PHP version: 8.4
- PHPUnit / Pest version: 12
- Run environment: Docker
Project structure (if relevant)
project/
|src
|tests
|phpunit.xml.dist
docker-compose-test.yml
- Dominant language
- TypeScript
- Stars
- 169
- Forks
- 72
- Avg merge
- 8m
- Merged PRs (30d)
- 184
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from recca0120/vscode-phpunit
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
recca0120/vscode-phpunit#620 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
recca0120/vscode-phpunit#430 ·
Maintainers usually reply within 1 day
-
Suite header shows green "PASS" badge at start, never updates to "FAIL" when the whole file failsOpen
Difficulty 3/5 1-2 days Newbie friendliness 68/100
recca0120/vscode-phpunit#420 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 62/100
recca0120/vscode-phpunit#416 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
recca0120/vscode-phpunit#415 · 2 comments ·
Maintainers usually reply within 1 day
All issues in recca0120/vscode-phpunit
Similar issues
-
Media browser returns "Not found" for repositories using the SHA-256 object formatPossibly taken @adamchodera claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Follow-ups from #312Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
janhesters/remixcn#318 ·
Maintainers usually reply within 1 day
-
Interceptor LaunchTestProfile.sh: no Windows (Git Bash/MSYS) branch, test profile never launchesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
danielmiessler/LifeOS#3150 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Make the "%" unit spacing the same in the web and in A10Possibly taken @kragent66-glitch claimed this today. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 comment ·