Where You Author Scripts

Atrahasis exposes script editors in five different places. The API surface is the same everywhere, but each place has a different trigger, a different set of tabs, and a different set of starter snippets in the right sidebar.

HTTP Request (Standalone and Project)

Open any HTTP request — either a saved request from the Box, a standalone tab, or a request inside a project — and click the Processors tab under the URL row. Three sub-tabs appear:

  • Pre-Script: runs before the request is sent. Use it to prepare headers, compute a signature, refresh a token, or read a value from the environment.
  • Post-Script: runs after the response arrives. Use it to parse the response, extract values, and save them to the environment or flow store.
  • Assertions: a structured checker, not a script. Covered in its own sub-section of the Request chapter.

Both Pre-Script and Post-Script run automatically when you click Send. There is no separate run button — their output appears in the console strip at the bottom of the editor.

Flow Runner — Step Scripts

Every step inside a flow has the same Processors tab as a standalone HTTP request, with the same Pre-Script, Post-Script, and Assertions sub-tabs. Scripts written here behave identically to HTTP request scripts — the only real difference is that at.flowis available here (whereas it throws an error when used outside flow or load-test execution).

Flow Runner — Before All & After All

In the Flow Runner sidebar, at the very top of the step list, there are two dedicated entries — Before All and After All. Selecting either opens a full-screen editor with the same layout:

  • Editor on the left, with syntax highlighting and autocomplete for the at API.
  • Snippets panel on the right, collapsible via a chevron strip.
  • Try button in the editor header — manually runs the script so you can test it before kicking off the whole flow.
  • Console strip at the bottom, showing the output of the most recent Try or real run.

Before All runs once, before the first step of the flow. After All runs once, after the last step finishes. Both run in the lifecycle execution mode covered in Before All & After All.

Load Test — Step Scripts

Inside a load test spec, every step has the same Processors tab with Pre-Script, Post-Script, and Assertions sub-tabs. The editing experience is identical to HTTP and flow steps, including the snippets panel. However, load test step scripts have a few runtime limits that do not apply elsewhere — see Load Test Step Limits for the list.

Load Test — Before All & After All

The load test sidebar mirrors the Flow Runner: each spec has its own Before All and After All entries with the same editor, snippets, Try button, and console strip. Before All runs once, before any virtual user starts. After All runs once, after the whole test has finished and results are available — which is why at.export is available here but not in Before All.

Unlike load test step scripts, the lifecycle scripts are not subject to the Load Test Step limits — they run on the full engine that powers HTTP and flow scripts, so fetch, await, and at.export all work.