Search by

rmb32 / scenario-runner-cli

rogerbarnfather

Scenario Runner CLI — the unit-test scaffolding wizard as a standalone CLI transport package for rmb32/scenario-runner

Package info

bitbucket.org/rmb32/scenario-runner-cli/

Homepage

pkg:composer/rmb32/scenario-runner-cli

Statistics

Installs: 17

Dependents: 0

Suggesters: 0

v0.1.0 2026-11-10 21:14 UTC

This package is auto-updated.

Last update: 2026-11-11 15:01:49 UTC


README

Early, version 0.x. Not ready for real projects yet; the minor version is the breaking one.

Part of Barn.

The scenario-runner command: an interactive wizard that scaffolds an empty PHPUnit test for a Work ticket — a unit-level check that sits underneath your acceptance-level Scenarios. Built on Scenario Runner.

Requirements

  • PHP 8.5+
  • A captured Story with a Work ticket (see below)

Installation

composer require --dev rmb32/scenario-runner-cli

Usage

In a barn with a captured Scenario, create a ticket with the Barnspec CLI, then scaffold a test for it:

composer require --dev rmb32/barnspec-cli
vendor/bin/barnspec work:create commerce basket-quantity-updates caps-at-the-stock-level --title="Cap quantity" --reference=SHOP-42
vendor/bin/scenario-runner commerce basket-quantity-updates caps-at-the-stock-level --output-dir=tests/Unit

It prompts for the ticket, the target class and method (both checked to exist), a plain-English description, and the test class's namespace. The result is one #[Test] method whose body is markTestIncomplete('TODO: ...') — the test shows as incomplete, not passing, until you write it.

It reads the stories of the barn it is run in: the nearest folder at or above the current one that holds a .barn/ folder, and it names that barn's root first. With no barn it stops and writes nothing; barnspec init makes one. --output-dir is relative to the folder you run it from.

To run acceptance Scenarios instead, use Scenario Bridge.

Related packages

History

License

Proprietary. See LICENSE. Copyright (c) Roger Barnfather.