s-test
БесплатноБез исполняемых скриптовНе проверенWrite and run offline unit tests for WoW addon logic: sandbox.test (restricted Lua runner with the packaged mini framework, Core layer) and addon.test…
Об этом скилле
Testing WoW Addons
Tests prove logic offline; they do not prove in-game behaviour. For that, use the reload protocol in using-mechanic.
Related Commands
MCP Tools
| Task | MCP Tool |
|---|---|
| Fast offline Core tests | sandbox.test(addon="MyAddon", filter="optional name pattern") |
| Busted tests, full addon environment | addon.test(addon="MyAddon"), addon.test(addon="MyAddon", coverage=true) |
| Run a snippet in the sandbox | sandbox.exec(code="return 1 + 1", addon="MyAddon") |
| Regenerate WoW API stubs | sandbox.generate(namespace="C_Spell") or all (force=true to rebuild); sandbox.status reports them |
All four run Lua on your machine, so they are flagged mutating (code execution). Only run them on code you are working on.
sandbox.test layout and behaviour
- The addon is looked up in the
_dev_folder. Source files are the top-levelCore/*.luafiles (init.luafirst, then alphabetical; subfolders are not auto-loaded because they need ordered dependencies, so useaddon.testfor those). - Specs are
*_spec.luafiles inCore/or underTests/(capitalT). With none, the result isNO_TEST_FOLDERSor an empty run. - A packaged mini framework is used, so nothing has to be generated first; WoW API stubs from
sandbox.generateare loaded too when they exist. It provides:describe,it,before_each,after_each,setup,teardownandassert.equals / not_equals / is_true / is_false / truthy / falsy / is_nil / is_not_nil / is_near / match / has_error / same. - Code runs in a restricted environment: whitelisted globals only; no
os,io,package,debug,dofile,loadfile,load,getfenv/setfenv,string.dump.requireworks in specs but only for modules beneath the addon folder. 30s/60s timeouts, 256 KB output cap, memory is not limited. filterruns only tests whose full name contains the text (case-insensitive). The result listspassed_count,failed_count,tests(failures first),source_files,spec_filesandduration_ms; runner problems come back as structured errors (LUA_FAILED,LUA_NOT_FOUND,FRAMEWORK_MISSING,NO_TEST_SUMMARY,TIMEOUT). Read them instead of re-running blindly.
-- Core/Math_spec.lua
describe("Core math", function()
it("clamps", function()
assert.equals(10, Core.Clamp(15, 0, 10))
end)
end)
addon.test (Busted)
Runs the system/desktop/bin busted over *_spec.lua files; with a .busted file in the addon its ROOT is respected, otherwise Tests/, tests/ or spec/ are used. The result reports totals, per-test errors and busted errors. Needs the Lua toolchain (tools.status). coverage=true adds a coverage report.
Routing Logic
| Request type | Load reference |
|---|---|
| Sandbox, Busted, in-game guides | ../../../docs/integration/testing.md |
| Busted spec patterns | references/busted-patterns.md |
| Mocking WoW APIs | references/wow-mocking.md |
| MechanicLib test registration | ../k-mechanic/references/mechaniclib.md |
Recommended workflow
- Sandbox (Core) for fast feedback on pure logic; write a failing regression test first when fixing a bug.
- Busted for module interactions and anything needing the full TOC load order.
- In game for the final check against live APIs, through MechanicLib-registered tests and
addon.outputafter a confirmed reload. - Keep logic in the Core layer; tests that need many WoW mocks usually mean logic leaked into the view layer.
Установить s-test в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл s-test?
Write and run offline unit tests for WoW addon logic: sandbox.test (restricted Lua runner with the packaged mini framework, Core layer) and addon.test (Busted). Covers spec layout, assertions, filters, mocking WoW APIs and what offline tests cannot prove. Triggers: test, unit test, spec, coverage, Busted, mock, TDD, sandbox, regression test.
Как установить скилл s-test?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл s-test запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic