A powerful VS Code extension for exploring, organizing, and executing PHP test collections with comprehensive Docker support.
- 📁 Collection Organization - Group your tests by folders (Unit, Feature, Integration...)
- 🎯 Granular Execution - Run individual tests, entire files, or complete collections
- 🔗 Direct Navigation - Click on any test to open the file at the exact line
- 🐳 Native Docker Support - Seamless execution in containers with automatic command transformation
- 📊 Visual Status - Icons for passed/failed/running tests with detailed error information
- 🔍 Error Details - Complete visualization of PHP failures and errors
- ⚡ Smart Cache - Optimized scanning with automatic updates
- 📋 Complete Logging - All commands tracked in dedicated Output tab
- �️ Terminal Management - Intelligent terminal reuse and cleanup
- Install: Download
php-test-collections-explorer-0.1.0.vsix - VS Code:
Ctrl+Shift+P→Extensions: Install from VSIX... - Open a PHP project with tests
- View: "PHP Test Collections" appears automatically in the Test tab
#Run in your terminal
chmod +x install.sh
./install.sh
🐳 Docker Integration Tests (5 files)
├── ✅ AuthTest.php (3 tests)
│ ├── ✅ testLogin 👈 Click to jump to test line
│ ├── ❌ testFailedLogin
│ └── ⚪ testLogout
└── ✅ DatabaseTest.php (2 tests)
📚 Unit Tests (8 files)
├── ✅ UserTest.php (4 tests)
└── ...
Quick Navigation: Click any test method to open the file and jump directly to the test's line!
{
"phpTestCollections.collections": [
{
"name": "Unit Tests",
"path": "tests/Unit",
"command": "vendor/bin/phpunit tests/Unit",
"useDocker": false
},
{
"name": "Docker Integration",
"path": "tests/Integration",
"command": "vendor/bin/phpunit tests/Integration",
"useDocker": true,
"dockerImage": "my-app"
}
],
"phpTestCollections.logLevel": "info"
}| Action | Result | Generated Command |
|---|---|---|
| 👆 Click test name | Opens file at test line | Direct navigation |
testLogin only |
--filter "UserTest::testLogin" |
|
| All tests in file | --filter "UserTest" |
|
| Entire test suite | Full command |
Automatic command transformation:
- Local:
vendor/bin/phpunit --filter "UserTest" tests/Unit/UserTest.php - Docker:
docker exec my-app vendor/bin/phpunit --filter "UserTest" tests/Unit/UserTest.php
| Icon | Status | Description |
|---|---|---|
| ✅ | Passed | Test successful |
| ❌ | Failed | Assertion failed |
| 💥 | Error | PHP error |
| 🔄 | Running | Executing |
| ⚪ | Unknown | Not tested |
{
"phpTestCollections.collections": [
{
"name": "Feature Tests",
"path": "tests/Feature",
"command": "vendor/bin/phpunit --testsuite=Feature"
},
{
"name": "Unit Tests",
"path": "tests/Unit",
"command": "vendor/bin/phpunit --testsuite=Unit"
}
]
}{
"name": "Tests Container",
"path": "tests",
"command": "vendor/bin/phpunit",
"useDocker": true,
"dockerImage": "my-project_app"
}{
"phpTestCollections.collections": [
{
"name": "Unit Tests",
"path": "tests/Unit",
"command": "vendor/bin/phpunit tests/Unit"
},
{
"name": "Integration Tests",
"path": "tests/Integration",
"command": "vendor/bin/phpunit tests/Integration"
}
]
}- Output Tab: "PHP Test Collections"
- Configurable Levels:
error|warn|info|debug - Real-time Filtering: Only relevant messages displayed
- Traced Commands with timestamps
- Detailed Docker errors
- 🔴 Error: Critical failures only
- 🟡 Warning: + Configuration issues
- 🔵 Info: + Test execution (default)
- 🟣 Debug: + Internal operations
Control the verbosity of extension output with configurable logging levels:
{
"phpTestCollections.logLevel": "info"
}| Level | Description | Output |
|---|---|---|
"error" |
Critical errors only | ❌ Fatal errors, crashes |
"warn" |
Errors + warnings | ❌ + |
"info" |
Standard output (default) | ❌ + |
"debug" |
Verbose development mode | ❌ + |
Examples:
- Production:
"error"- Only critical issues - Development:
"debug"- Full diagnostic information - CI/CD:
"warn"- Balanced output for automation - Default:
"info"- Perfect for daily usage
- Force refresh: 🔄 Button
- Change log level: VS Code Settings → "PHP Test Collections"
- View logs: Output → "PHP Test Collections"
# Clone the repo
git clone [your-repo]
cd Tests-vs-ext
# Install dependencies
npm install
# Compile
npm run compile
# Launch dev mode
F5 (Extension Development Host)
# Create package
vsce package
#Generate your own package
npx @vscode/vsce packageThe project includes automated CI/CD for seamless releases:
# Automatic release (uses CHANGELOG.md version)
./scripts/auto-release.sh
# Or specify version manually
./scripts/auto-release.sh 1.2.3What happens automatically:
- ✅ Validates Git repository state
- 📝 Updates
package.jsonversion - 🔨 Builds extension locally
- 🏷️ Creates Git tag
v1.2.3 - 📤 Pushes tag to GitHub
- 🤖 Triggers GitHub Actions CI/CD
- 🚀 Creates GitHub release with
.vsixfile
# Build package locally
./scripts/release.sh 1.2.3
# Then create and push tag
git tag v1.2.3 && git push origin v1.2.3- CI/CD Status: GitHub Actions
- Releases: GitHub Releases
For complete release documentation, see RELEASE-GUIDE.md.
✅ PHP Developers working with PHPUnit
✅ Laravel/Symfony projects with organized tests
✅ Docker environments for integration
✅ E2E testing with complex configurations
✅ Teams needing consistency in test execution
- 📋 Logs: Output → "PHP Test Collections"
- 🔍 Debugging: Check the usage guide
- 🐛 Issues: Create an issue
- 📁 types/: Centralized TypeScript interfaces
- 📝 LoggingService: Configurable logging system with 4 levels (113 lines)
- 💾 CacheService: JSON cache management (228 lines)
- 🚀 TestRunner: PHPUnit execution engine (492 lines)
- 🔍 TestParser: PHP parsing with dual detection (190 lines)
- 👁️ FileWatcher: Real-time file monitoring (202 lines)
- Code Reduction: 68% (1877 → 595 lines in main file)
- Bundle Size: 85.3 KiB (optimized)
- Cache System: Workspace-specific JSON persistence
- Compilation: Zero TypeScript errors
- VS Code ^1.105.0
- PHP project with PHPUnit tests
- Optional: Docker for containerized execution
🚀 Transform your PHP testing workflow with a powerful visual interface!