Skip to content
cccskills
FreePublished on GitHub

et-test-write

ET test authoring workflow for WOW. Use when writing or modifying ATestHandler tests, choosing test package placement, naming test classes, creating test-only model types, preparing deterministic coroutine-style assertions, handling ObjectWait, constructing test config data, and enforcing EntityRef safety in tests.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931 stars(GitHub 931 + cccskills 0)
Works withExcel

Run score Not tested

See how to install

Files included (2)

  • SKILL.md3.1 KB
  • SKILL.md.meta158 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

et-test-write - 测试编写入口

何时使用

  • 编写新的 ATestHandler 测试用例。
  • 修改现有测试用例。
  • 补 Test.md 或最小验证清单。

不要加载

  • 只是执行测试或查看日志:用 et-test-run。
  • 只是做完整 TDD 流程编排:用 et-tdd。

落点与命名

  1. 测试优先放在被测功能自己的 package 内:Packages/cn.etetet.{被测包}/Scripts/Hotfix/Test/。
  2. 测试专用的数据结构、Entity、Component、BT 节点或辅助模型类型必须放在被测包的 Scripts/Model/Test/。
  3. Scripts/Model/Share/ 只放运行时或配置编译需要的公共模型,不放只为测试声明的类型。
  4. Scripts/Hotfix/Test/ 只放测试入口和测试流程代码,不放测试专用模型数据结构。
  5. cn.etetet.test 只承载测试框架、公共测试基础设施,以及测试 test 包自身代码的测试;功能包测试和跨包集成测试不要临时放到 test 包。
  6. 跨包集成测试必须放到拥有该集成场景的业务包;若确实是多业务编排,放到发起该编排的更高层业务包。
  7. 类名遵守 {PackageType}_{TestName}_Test,并与所在包 PackageType 常量匹配。
  8. 移动测试专用 C# 文件时同步移动 .meta,并通过 UnityBridge RegenProject 或项目既有流程刷新工程引用。

编写规则

  1. 测试必须是协程式、逻辑确定的验证:按真实时序 await 消费事件、消息返回或明确完成信号。
  2. 禁止用固定时间等待、sleep、轮询、WaitMatch 或无序过滤来等待状态出现。
  3. ObjectWait 必须按真实时序逐个消费事件;事件桥接器只做转发,不写业务过滤。
  4. 含 await 的测试必须在 await 后通过 EntityRef 重新获取 Entity。
  5. 测试需要的 Config 数据必须由测试自己用代码构造,不要修改已有 Excel、配置文件或导出的配置代码。
  6. 成功返回 ErrorCode.ERR_Success;失败直接返回唯一数字错误码,不污染正式 ErrorCode.cs。
  7. 测试失败用 Log.Console,普通信息用 Log.Debug,日志统一英文。

常见错误

  • 把功能包自己的测试或跨包集成测试写到 cn.etetet.test。
  • 把测试专用数据结构、Entity、Component、BT 节点或辅助模型类型放到 Scripts/Model/Share/ 或 Scripts/Hotfix/Test/。
  • 测试类名前缀与所在包 PackageType 不一致。
  • await 后直接访问旧 Entity。
  • 不同失败分支返回相同错误码。
  • 用 Log.Error 代替 Log.Console。
  • 修改已有配置文件、Excel 表或导出的配置代码准备测试数据。
  • 使用固定时间等待某种状态出现。
  • 使用睡眠轮询、WaitMatch 或无序过滤跳过事件。
  • 在正式包 ErrorCode.cs 里定义测试专用错误码。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Unity Editor and Player Runtime CLI integration for AIBridge. Use when Codex needs to compile Unity, inspect Console logs, search/read assets, manipulate GameObjects, Transforms, components, SerializedProperty values, scenes, screenshots/GIFs, connect to built Player runtime targets, simulate Play Mode runtime input, editor focus/menu items/game view, or look up AIBridgeCLI command syntax. For batch/multi scripts use aibridge-batch-script. For complex prefab asset edits use aibridge-prefab-patch. For unsupported direct Unity YAML serialized asset edits use unity-yaml-editing.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

AIBridge batch and multi command automation. Use when Codex needs to run multiple Unity Editor CLI operations together, write batch scripts, use multi --cmd or multi --stdin, handle call/delay/log/menu lines, avoid PowerShell quoting issues, or automate long/JSON-heavy AIBridgeCLI workflows.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

Optional read-only AIBridge Code Index semantic lookup for Unity projects. Use only when this Skill is installed and project rules or AIBridge settings say Code Index is enabled. Use for CLI-only symbol, definition, reference, implementation, derived-type, caller, and diagnostic queries. Do not use when Code Index is disabled; use rg, host file reads, and regular AIBridge commands instead.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

AIBridge/Unity 项目的标准开发工作流。Use when creating, modifying, fixing, refactoring, or validating C# code, Unity assets, prefabs, editor tools, package structure, tests, AGENTS.md, or local Skills. Preserves visible modes for Skills matching, requirement confirmation, analysis, implementation, and final checklist. Do not use for pure Q&A, simple search/display, or code explanation tasks with no file/code/asset changes.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

Unity Prefab asset patch workflow for AIBridge. Use when modifying complex prefab assets with prefab patch operations, child or component creation, SerializedProperty writes, array edits, internal GameObject/component references, dry-run validation, or when deciding between prefab patch, inspector set_property, scene object commands, and direct Unity YAML fallback.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

ET async and EntityRef safety workflow. Use when adding, modifying, or reviewing async/await, ETTask, generic ETTask results, ETCancellationToken, NewContext, concurrent waits, handler Run async safety, or any Entity access after await in WOW/ET code or tests.

The English summary is being prepared. Showing the original description.

FlameskyDexive/Legends-Of-Heroes931Updated Sep 22, 2026

See all skills by FlameskyDexive

Report a problem with this skill