- How do I install Flaky in a Laravel project?
- Install it as a Composer dependency, typically in require-dev for a Laravel application, using composer require jwarkentin/flaky. Then follow the package configuration steps and run your PHPUnit or Pest suite through the Flaky workflow. Check the repository README for the exact install and configuration commands.
- Does Flaky work with Pest as well as PHPUnit?
- Yes. The package overview states that Flaky works with both PHPUnit and Pest in Laravel projects. That means you can use the same retry and flaky-test detection approach across either test runner. Confirm the exact supported versions in the package README and composer constraints.
- How does Flaky retry failing tests?
- Flaky automatically retries failing tests using configurable attempts. Tests that pass only after a retry are treated as flaky rather than clean passes, so the inconsistency stays visible. The package is designed to keep real failures visible instead of letting retries silently mask them.
- How do I configure the number of retry attempts in Flaky?
- Flaky supports configurable retry attempts, so you can tune how many times a failing test is retried. The package overview does not list the exact configuration key or file path, so check the repository README for the current config options. Start with a small number of attempts and increase only if your suite needs it.
- How does Flaky report flaky tests?
- Flaky provides clear reporting so flaky tests get fixed rather than ignored. It detects tests that only pass after retrying and surfaces them through its reporting workflow. The overview does not specify the exact report format, so review the README for current output options.
- Which Laravel and PHP versions does Flaky support?
- The package overview does not list exact Laravel or PHP version constraints. Check the package composer.json and README for the supported PHP, Laravel, PHPUnit, and Pest versions before adopting it. Match those constraints against your application and CI environment.
- Is Flaky a replacement for PHPUnit or Pest retry features?
- Flaky is focused on retrying failing tests, detecting tests that only pass after retry, and reporting them clearly. That detection and reporting layer is the main difference from simply enabling retries in your test runner. Use it when you want flaky tests surfaced for fixing rather than hidden by retries.
- Can I use Flaky in CI pipelines?
- Yes, Flaky is intended to help keep CI pipelines stable by retrying intermittent failures while reporting which tests are flaky. The goal is to avoid letting unreliable specs erode trust in the suite. Review the README for the recommended Artisan-friendly or test-runner workflow in CI.
- Does retrying tests with Flaky hide real failures?
- Flaky is designed to keep real failures visible. It retries failing tests but detects and reports tests that only pass after retrying, so flaky behavior is surfaced instead of ignored. You should still review reported flaky tests and fix the underlying causes.
- What are alternatives to Flaky for flaky tests in Laravel?
- Alternatives include built-in retry options in PHPUnit or Pest, custom CI retry scripts, or manually quarantining unreliable tests. Flaky adds detection and reporting specifically for tests that only pass after retrying. Choose it if you want that visibility built into your Laravel test workflow.