codewithdennis/filament-tests
Filament Tests lets you run and review your PHPUnit or Pest test suite directly from a Filament panel. Trigger tests, inspect pass/fail results and output, and monitor your Laravel app’s health without leaving the admin dashboard.
Architecture fit. codewithdennis/filament-tests is a dev-time scaffolder, not a runtime dependency. It sits in require-dev alongside pestphp/pest and filament/filament, introspects Filament resource classes, and emits PEST test files under tests/. No production code path imports it, so architectural coupling is effectively zero and removal is a composer remove plus a file cleanup. That matters for how a TPM frames the decision: this is a bounded, reversible engineering experiment, not a platform commitment. The question to answer is "do we want the output?" — not "do we want this in our stack?"
The strategic value is concentrated in what it removes. Filament resources — forms, tables, actions, policies, relation managers — are typically the least-covered part of a Laravel codebase because authoring those tests by hand is tedious and low-glamour. A generator that turns per-resource test authoring into a scaffolding pass changes the cost curve on "should we test the admin panel?" from weeks to days. That is the product decision this package supports, and it is the reason to spend any time on it despite the health signals.
Integration feasibility. High for a spike, conditional for anything longer. Prerequisites are narrow and well understood: a Laravel app using Filament, with PEST installed or installable. Input is a resource class; output is a test file. That flow is easy to prototype and easy to reason about. The real feasibility question is not installation but whether the emitted tests still run green against the current Filament major and PEST major — Filament's testing surface (Livewire component assertions, table/form/action helpers) has moved materially across v2 → v3 → v4, and PEST's syntax has moved with its own majors. Feasibility is gated on a version-resolution check and an observed pass rate on representative resources, not on the README.
Technical risk. Three areas dominate:
Counterweight: blast radius is bounded. As a dev-only dependency it cannot break production, and the exit cost is a composer entry plus optional file cleanup.
Documentation flag for the PM. The package description ("creates PEST tests tailored for your Filament resources") and the documentation (a test-runner page inside the Filament dashboard) describe two different products. Confirm which artifact is being evaluated before committing scope. That ambiguity alone justifies a timeboxed spike rather than a plan.
Key questions for the spike owner.
composer.json and CI matrix, and does that resolve cleanly against our composer.lock?Stack fit. TALL stack — Laravel 10/11, Livewire 3, Filament 3, PEST 2/3 on PHPUnit 10/11. The package belongs in require-dev only, pinned to an exact version, and must never be promoted into require. Sequencing note: if the team is not already on PEST, adopting PEST is the larger and more durable decision. Sequence PEST adoption first; evaluate this package as a downstream convenience, not as the driver.
Migration path. Given archived status, the correct framing is adopt the output, not the dependency:
tools/ package or monorepo packages/ directory we own and can patch against future Filament versions.require-dev dependency and expecting it to survive Filament upgrades. That is the option that quietly blocks composer update for the whole team.Compatibility. Pin to the last released tag; verify Filament and PEST constraints resolve before writing code. Review the lockfile diff — a dev dependency can still pull transitive packages. Confirm generated tests execute under the same PHPUnit configuration, test database, and RefreshDatabase/factory setup as the rest of the suite; Filament resource tests are stateful and surface environment assumptions immediately.
Sequencing (TPM view).
Roadmap tie-in. The highest-value moment to run this is immediately before a risky change — a Filament major upgrade (v3→v4), a Laravel major bump, or a refactor of resource classes — not after. Position it as a quality-gate input to that sequencing decision, not as a general test-coverage initiative.
Maintenance. Upstream maintenance is zero. Archived repos receive no fixes and no issue triage. Our maintenance load is entirely the generated tests, which we own the moment they are committed. The package is a one-shot accelerator: it front-loads authoring effort and contributes nothing thereafter. Budget accordingly, and do not plan on "regenerating tests after a Filament upgrade" unless we fork.
Support. No vendor, no SLA, no maintainer responsiveness. Internal ownership must be explicit before adoption, because a package with no owner becomes unowned test scaffolding that either fails silently in CI or gets skipped. The realistic support model is one engineer who understands Filament's testing helpers and can repair generated assertions as the framework evolves.
Scaling. Generation scales linearly and cheaply with resource count. The tail is the problem: each generated test is a maintenance liability proportional to how tightly it binds to Filament internals. At ~10 resources this is a clear win; at 100, hand-maintaining generated assertions across Filament majors becomes a project in itself. Set a threshold in the spike — if the admin surface is expected to grow past a few dozen resources, favor forking the generator (repeatable) over harvesting once (point-in-time).
Failure modes.
require-dev and constrains a future Filament upgrade. Mitigate by removing the package at harvest time — the single most important operational rule here.Ramp-up. Low for a PEST-fluent engineer — install, point at a resource, read the output. The real learning is in reviewing generated assertions critically, which requires familiarity with Filament's testing helpers (Livewire assertions, callAction, table/form schema tests). Plan for roughly a day of ramp-up before the spike's measurements are trustworthy, and capture the spike findings as a short internal note so the next engineer does not repeat the evaluation if the decision is "fork later."
Bottom line for the PM. Fund a one-to-two day timeboxed spike with a named owner and a go/no-go date. The downside is two engineering days and a discarded branch; the upside is either regression safety on the admin panel ahead of the next Filament upgrade, or a precise specification for the ~200-line generator we would build instead. Either outcome is worth the cost — provided the package itself does not survive the spike as a dependency.
How can I help you explore Laravel packages today?