CtrlK
BlogDocsLog inGet started
Tessl Logo

test-quality

Write or review Cataclysm-BN tests that avoid flakes, use deterministic fixtures, and clean up global state.

69

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Test Quality

Use when adding or changing automated tests.

Gates

  • Test one behavior contract, not incidental implementation details.
  • Use deterministic fixtures from data/mods/TEST_DATA for data with random, balance, or evolving behavior.
  • Avoid assertions that rely on probability, wall-clock time, locale, file order, or current global options unless the test pins them.
  • Reproduce reported flakes with the failing --rng-seed before accepting the fix.
  • When CI test jobs fail, inspect the job log for the exact test command, filters, shard split, user-dir, order-sensitive included tests, --rng-seed, and backend flags. Run that same shard command on the final rebased HEAD before declaring the fix validated; do not substitute a narrower tag filter or a different full-test command.
  • Before pushing test fixes that touch global state, NPCs, maps, overmaps, player position, RNG, options, or fixtures, run both the relevant focused test and the CI-equivalent shard/full command that can expose state bleed from earlier tests.
  • Keep Lua/C++ integration tests on real bound objects when the binding behavior is under test.

Cleanup

  • Restore global state with restore_on_out_of_scope for calendar, options, globals, and singleton state.
  • Use clear_map() and explicit player placement when map contents matter.
  • Do not leave creatures, items, hooks, worlds, temp files, or option changes that can affect later tests.
  • Prefer new TEST_DATA fixtures over mutating base-game data in the test body.
Repository
cataclysmbn/Cataclysm-BN
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.