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

Filter Laravel Package

testo/filter

Testo filtering plugin that selects which tests run by name patterns, file paths, suites, types, and dataset pointers. Powers Testo CLI flags: --filter, --path, --suite, and --type.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • CI/CD Optimization: Enables selective test execution (e.g., --filter, --path) to reduce CI runtime by targeting specific test suites (e.g., integration vs. unit) or recently modified tests, directly addressing slow feedback loops in Laravel’s test suite.
  • Developer Productivity: Accelerates debugging by isolating test failures (e.g., --suite "Auth" or --type "feature") without manual grep or custom scripts, aligning with Laravel’s focus on rapid iteration.
  • Roadmap for Custom Testing: Justifies investment in Testo as an alternative to PHPUnit/Pest if Laravel’s default test runner lacks granularity (e.g., dataset filtering or parallel execution by suite).
  • Build vs. Buy: Avoids reinventing filtering logic for custom test runners (e.g., Laravel’s TestCase extensions) by leveraging a batteries-included solution, though integration effort is high.
  • Use Cases:
    • Parallel CI: Split Laravel’s test suite by --suite for distributed execution (e.g., GitHub Actions matrix).
    • Regression Testing: Run only tests affected by recent Git changes (e.g., --path "tests/Feature/User").
    • Dataset Isolation: Filter tests by dataset pointers (e.g., --dataset "users:premium") for data-driven Laravel apps.

When to Consider This Package

  • Adopt if:

    • Your Laravel project already uses Testo (or is migrating from it) and needs native filtering without CLI workarounds.
    • You’re building a custom test framework in Laravel and want to reuse Testo’s filtering logic (MIT-licensed).
    • CI costs are prohibitive due to slow test suites (>5,000 tests), and PHPUnit/Pest’s filtering is insufficient (e.g., no dataset support).
    • Your team prioritizes CLI-driven workflows (e.g., artisan testo:run --filter=PaymentTest) over IDE integrations.
  • Look elsewhere if:

    • You’re locked into PHPUnit/Pest (use their native --filter or plugins like phpunit-filter).
    • Your filtering needs are basic (e.g., --filter "TestClass"), and Laravel’s phpunit.xml or Pest’s --filter suffice.
    • You require IDE integration (e.g., VS Code test adapters) or dynamic filtering (e.g., based on Git diffs)—this package is CLI-only.
    • Your team lacks Testo expertise; the package assumes familiarity with Testo’s ecosystem and CLI syntax.

How to Pitch It (Stakeholders)

For Executives:

"This package lets our Laravel team run only the tests they need, cutting CI runtime by up to 70% for large suites. For example, instead of waiting 15 minutes for a full test run, a developer can execute just the AuthTest suite in 2 minutes using --suite Auth. In CI, we could split tests across parallel jobs to reduce costs by 50% while maintaining coverage. It’s a low-code way to accelerate releases without rewriting our test infrastructure—ideal if we’re already using Testo or evaluating it for performance.

Ask: "Would you prioritize reducing test suite runtime as a way to speed up deployments?"


For Engineering:

*"testo/filter provides native test filtering for Testo via CLI flags (--filter, --path, --suite), matching PHPUnit’s capabilities but with potential for dataset-level precision. Key benefits for Laravel:

  • No manual hacks: Replace grep-based filtering or custom scripts.
  • Future-proof: Aligns with Testo’s roadmap (e.g., dataset filtering).
  • Lightweight: ~100 LOC; minimal maintenance overhead.

Tradeoffs:

  • Testo-specific: Not a drop-in for PHPUnit/Pest—requires a custom Artisan wrapper.
  • CLI-only: No IDE plugins or programmatic hooks (e.g., TestCase::filter()).
  • Integration effort: High due to Laravel’s PHPUnit/Pest ecosystem.

Proposal: Pilot in CI for a critical workflow (e.g., nightly regression tests) to measure runtime savings. If successful, we could extend it to parallel test execution by suite.*

Ask: "Does this address a pain point in your current test filtering workflow, or should we explore PHPUnit/Pest alternatives first?"


For Technical PMs (TPM):

*"This package is a niche fit for Laravel projects. While it offers powerful filtering, integrating Testo into Laravel’s stack requires:

  1. Custom Artisan commands to bridge Testo’s CLI.
  2. Isolation (e.g., Docker or separate vendor/bin) to avoid conflicts with PHPUnit/Pest.
  3. Manual effort to map Testo’s assertions to Laravel’s helpers (e.g., assertDatabaseHas).

Recommendation:

  • Short-term: Use as a supplemental tool for specific test suites (e.g., performance tests) via composer scripts.
  • Long-term: Evaluate PHPUnit/Pest plugins or custom Laravel test traits if Testo’s ecosystem isn’t a priority.

Key Question: Is Testo a strategic direction for our testing stack, or should we treat this as a tactical experiment?"


For Developers:

*"If you’re comfortable with Testo’s CLI and want to speed up test runs, this package lets you filter tests by:

  • Name: --filter "LoginTest"
  • Path: --path "tests/Feature"
  • Suite: --suite "Auth"
  • Type: --type "unit"
  • Dataset: --dataset "users:premium"

How to try it:

  1. Install:
    composer require --dev testo/filter
    
  2. Run tests:
    vendor/bin/testo run --filter=UserTest
    

Note: This won’t work out-of-the-box with Laravel’s phpunit—you’ll need a custom Artisan command to wrap it.

Ask: Would you use this for debugging or CI optimization, or is PHPUnit/Pest’s filtering good enough?"*

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.
graham-campbell/flysystem
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi