Skip to content

Commands ​

StepTrail has three commands you type in a terminal. Everything else is done in the browser extension.

What is a terminal?

A text window where you type commands: Terminal on Mac, PowerShell on Windows. You only need it for the commands below.

Replay a recording ​

Plays a saved recording in a fresh browser and tells you whether every step worked.

text
node bin/replay.js recording.json

Replace recording.json with the file you saved from the extension. Add any of the options below after it.

OptionWhat it doesWhen to use it
--headedShows the browser window while it replaysTo watch what happens
--continueKeeps going after a step failsTo see every failure, not just the first
--html report.htmlSaves a report you can open in a browserTo share results with people
--junit report.xmlSaves a report in the format test tools readTo feed CI or a test-management tool
--csv report.csvSaves a spreadsheet of the stepsTo open in Excel or Sheets
--jsonPrints the full result as dataFor other programs, not for people
--memory shopUses and updates the screen memory for the system shop: locators proven before heal broken steps, and this replay teaches the memoryTo make replays recover from page changes. See Screen memory
--fail-on-slowFails the run if any page is rated Poor for speedTo stop a build on a slow page. See Page speed
--repeat 3Replays 3 times (1 to 10) and uses the median speed of each pageFor steadier speed numbers, on flows that are safe to repeat
--no-perfSkips the page speed measurementsIf you do not want them in the report
--fail-on highFails the run if a security finding is at or above this level (critical, high, medium, low, info)To stop a build on serious security findings
--no-securitySkips the security checksIf you do not want findings in the report
--jiraFiles a Jira bug if the replay failsSee File Jira bugs automatically

Result: the command finishes with code 0 when every step passed (and, if you used --fail-on or --fail-on-slow, no security finding or slow page crossed that line). Any other code means something failed, which is how automated systems know to raise an alarm. Security findings are listed after the steps; see Security checks.

Example: watch the replay and save a report.

text
node bin/replay.js recording.json --headed --html report.html

Generate a test script ​

Turns a recording into a test script you can keep and run again. You rarely need this: the extension's Download Playwright test button makes the same file with one click. Use the command when you want to generate tests from saved recordings in a script.

text
node bin/generate.js recording.json --out my-test.spec.js
OptionWhat it doesWhen to use it
--out my-test.spec.jsSaves the script to this file. Without it, the script is shown on screenAlmost always
--with-sessionIncludes your saved login in the scriptOnly if the flow needs you logged in. Treat the file like a password

More in Generate a test script.

Look after the screen memory ​

Shows and manages what StepTrail has learned about each system. See Screen memory for what is stored and what never is.

text
node bin/memory.js show --system shop
CommandWhat it does
learn <recording> --system <name>Adds what a recording shows
show --system <name>Lists screens, elements and routes
route --system <name> <from> <to>The shortest known route between two screens
systemsThe systems automated so far
checkScans the memory files for personal data and addresses (use it in a build)
forget --system <name> --yesRemoves one system's memory