- What is pestphp/pest-plugin-stressless and how does it find flaky tests?
- Stressless is a Pest plugin that runs your test suite repeatedly, surfacing tests that pass and fail unpredictably so you can fix nondeterminism before it reaches CI. It plugs into the Pest runner, so scenarios reuse the same factories, fixtures, and auth helpers as your normal tests. It is installed as a require-dev dependency and never touches your build or deployment path. Some versions also add concurrent HTTP load generation against endpoint definitions.
- How do I install Pest Stressless in a Laravel project?
- Install it as a dev dependency with composer require pestphp/pest-plugin-stressless --dev. Pest discovers the plugin through Composer, so no manual service provider registration is needed. After installing, add a dedicated test directory for stress scenarios rather than mixing them into your feature suite. Check that the Composer constraints resolve against your installed Pest version before writing scenarios.
- What is the difference between repeating the test suite and running HTTP load scenarios?
- Repeating the suite answers whether your tests are deterministic by re-running them many times and flagging inconsistent results. HTTP load scenarios answer how an endpoint behaves under concurrency by firing requests, optionally with different verbs, at a target. They are distinct modes with distinct outputs, and conflating them produces misleading numbers. Decide which question you are asking before you write the scenario.
- Can Stressless load-test my Laravel endpoints, and which HTTP verbs does it support?
- Yes. Scenarios are authored in the Pest DSL and can hit your application routes with concurrent requests. Since v2.2.0 all HTTP verbs are allowed, so mutation-heavy flows such as signup, checkout, and order updates can be scripted, not just GET smoke tests. Because verb handling is permissive, review scenario definitions carefully, since a typo can quietly issue a method you did not intend.
- Does Stressless work with PHPUnit, or do I need to be on Pest?
- It is a Pest plugin that extends the Pest runner, so a PHPUnit-native suite is the wrong starting point. If your tests still run on PHPUnit, migrate to Pest first or the effort-to-benefit ratio inverts. Once the suite is on Pest, adoption is a dev dependency plus a new test directory.
- Which environment should I point Stressless runs at?
- Use a sanctioned, isolated, resettable non-production environment. Shared staging can be degraded by stress traffic and have its fixtures corrupted, especially now that DELETE and PATCH are trivial to script. Know how the environment is reset between runs and who owns it. Never point load scenarios at production.
- Are Stressless load numbers accurate enough for capacity planning?
- Treat them as relative signals, not absolutes. A single load-generating runner saturates its own CPU and network well before it characterises the target, and warm caches or noisy neighbours distort results further. Use the output to compare changes over time, and reach for a dedicated distributed load tool if you need real capacity numbers. Establish where client-side saturation begins on your CI runners.
- Should Stressless results gate my CI pipeline?
- Start informational. Tight timing thresholds introduced before baselines and run-to-run variance are understood produce flaky gates, which erodes trust in the whole suite. Establish baselines first, then promote a threshold to a gate deliberately with a named owner. Flaky-test detection output, by contrast, is usually worth failing on once the list is clean.
- Does adding Stressless affect production builds or deployments?
- No. It is a require-dev dependency confined to the test-tooling layer, so it produces no artifact on the build or deployment path. The blast radius of adopting it is limited to your delivery pipeline. The real risks are procedural: environment collateral from load runs and CI instability from premature thresholds.
- Is pest-plugin-stressless actively maintained, and how do I check Pest, PHP, and Laravel compatibility?
- It is community-maintained with GitHub-issue-level support and no vendor SLA, with a modest star count and a last release in December 2023 at the time of writing. There is no published compatibility matrix, so verify Pest major version, PHP, and Laravel support against the package composer.json before upgrading. Assign an internal owner, typically test infrastructure, to perform manual verification at each Pest or PHP upgrade. If you need vendor-backed support, evaluate dedicated load tools alongside it.