website/docs/devtools/wdio/PreserveAndRerun.md
When a test fails, the usual debugging loop is: rerun it, then compare two walls of logs to work out what changed. Preserve & Rerun collapses that into a single click. It snapshots the failing run and re-executes the test in one action, then shows both runs side-by-side in a Compare view aligned command-by-command - so you can see exactly where the two diverged without re-reading anything.
This is the fastest way to diagnose a flaky test: the command that behaved differently between the pass and the fail is highlighted for you, along with the assertion that broke.
Available across all three adapters - WebdriverIO, Selenium WebDriver, and Nightwatch.js.
--name filter targets scenarios, not individual Gherkin steps. Scenario-level Preserve & Rerun still works.