Debugging & History

3figures
3min read
Sheet 19 of 47 · Scenarios

The Scenarios page runs the file in the editor or the whole folder, once or up to 200 times. When a step fails, stop the run before it, play it slowly and watch what the bot sees, or set the failed run against the last one that passed.

The folder button opens a project folder, for example the plugin's tools/scenarios, and lib/ next to it resolves includes like in CI. The tool's own folder is one click away and samples only ever go there.

Stop before a step

Click the dot next to a step, or tick Pause the run before this step in its fields. The run stops before that step and the paused box shows every ${var}. One step and Continue take it from there. Cancel frees a paused run.

Loop passes and parallel branches have their own paths, 3[2].1 and 4.parallel[Bot_1].2.

Each parallel branch pauses on its own breakpoints, one at a time: a second branch that reaches a breakpoint waits until the first pause is continued. The others keep running meanwhile. Step stops before the next step of whichever branch gets there first.

Play slowly

With Play slowly the run waits a second before every step. What the bot sees shows the bot's open menu, item by item, and its last chat lines as it plays.

Play slowly with What the bot sees open.
A scenario playing slowly, with the What the bot sees panel showing the open menu item by item and the last chat lines

Rerun what failed

After a run, the button next to Run folder runs only the files that failed. They are read again from disk, so a fix saved in between is what runs.

History

Every run from the editor, the folder, a deploy, the schedule or the API lands in history/<file>-<folder hash>.jsonl, newest last, 300 kept per file. The same file name in two scenario folders keeps two histories. A history from before the folder was part of the name moves to the first folder that asks for it.

What changed

A click on a run in History sets it against the last run that passed before it:

  • steps that passed then and fail now, with the reason
  • steps that got more than twice as slow
  • steps that came or went

What changed does that for the newest run when it failed.

What changed: a failed run against the last pass.
What changed: a failed run set against the last run that passed, with the step that now fails and its reason

Flaky steps

Flaky works per step over the history of the selected file: failures out of runs, min, median and max time, and the last failure message. Yellow rows fail sometimes, red ones always.

The Flaky tab for one file.
The Flaky tab: one row per step with failures out of runs, timings and the last failure message

Between runs every bot the scenario joined is disconnected, so each run starts like a fresh CI job. Bots you connected by hand stay online.

What a failed step keeps

A failed step keeps what its bot looked like at that moment: where it stood, health, the item in hand, the open window with its first slots and the last chat lines. It is in the report under diagnostics, keyed by the step path, and CI mode prints it under the failed step.

Endpoints

EndpointParametersReturns
/suite/runfile= or dir= (default: the scenario folder), times=1, wait=1, junit=<file>, cache=1, failed=1, deploy=1, build=0, shard=i/n, format=textEvery run with its report, or started. junit writes JUnit XML there when the run ends, with or without wait. report=<file> writes the HTML report the same way, embed=1 puts the images inside it
/suite/status, /suite/cancelWhat is running now / stops it
/suite/lastformat=textThe report of the last run of this session
/suite/checkfile= or dir=, format=textParses the files without running them
/cache, /cache/clearWhat the result cache holds / empties it
/historyfile= (a name in the scenario folder, a path, or a name with dir=), limit=50The stored runs of one file
/flakySame as /historyPer step failures and timings

The rest of /suite/run is on Short Loop & Result Cache.

Loading the index

Enter openUp Down moveEsc close