Search by

vusys / laravel-runabout

Vusys

Journey testing for Laravel: run the steps of a user journey in seeded, shuffled orders and assert invariants along the way.

Package info

github.com/Vusys/laravel-runabout

pkg:composer/vusys/laravel-runabout

Statistics

Installs: 10 229

Dependents: 3

Suggesters: 0

Stars: 0

v1.0.0 2026-09-30 18:27 UTC

This package is auto-updated.

Last update: 2026-10-12 15:33:43 UTC


README

Tests codecov tests assertions test LOC CI matrix Bencher Mutation testing OpenSSF Scorecard PHP Laravel PHPStan Rector Code Style: Pint License

Journey testing for Laravel: define the steps of a user journey once, and Runabout executes them in randomised-but-deterministic orders, checking your invariants after every step. It exists to catch the bugs that unit, feature, and browser tests all miss — the ones that only appear when real users do things in an order you never thought to test.

📚 Full documentation: vusys.github.io/laravel-runabout

final class PostLifecycleTest extends TestCase
{
    use RunsJourneys;

    public function test_post_lifecycle(): void
    {
        $this->journey(PostLifecycleJourney::class)->shuffles(25)->run();
    }
}

One journey definition becomes twenty-six executions: the declared order, then twenty-five seeded shuffles that respect your constraints. When a shuffle fails, the seed reproduces the exact trail — and Runabout shrinks it to the smallest reproduction before reporting it.

Requirements

  • PHP 8.3+
  • Laravel 11, 12, or 13

Installation

composer require --dev vusys/laravel-runabout

No service provider to register and nothing to publish — Runabout is a test-only trait you mix into a test case.

Quick start

Add the RunsJourneys trait to a test case, define a Journey, and run it. The Quick start guide walks through a complete example; the short version is:

use Vusys\Runabout\RunsJourneys;

final class PostLifecycleTest extends TestCase
{
    use RunsJourneys;

    public function test_post_lifecycle(): void
    {
        $this->journey(PostLifecycleJourney::class)->shuffles(25)->run();
    }
}

Documentation

Full docs live at vusys.github.io/laravel-runabout. By topic:

Topic Page
Why it exists and how it works Introduction
Installing and wiring it in Installation
A complete worked example Quick start
The vocabulary Core concepts
The step DSL Defining steps
Trail state and seeded randomness The context
Driving the app as named users Actors & HTTP
Shuffling the clock Time travel
Properties checked after every step Invariants
shuffles / repeatHeavy / exhaustive / seed Execution modes
Cross-actor and multi-tenant bugs Interleaving journeys
Fresh state between trails Resetting state
Seeds, artifacts, and shrinking Reproducing failures
Seeing what the shuffler explored Trails & coverage
The RUNABOUT_* settings Environment variables

License

MIT. See LICENSE.