Skip to content

Commands ​

BugTrail has two 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 two 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
--jiraFiles a Jira bug if the replay failsSee File Jira bugs automatically

Result: the command finishes with code 0 when every step passed. Any other code means something failed, which is how automated systems know to raise an alarm.

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.

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.