Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Paratest Laravel Package

brianium/paratest

ParaTest runs PHPUnit tests in parallel with near zero setup. Use vendor/bin/paratest to split by TestCase or individual tests, speed up CI, and combine code coverage into one report. Provides TEST_TOKEN/UNIQUE_TEST_TOKEN for per-process isolation.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerate CI/CD Pipelines: Reduce test suite execution time by leveraging parallel processing, enabling faster feedback loops for developers and QA teams. Critical for scaling Laravel applications with large test suites (e.g., >1,000 tests).
  • Build vs. Buy: Buy—avoids reinventing parallel test execution for PHPUnit. Justifies cost savings vs. custom solutions (e.g., Kubernetes-based parallelism) for teams with moderate-to-high test volume.
  • Roadmap Prioritization: Aligns with initiatives to:
    • Improve developer productivity (e.g., "10x faster test runs").
    • Enhance reliability (e.g., isolated test execution reduces flaky test interference).
    • Support feature flags or canary deployments (parallel tests enable rapid A/B validation).
  • Use Cases:
    • Laravel Monorepos: Parallelize tests across microservices or modules.
    • Database-Intensive Tests: Use TEST_TOKEN to isolate test databases per process (e.g., Laravel migrations, Eloquent queries).
    • Coverage-Driven Development: Combine coverage reports from parallel runs for accurate metrics (e.g., pre-release audits).
    • PHPStorm Integration: Enable parallel testing in IDEs for local development (reduces wait times for php artisan test).

When to Consider This Package

Adopt ParaTest if:

  • Your Laravel/PHPUnit test suite exceeds 500 tests or runs >5 minutes sequentially.
  • Tests are independent (no shared static state, constants, or interdependent fixtures).
  • CI/CD bottlenecks are caused by test execution time, not environment setup (e.g., Docker, databases).
  • Your team uses PHPUnit 10+ and PHP 8.1+ (required for latest features).
  • You need zero-configuration parallelism (no custom scripts or orchestration).

Look Elsewhere if:

  • Tests rely on shared static state (e.g., singletons, global variables) or constants (ParaTest’s limitations).
  • Your environment lacks sufficient CPU cores (parallelism gains diminish with <4 cores).
  • You require advanced sharding (e.g., by test priority or custom logic)—consider custom scripts or PestPHP’s parallel plugins.
  • Your team uses legacy PHPUnit versions (<9.x) or non-standard test runners.
  • Tests involve external resources with strict concurrency limits (e.g., rate-limited APIs).

How to Pitch It (Stakeholders)

For Executives:

"ParaTest cuts Laravel test suite execution time by 70%+ with zero engineering overhead. For a team running 2,000 tests in 15 minutes, this reduces CI wait times to 4 minutes, accelerating releases and developer velocity. The MIT-licensed package integrates seamlessly with PHPUnit—no new tools or training required. Early adopters (e.g., HypeMC) report 3x faster feedback loops, directly impacting our sprint cadence."

ROI Highlights:

  • Dev Productivity: Engineers spend less time waiting for tests (aligns with "move fast" culture).
  • Cost Savings: Reduces CI minutes (e.g., GitHub Actions/GitLab CI costs drop by ~50%).
  • Scalability: Supports growth without linear increases in test execution time.

For Engineering Teams:

*"ParaTest parallelizes PHPUnit tests out-of-the-box—just replace php artisan test with vendor/bin/paratest. Key benefits for Laravel devs:

  • Isolated Test Execution: Use TEST_TOKEN to spin up unique databases per process (e.g., testdb_{token}), eliminating flaky tests from shared state.
  • Coverage Reports: Combine results from parallel runs for accurate metrics (critical for pre-release audits).
  • IDE Support: Works with PHPStorm’s test runner (no CLI context-switching).
  • Flexible Sharding: Distribute tests by TestCase (default) or individual tests (--functional), or use round-robin/random for balanced load.

Trade-offs:

  • Avoid static variables/constants in tests (use dependency injection or service containers instead).
  • Requires PHPUnit 10+ (but worth upgrading for other benefits like attributes).

Quick Start:

composer require --dev brianium/paratest
./vendor/bin/paratest  # Parallel by TestCase
./vendor/bin/paratest --functional  # Parallel by individual test

For CI/CD: Add to your pipeline:

# GitHub Actions example
- run: ./vendor/bin/paratest --max-processes=4 --coverage-clover=coverage.clover
```"*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4