Skip to content

Spec format ​

Every key highbar accepts, by level. Any other key is an error, except keys that start with x-, which are skipped at every level. Times are in milliseconds.

Top level ​

KeyType
agentmappingRequired. How to reach the agent.
suiteslistRequired, not empty.
defaultsmappingOptional. runs: how many times each test runs (default 1).

agent ​

KeyTypeDefault
endpointURLrequiredWhere each message is sent.
startcommandnoneStart the agent: highbar runs it, stops it at the end, and passes HIGHBAR_TRACES_URL. Without it, highbar attaches to a running agent.
healthURLnoneMust answer before tests start. Without it, highbar waits for the endpoint's port.
startup_timeoutms15000How long a started agent has to become ready.
settle_timems500How long after a reply highbar waits before reading the trace file.
timeoutms60000Each reply, and each session hook.
tracespathnoneThe trace file of an attached agent. Required when a test checks tool calls in attach mode.
requestmappingPOST {"message": "{{message}}"}method, headers, body.
responsedotted pathfirst of response, message, content, text, replyWhere the reply text is in the JSON body.
sessionmappingnonesetup and teardown hooks, each a command or {python: "module:function"}.
correlatemapping{test: "{{test.id}}"}The context keys that link a trace record to a test.

${NAME} anywhere under agent is replaced by the environment variable when the spec is loaded; a missing variable is an error. Placeholders ({{message}}, {{test.id}}, {{test.name}}, {{session.<path>}}) are allowed in request, correlate and session commands. See attach mode and sessions.

suites[] ​

KeyType
nametextRequired.
testslistRequired, not empty.

tests[] ​

KeyType
triggertextThe message. Either trigger or turns.
expectmappingWhat must hold. Required with trigger.
turnslistA conversation: each turn has trigger, expect and an optional name.
nametextShown in the output instead of the trigger.
variationsintegerHow many paraphrases of the trigger to run as well.
runsinteger ≥ 1How many times to run each phrasing.
min_passinteger ≥ 1, or fraction in (0, 1]How many runs must pass. Default: all. A fraction is rounded up.

expect ​

KeyType
function_callslistCalls that must happen. []: no call at all.
orderedbooleanThe calls happened in the listed order. Needs function_calls.
exclusivebooleanNo call beyond the listed ones. Needs function_calls.
forbidlist of tool namesTools that must not be called.
responsematchersConditions on the reply text.

At least one of function_calls, forbid and response is required.

function_calls[] ​

KeyType
nametext, or list of textsRequired. A list accepts any of the names.
paramsmappingMust be contained in the call's arguments. Values may be matchers.
resultmappingMust be contained in what the tool returned.
errorboolean, or matchersfalse (default): the call must not have failed. true: it must have. A matcher: its error text must meet it.

Matchers ​

Used in response, in values of params and result, and in error:

Matcher
equalsExactly this value.
contains / icontainsContains the text (i: ignoring case); for a list, has the item.
not_contains / not_icontainsDoes not.
matches / not_matchesA regular expression is found (Python re.search), or is not. Checked when the spec is loaded.

Negative matchers fail on a value with no text form, such as an object or null. Templates ({{previous.*}}) are only allowed in triggers.

Released under the MIT License.