{"id":46160834,"url":"https://github.com/giorgi-leladze/php-test-processor","last_synced_at":"2026-03-11T15:01:27.901Z","repository":{"id":337342574,"uuid":"1151404049","full_name":"giorgi-leladze/php-test-processor","owner":"giorgi-leladze","description":"Parallel PHP test processor optimized for faster and more efficient test execution.","archived":false,"fork":false,"pushed_at":"2026-02-26T13:31:00.000Z","size":133,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-26T17:42:32.423Z","etag":null,"topics":["laravel","parallel-testing","php","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giorgi-leladze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-06T12:28:01.000Z","updated_at":"2026-02-26T13:30:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/giorgi-leladze/php-test-processor","commit_stats":null,"previous_names":["giorgi-leladze/php-test-processor"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/giorgi-leladze/php-test-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgi-leladze%2Fphp-test-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgi-leladze%2Fphp-test-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgi-leladze%2Fphp-test-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgi-leladze%2Fphp-test-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giorgi-leladze","download_url":"https://codeload.github.com/giorgi-leladze/php-test-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giorgi-leladze%2Fphp-test-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29999216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","parallel-testing","php","testing"],"created_at":"2026-03-02T11:00:50.714Z","updated_at":"2026-03-02T11:00:58.002Z","avatar_url":"https://github.com/giorgi-leladze.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Test Processor (PTP)\n\n## **PTP - So your tests fail faster! 🚀** *(or succeed more optimally, we don't judge)*\n\nA high-performance parallel test processor for PHPUnit tests written in Go. Execute PHP unit and integration tests in parallel to significantly reduce test execution time. Because waiting for tests is so 2023.\n\n## 🚀 Features\n\n- **Parallel Execution**: Run multiple PHPUnit tests simultaneously across multiple workers\n- **Test Discovery**: Automatically discover test files in your project\n- **Flexible Filtering**: Filter tests by name patterns with wildcard support\n- **Interactive Error Viewer**: Beautiful TUI for viewing and managing test failures\n- **Database Migrations**: Run migrations in parallel for all test databases\n- **Real-time Progress**: See test execution progress with progress bars\n- **Colorized Output**: Beautiful terminal output with colors\n- **Test Case Listing**: List all test files and their test cases in a tree view\n- **Single Binary**: No dependencies, just one executable\n\n## 📋 Requirements\n\n- **Go**: 1.22 or higher (for building from source)\n- **PHP**: 7.4 or higher\n- **PHPUnit**: Installed in your PHP project (`vendor/bin/phpunit`)\n- **Laravel**: Project should use Laravel framework (for migrations support)\n\n## 🔧 Installation\n\n### Option 1: Download Pre-built Binary (Recommended)\n\n**Linux (64-bit):**\n```bash\ncurl -sL https://github.com/giorgi-leladze/php-test-processor/releases/latest/download/ptp-linux-amd64.tar.gz | tar -xz \u0026\u0026 sudo mv ptp-linux-amd64 /usr/local/bin/ptp \u0026\u0026 chmod +x /usr/local/bin/ptp\n\n```\n\n**macOS Intel:**\n```bash\ncurl -sL https://github.com/giorgi-leladze/php-test-processor/releases/latest/download/ptp-darwin-amd64.tar.gz | tar -xz \u0026\u0026 sudo mv ptp-darwin-amd64 /usr/local/bin/ptp \u0026\u0026 chmod +x /usr/local/bin/ptp\n```\n\n**macOS Apple Silicon (M1/M2/M3/M4):**\n```bash\ncurl -sL https://github.com/giorgi-leladze/php-test-processor/releases/latest/download/ptp-darwin-arm64.tar.gz | tar -xz \u0026\u0026 sudo mv ptp-darwin-arm64 /opt/homebrew/bin/ptp \u0026\u0026 chmod +x /opt/homebrew/bin/ptp\n```\n\nOr visit the [Releases](https://github.com/giorgi-leladze/php-test-processor/releases) page to download manually.\n\n### Option 2: Build from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/giorgi-leladze/php-test-processor.git\ncd php-test-processor\n\n# Build the binary\ngo build -o ptp .\n\n# Make it executable (Linux/macOS)\nchmod +x ptp\n\n# Move to a directory in your PATH (optional)\nsudo mv ptp /usr/local/bin/\n```\n\n### Option 4: Install via Go Install\n\n```bash\ngo install github.com/giorgi-leladze/php-test-processor@latest\n```\n\nThis will install the `ptp` binary to `$GOPATH/bin` (or `$HOME/go/bin` if `GOPATH` is not set).\n\n## ⚙️ Configuration\n\nPTP uses sensible defaults and doesn't require any configuration file. The following directories are automatically ignored when searching for test files:\n\n- `vendor`\n- `node_modules`\n- `public`\n- `storage`\n- `bootstrap`\n- `config`\n- `database`\n- `resources`\n- `routes`\n\nYou can override the default number of processors (4) using the `--processors` flag.\n\n## 📖 Usage\n\n### Run Tests\n\n```bash\n# Run all tests with default settings\nptp run\n\n# Run with custom number of processors\nptp run --processors 8\n\n# Run tests from a specific directory\nptp run --test-path tests/Unit\n\n# Filter tests by name pattern\nptp run --filter \"*UserTest.php\"\nptp run --filter \"*Payment*\"\n\n# Run migrations before tests\nptp run --migrate\n\n# Run migrations without fresh (only pending migrations)\nptp run --migrate --no-fresh\n\n# Combine options\nptp run --test-path tests/Integration --filter \"*Payment*\" --processors 8\n```\n\n### List Tests\n\n```bash\n# List all test files\nptp list\n\n# List tests with test cases (tree view)\nptp list --test-cases\n\n# Filter tests when listing\nptp list --filter \"*UserTest.php\"\n\n# List tests from specific directory\nptp list --test-path tests/Unit --test-cases\n```\n\n### Run Migrations\n\n```bash\n# Run migrations for all test databases\nptp migrate\n\n# Run with custom number of workers\nptp migrate --processors 8\n\n# Run without fresh (only pending migrations)\nptp migrate --no-fresh\n```\n\n### View Test Failures\n\n```bash\n# Open interactive error viewer\nptp faills\n\n# Navigate with arrow keys, mark tests as resolved with 'R', view details with right arrow\n```\n\n## 🔍 How It Works\n\n1. **Test Discovery**: Scans your project directory for `*Test.php` files (recursively from the specified path)\n2. **Filtering**: Applies name filters if provided (supports wildcard patterns)\n3. **Worker Pool**: Creates multiple worker processes (one per processor)\n4. **Parallel Execution**: Each worker runs PHPUnit tests in isolated environments with separate databases\n5. **Result Aggregation**: Collects and parses results from all workers\n6. **Output**: Displays formatted results and saves to JSON for later viewing\n\n## 🗄️ Database Setup\n\nPTP automatically creates separate test databases for each worker:\n- `testing_1`, `testing_2`, etc.\n\nEach worker uses its own database to avoid conflicts during parallel execution.\n\n## 📊 Output\n\nTest results are saved to `storage/test-results.json` for later viewing with `ptp faills`.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- Built with [Cobra](https://github.com/spf13/cobra) for CLI\n- Uses [tview](https://github.com/rivo/tview) for the interactive TUI\n- Uses [color](https://github.com/fatih/color) for terminal colors\n- Uses [phpunit](https://github.com/sebastianbergmann/phpunit) for test execution\n\n\n## 📞 Support\n\nIf you encounter any issues or have questions, please open an issue on GitHub.\n\n---\n\n**Note**: This project is actively maintained. For detailed architecture information, see [ARCHITECTURE.md](./ARCHITECTURE.md).\n# php-test-processor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiorgi-leladze%2Fphp-test-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiorgi-leladze%2Fphp-test-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiorgi-leladze%2Fphp-test-processor/lists"}