Repository navigation
Test Bot CLI
Every mumbot subcommand except webhook drives the scripted test bot: it connects, runs a step (or a whole script) and exits. Exit code 0 means the step passed; an error or timeout prints the reason on stderr and exits with 1.
Use it only against local or throwaway test servers. Full reference: docs/cli.md.
| Option | Default | Meaning |
|---|---|---|
--host, --port
|
127.0.0.1, 64738
|
Server. |
--name |
Bot |
User name. |
--cert |
the name | Persistent certificate name; reuse to keep the identity. |
--superuser |
off | Log in as SuperUser (admin steps). |
--timeout |
10 |
Seconds for login and each wait. |
--hold |
0 |
Seconds to wait before exiting (fixed in 0.1.1, #14). |
| Group | Subcommands |
|---|---|
| Connection and user |
connect, rename, register, avatar, comment, join, listen, unlisten, mute, deaf
|
| Chat |
say, say-sample (bold, link, image, rich, script, external-image), pm
|
Admin (need --superuser) |
moderate, move, deny-speak, allow-speak, deny-listen, allow-listen, describe
|
| Expect (checks) |
expect user, expect user-gone, expect message, expect denied
|
| Voice |
play, record, expect-audio, game-context (see Voice checks) |
| Script |
script (steps from stdin), sleep
|
expect user checks: --in, --muted, --deaf, --listening, --not-listening, --registered, --comment-contains, --has-avatar, --avatar-file, --cert-hash. expect message checks: --from, --contains, --private, --channel.
# Is Alice in "Raid" and unmuted? Exit code 0 = yes.
mumbot --port 44738 --name Observer expect user Alice --in Raid --muted false
# One connection, several steps, one per line.
printf '%s\n' 'join Lobby' 'say "<b>hello</b>"' 'expect message --from Alice --contains hi' \
| mumbot --port 44738 --name Bob scriptEnd a script that sends something with sleep 1, so the server receives it before the bot disconnects.
Mumcord's end-to-end and smoke tests play a second user with this bot. It moves into channels, mutes, chats and sends voice, while the test checks what the Mumcord client shows. Failures show up as a non-zero exit code. The bot was carried over from Mumcord's own repository.
Mumcord uses a pinned release of this bot, not a copy of the code:
-
scripts/mumbot.envin the Mumcord repository holds the version (currently 0.1.1) and the SHA256 of every release archive (from the release'sSHA256SUMS). -
scripts/fetch-mumbot.sh <linux-x86_64|linux-aarch64|windows-x86_64|macos-universal> <dest>downloads the archive, checks the hash and unpacks the binary. Archives are cached in~/.cache/mumbot. -
E2E: the build step fetches the Linux x86_64 binary next to the app binaries, and the test container exports
MUMCORD_TESTENV_DIR(where the test server's.envwith the SuperUser password lives) andMUMCORD_BOT_DATA(where the bot keeps its certificates). -
Smoke test: each CI job fetches the binary for its own platform and passes it to
smoke.sh --bot. - Live engine tests: they use the mumbot library at the same tag.
To move Mumcord to a new bot release, bump all lines in mumbot.env together.
Mumbot is licensed under the AGPL-3.0 · Source code · Mumcord · Website