Scenarios
Filescenarios/island-menu.jsonA scenario is a list of steps for one bot, with parallel groups for more. Each step either does something, like joining, typing a command or clicking a slot, or checks something, like a menu being open or a line showing up in chat. A step that does not pass fails the run and the report says which one and why.

A first file
Scenarios are JSON or YAML. The same file works as either.
{
"name": "Island menu",
"bot": "TestBotA",
"steps": [
{ "do": "join" },
{ "do": "chat", "c": "/is" },
{ "do": "expectWindow", "title": "(?i)island", "timeout": 4000 },
{ "do": "click", "custom": "(?i)members" },
{ "do": "parallel", "bots": 3, "pattern": "Test_{n}", "steps": [{ "do": "join" }, { "do": "quit" }] },
{ "do": "quit" }
]
}TestBotA joins, types /is, waits up to four seconds for a menu whose title matches (?i)island, and clicks the item whose name matches (?i)members. Then three more bots named from the pattern Test_{n} join and quit at the same time, and TestBotA quits.
The steps
join, quit, chat, click, close, wait, goto, action, expectWindow, expectNoWindow, expectTitle, expectChat, expectNoChat, expectSlot, expectDialog, answerDialog, assertPos, parallel, loop, group, if, set, log, call, include, expectServer, server, assertServer, rcon, file, checkpoint, and for pictures takeover, frame, key, screenshot, record and release.
Every step and its parameters are on the Step Reference. The tool prints the same reference on one page:
java -jar IgniteTestTool.jar guideWindow titles, item names, lore and chat are matched as written and with small caps read as plain letters, so title: zombies finds a menu called ᴢᴏᴍʙɪᴇꜱ │ ᴀʀᴇɴᴀꜱ.
Server-side checks
A bot cannot see health, velocity, PDC, effects, AI or blocks the way the server holds them. Steps that ask the server need the server agent.
steps:
- do: server # any agent endpoint, "as" keeps the answer or one field of it
path: dummy
near: ${bot}
dx: 2.5
health: 100
field: id
as: dummy
- do: action
action: useHold
ms: 2000
- do: assertServer # polls until it passes or the timeout runs out
path: entity
id: ${dummy}
near: ${bot}
field: health # dotted path, [n] for list items, pdc.lightfall:mob_level works
op: eq # eq, ne, gt, ge, lt, le, contains, matches, exists, absent
value: 92
delta: 0.01
timeout: 1500
- do: rcon
cmd: class info ${bot}
expect: arc 20 # a regex the answer has to match
finally: # runs after the steps, whatever failed before
- do: server
path: dummy/clearnameis the step label, so a player goes to the agent asplayer:and a packet towaitForaspacket:. For an agent endpoint that takesname,actionorcmditself (snapshot,tick,exec),serverandassertServertakeparams: {name: arena, action: freeze}, which goes out as written.- Config keyinventory.sizeConfig keyeffects.length
fieldcan count:inventory.sizeoreffects.lengthis the number of entries, unless the object has a field of that name. - A coordinate can be relative, like in a command:
x: "~"is the block the bot stands in,"~2"and"~-1"count from it. This works for every bot action withx,y,z(goto,place,dig,activate,look) and forserverandassertServer, sopath: blockcan look next to the bot.
Waiting
timeouton anactionstep reaches actions that wait on their own (waitFor,jumpApex,airJump), so their own message explains a failure. The step gives them two extra seconds before it gives up.actiontakesasandfieldtoo, for exampleaction: mark,as: seen,field: packets, thensince: ${seen}later. See Precise Testing.expectSlotwithabsent: truepasses once no slot of the open window matches, and fails with the slot that still does.
Variables
- Strings can use
${var}. Named groups in anexpectChatregex become variables, and${match}holds the whole match.loopsets${i},parallelsets${n}and${bot},expectSlotsets${slot}. setdoes arithmetic withcalc:{do: set, var: left, calc: "${money} - 2 * ${price}"}. Numbers,+ - * / %and brackets. A whole result stays whole, so350and not350.0.
Branches, retries and cleanup
if picks a branch with any other step as its check. A check that does not pass is an answer, not a failure:
- do: if
check: {do: expectSlot, item: diamond, timeout: 500}
then:
- {do: click, item: diamond}
else:
- {do: rcon, cmd: "give ${bot} diamond"}loopwithuntil: passtries until one iteration gets through and fails when none oftimesdoes, for anything that rolls dice. The failed tries do not fail the scenario.- Any step can be
"optional": true, so a failure is logged but does not stop the run. A failure inside an optionalgroup,looporparallelends that block only. - A failure inside an optional block or one of the
until: passtries is markedoptional:like a failed optional step, and JUnit and the short report treat it the same way. finallyruns after any failure and to its end: acall,grouporloopinside it runs all of its steps, even after one of them failed.
Files on the server
file works on a file in the server folder:
- {do: file, path: plugins/Shop/config.yml, replace: "^price: .*$", with: "price: 20"}replace is a regex per line and the new text goes in as written. write and append take whole content, expect: <regex> waits until the file holds something (timeout, and as keeps the content), and restore: true puts it back. Whatever a scenario changed is put back when it ends, also after a failure. keep: true on the edit leaves it. A path outside the server folder is refused.
Joining
joinon a bot that is already online, because an earlier run failed before itsquit, lets go of its keys, closes its menu and counts chat from that moment, sosince: scenarionever reads an older run.joinwithfresh: trueresets the player through the agent once it is in: full health and hunger, no items, effects or levels, the server's default game mode. Health, hunger and items live in playerdata, so without it a scenario that takes eight hearts passes twice and kills its bot the third time.freshPlayers: trueat the top of the file does it for everyjoin, andfresh: falseon one step leaves that bot alone.jointakesaccount: <name or uuid>to join with a saved premium account. The scenario'sbothas to be that account's Minecraft name, andconfirmHost: trueapproves a remote host the first time. See Premium Accounts.