Test the addon - AnnabiGihed/RaidManager GitHub Wiki
Generated from
docs/how-to/test-the-addon.md. Edit that file in the repository: changes made in the wiki are overwritten.
The RaidManager addon for World of Warcraft 3.3.5a lives in src/Addon/RaidManager/
(ADR-0031). Its specs prove the logic against the
fixtures of the addon snapshot contract; a check in the game proves the
client answers as the specs assume.
The addon workflow runs luacheck, StyLua and busted on every pull request. To run them locally without installing
Lua, build a tools image once and run it from the repository folder:
docker run --name rm-lua-tools debian:bookworm-slim sh -c "apt-get update && apt-get install -y --no-install-recommends lua5.1 liblua5.1-0-dev luarocks build-essential git ca-certificates unzip curl && luarocks --lua-version 5.1 install busted 2.2.0-1 && luarocks --lua-version 5.1 install luacheck 1.2.0-1 && curl -sSL -o /tmp/s.zip https://github.com/JohnnyMorganz/StyLua/releases/download/v2.5.2/stylua-linux-x86_64.zip && unzip /tmp/s.zip -d /usr/local/bin"docker commit rm-lua-tools rm-lua-tools:localdocker run --rm -v "$(pwd):/repo" -w /repo rm-lua-tools:local sh -c "luacheck src/Addon test/Addon && stylua --check src/Addon test/Addon && busted test/Addon"In Git Bash on Windows, put MSYS_NO_PATHCONV=1 before docker run and use $(pwd -W).
- Copy the
src/Addon/RaidManagerfolder intoInterface/AddOnsof the 3.3.5a client, so thatInterface/AddOns/RaidManager/RaidManager.tocexists. - Start the game, check that RaidManager is enabled in the character selection's AddOns list, and log in.
- Type
/rm. The chat lists each section of the snapshot with its status, such asidentity: observed. The saves showunavailable (not-answered)for a moment after login, until the game answers the addon's request. - Type
/reload, which makes the game write the file. - Open
WTF/Account/<ACCOUNT>/SavedVariables/RaidManager.luaand send its contents for comparison with the fixtures. It holds no password or other credential.
/console scriptErrors 1 shows any Lua error in the game.