Order Mission Suites
Running testronaut without mission filenames discovers a suite from your
project. By default, discovered mission files run alphabetically. Use
missions.order in testronaut-config.json when a workflow has dependencies,
such as logging in first and logging out last.
{
"missions": {
"root": "missions",
"include": ["**/*.mission.js", "**/*.mission.ts"],
"exclude": ["**/*.draft.mission.js"],
"order": [
"login.mission.js",
"account/**/*.mission.js",
"*",
"logout.mission.js"
]
}
}
This example runs:
login.mission.js- matching account missions, alphabetically
- all other discovered missions, alphabetically
logout.mission.js
Then run the configured suite normally:
testronaut
Ordering rulesβ
Order entries are paths or glob patterns relative to missions.root. They are
evaluated from top to bottom.
- A mission is placed by the first order entry that claims it.
- Matches within one pattern remain alphabetical.
*is the catch-all position for missions not claimed by another entry. Missions matching entries after*are reserved for those later positions, which makes patterns such aslogin β * β logoutpossible.- Discovered missions that are not listed or matched are appended alphabetically.
- An exact filename that was not discovered produces a warning. An unmatched glob does not, so optional groups can be represented safely.
- If
missions.orderis absent or empty, discovery remains alphabetical.
include and exclude decide which files belong to the suite; order only
arranges the files that remain after discovery. Tag filters select from that
ordered list without re-sorting it.
Verify the suite before runningβ
Inspect the resolved order without executing browser missions:
testronaut list
testronaut --dry-run
testronaut --dry-run --json
list is useful for a readable check of discovered files and tags. A JSON dry
run is convenient for CI validation or scripts.
Explicit command-line orderβ
When mission filenames are supplied directly, Testronaut runs them in the order
given on the command line. missions.order applies only to automatic discovery.
testronaut \
login.mission.js \
checkout.mission.js \
logout.mission.js
Use explicit filenames for a one-off suite. Use missions.order when the same
ordering should be the project default for local runs and CI.
Authentication and stateβ
Ordering controls sequence, but isolated mode still creates a new browser context for every mission file. If later missions need authentication from an earlier login, combine ordering with shared authentication:
testronaut --session=shared-auth
Wrap repeated login setup in launchProtocol() so later mission files can
verify and reuse the authenticated state without spending additional model
turns. See Reuse Browser Authentication Across Missions.
Keep missions independently verifiable where practical. Ordering is most useful for intentional suite-level dependencies and cleanupβnot as a substitute for clear prerequisites and success criteria.